2016-07-05 81 views
0

我试图找出如何确定是否使用Camunda提供的REST API一个BPM流程调用succeded与否,这个API将从Node.js的应用程序被称为:如何知道一个BPM流程succeded

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 
} 

在这种JSON响应我收到了proccess结束了,但我需要知道的是,在最终状态结束的过程....我有办法去做这个??

BPM:

enter image description here

+0

是什么文件说? – joev

回答

5

通常你会使用一些服务或脚本任务处理您的数据。您的BPMN图只包含事件和一个非常不寻常的网关。

然而,随着你的图有2种方式来实现自己的目标:

  1. 使用历史记录上的活跃程度:https://docs.camunda.org/manual/7.5/user-guide/process-engine/history/和查询数据库。
  2. 如果你不想来轮询DB只使用事件侦听器在你的最终活动:https://docs.camunda.org/manual/7.5/user-guide/process-engine/delegation-code/#execution-listener
+0

调用HTTP://本地主机:8080 /发动机静止/历史/活动,例如,通过流程id过滤做的伎俩! – DGomez