0
votes

I'm trying to figure out how to determine if a BPM process call using the REST API provided by Camunda succeded or not, this API will be called from a Node.js app:

http://localhost:8080/engine-rest/process-definition/key/TestBPM/start

{
  "links": [
    {
      "method": "GET",
      "href": "http://localhost:8080/engine-rest/process-instance/72cc8ced-42e9-11e6-9c9d-4c72b965fca0",
      "rel": "self"
    }
  ],
  "id": "72cc8ced-42e9-11e6-9c9d-4c72b965fca0",
  "definitionId": "TestBPM:4:128925ef-42e9-11e6-9c9d-4c72b965fca0",
  "businessKey": null,
  "caseInstanceId": null,
  "ended": true,
  "suspended": false,
  "tenantId": null
}

In that JSON response i'm receiving that the proccess ended, but what i need to know is in which end state ended the process.... i there a way to do this??

BPM:

enter image description here

1
What does the documentation say? - joev

1 Answers

5
votes

normally you would use some service or script tasks to process your data. Your BPMN diagram contains only Events and a Gateway which is rather unusual.

However with your diagram there are 2 ways to achieve your goal:

  1. use the History Log on Activity Level: https://docs.camunda.org/manual/7.5/user-guide/process-engine/history/ and Query the DB.
  2. If you don't want to poll your DB just use EventListeners on your End-Events: https://docs.camunda.org/manual/7.5/user-guide/process-engine/delegation-code/#execution-listener