获取流程项信息

根据流程实例编号和工作项编号获取流程项信息

  • SDK调用
WorkflowEngineClient client = new WorkflowEngineClient();
client.setUrl(URL+"/engine");  //引擎客户端
String procId = "20190827000001";
int taskId = 4;
ResultEntity<WorkItem> resultEntity = client.getWorkflowItem(procId, taskId);
String resultStr = JSONObject.fromObject(resultEntity,getJsonConfig()).toString();
System.out.println(resultStr);
  • CURL调用
curl -X GET "URL/engine/getWorkflowItem?procId=20190827000001&taskId=4" -H "accept: application/json"
  • 响应示例
{
  "businessObject": {
    "addTask": false,
    "alertTime": null,
    "appCode": "",
    "appName": "",
    "appType": "",
    "appTypeName": "",
    "assigneeOrgId": "",
    "assigneeOrgName": "",
    "assigneeUserId": "",
    "assigneeUserName": "",
    "autoFinish": false,
    "businessDataId": "",
    "createOrgId": "",
    "createOrgName": "",
    "createUserName": "",
    "currentTaskNames": "",
    "currentTaskUsers": "",
    "expiredTime": null,
    "extendedFieldOne": "",
    "extendedFieldThree": "",
    "extendedFieldTwo": "",
    "finishTime": null,
    "important": 0,
    "itemId": "5b173e2c-643f-4a45-9cef-7ce02fb58162",
    "opinionArea": "",
    "opinionContent": "",
    "passOrgId": "b203f5b3-4246-49a2-902a-19c899f00ea2",
    "passOrgName": "广州轨道交通建设监理有限公司财务部",
    "passTaskId": 3,
    "passUserId": "b203f5b3-4246-49a2-902a-19c899f00ea2",
    "passUserName": "黄燕君",
    "pcPageUrl": "",
    "procId": "20190827000001",
    "procName": "",
    "readTime": null,
    "receiveTime": "2019-08-27 11:23:52",
    "secret": 0,
    "status": "sent",
    "taskId": 4,
    "taskName": "各部门会签",
    "taskText": "各部门会签",
    "userChoice": "",
    "userId": "cc99aba7-3667-4980-b971-024101938318",
    "userName": "何颖思",
    "userOrgId": "2dc9f805-f0df-42e7-b312-d7395da2018a",
    "userOrgName": "XX轨道交通建设监理有限公司财务部",
    "workItemType": 0,
    "workflowStatus": ""
  },
  "message": "成功",
  "statusCode": 200,
  "success": true
}