在Camunda中,我如何区分在ErrorEnd事件中终止的进程实例和EndEvent?

我是Camunda的新手,我想了解如果一个进程实例在ErrorEndEvent时终止,我如何获取错误信息。对于ErrorEndEvent和EndEvent,状态都被标记为 “COMPLETED”,至少,我如何区分这两者?

REST API: engine-rest/history/process-instance

{
        "id": "72392151-8517-11ea-9313-0242ac110002",
        "businessKey": null,
        "processDefinitionId": "TestError:5:6ac37e20-8517-11ea-9313-0242ac110002",
        "processDefinitionKey": "TestError",
        "processDefinitionName": null,
        "processDefinitionVersion": 5,
        "startTime": "2020-04-23T04:03:53.532+0000",
        "endTime": "2020-04-23T04:03:54.669+0000",
        "removalTime": null,
        "durationInMillis": 1137,
        "startUserId": null,
        "startActivityId": "StartEvent_1",
        "deleteReason": null,
        "rootProcessInstanceId": "72392151-8517-11ea-9313-0242ac110002",
        "superProcessInstanceId": null,
        "superCaseInstanceId": null,
        "caseInstanceId": null,
        "tenantId": null,
        "state": "COMPLETED"
    }

解决方案:

获取进程实例的活动历史。

{{rest_url}}/history/activity-instance?processInstanceId=4008cd81-8622-11ea-b8c7-9c899b574756&sortOrder=desc&sortBy=startTime

也请参见:https:/docs.camunda.orgmanuallatestreferenceresthistoryactivity-instanceget-activity-instance-query。

结果示例:

[
    {
        "id": "Event_13nxum6:eac48940-8622-11ea-b8c7-9c899b574756",
        "parentActivityInstanceId": "4008cd81-8622-11ea-b8c7-9c899b574756",
        "activityId": "Event_13nxum6",
        "activityName": null,
        "activityType": "noneEndEvent",
        "processDefinitionKey": "OrderProcessProcess",
        "processDefinitionId": "OrderProcessProcess:1:27646e94-6998-11ea-9c0d-9c899b574756",
        "processInstanceId": "4008cd81-8622-11ea-b8c7-9c899b574756",
        "executionId": "4008cd81-8622-11ea-b8c7-9c899b574756",
        "taskId": null,
        "calledProcessInstanceId": null,
        "calledCaseInstanceId": null,
        "assignee": null,
        "startTime": "2020-04-24T19:58:31.398+0800",
        "endTime": "2020-04-24T19:58:31.398+0800",
        "durationInMillis": 0,
        "canceled": false,
        "completeScope": true,
        "tenantId": null,
        "removalTime": null,
        "rootProcessInstanceId": "4008cd81-8622-11ea-b8c7-9c899b574756"
    },
    {
        "id": "PrepareOrderTask:78b10b79-8622-11ea-b8c7-9c899b574756",
        "parentActivityInstanceId": "4008cd81-8622-11ea-b8c7-9c899b574756",
        "activityId": "PrepareOrderTask",
...

给TA打赏
共{{data.count}}人
人已打赏
未分类

Regex过滤器转义

2022-9-9 2:23:22

未分类

在R中如何将列中的数字四舍五入?[重复]

2022-9-9 2:23:24

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索