获取流程所有工作项

  • SDK调用
WorkflowEngineClient client = new WorkflowEngineClient();
client.setUrl(URL+"/engine");  //引擎客户端
String procId = "20190827000025";
//构建查询参数
Map<String, Object> params = new HashMap<String, Object>();
params.put("taskId ", 2);
params.put("taskSeqId ", 2);
ResultEntity<List<WorkItem>> resultEntity = client.queryWorkflowItems(procId,params);
String resultStr = JSONObject.fromObject(resultEntity,getJsonConfig()).toString();
System.out.println(resultStr);
  • CURL 调用
curl -X  POST  "URL/engine/queryWorkflowItems"  -H "accept: application/json" -H "Content-Type: application/json" -d \
"{    \
    \"procId\": \"20190827000025\",    \
    \"parameter\": {    \
         \"taskId\": 2,     \
         \"taskSeqId\": 2
    }    \
}"

注:parameter 下的字段为所有的查询参数,可以选填 。

  • 响应示例
{
  "businessObject": [
    {
      "addTask": false,
      "alertTime": null,
      "appCode": "",
      "appName": "",
      "appType": "",
      "appTypeName": "",
      "assigneeOrgId": "2dc9f805-f0df-42e7-b312-d7395da2018a",
      "assigneeOrgName": "广州轨道交通建设监理有限公司财务部",
      "assigneeUserId": "27b3f6ef-2647-4232-b064-3b5721e51dd5",
      "assigneeUserName": "唐琪",
      "autoFinish": false,
      "businessDataId": "",
      "createOrgId": "",
      "createOrgName": "",
      "createUserName": "",
      "currentTaskNames": "",
      "currentTaskUsers": "",
      "expiredTime": null,
      "extendedFieldOne": "",
      "extendedFieldThree": "",
      "extendedFieldTwo": "",
      "finishTime": "2019-08-27 16:21:58",
      "important": 0,
      "itemId": "0ca16c0c-9df6-4e60-8983-797f76e63691",
      "opinionArea": "",
      "opinionContent": "",
      "passOrgId": "2dc9f805-f0df-42e7-b312-d7395da2018a",
      "passOrgName": "广州轨道交通建设监理有限公司财务部",
      "passTaskId": 1,
      "passUserId": "27b3f6ef-2647-4232-b064-3b5721e51dd5",
      "passUserName": "唐琪",
      "pcPageUrl": "",
      "procId": "20190827000025",
      "procName": "",
      "readTime": null,
      "receiveTime": "2019-08-27 16:15:20",
      "secret": 0,
      "status": "finished",
      "taskId": 2,
      "taskName": "选定特定用户",
      "taskText": "选定特定用户",
      "userChoice": "传阅步骤",
      "userId": "01d08f96-e7a0-4804-8ee4-dd9a54fbe804",
      "userName": "钟学军",
      "userOrgId": "dcb40273-579a-4489-a9ac-11e72628b962",
      "userOrgName": "党群工作部",
      "workItemType": 0,
      "workflowStatus": ""
    }
  ],
  "message": "成功",
  "statusCode": 200,
  "success": true
}