获取所有流程工作项和传阅项

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

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

  • 响应示例
{
  "businessObject": [
    {
      "addTask": false,
      "alertTime": null,
      "appCode": "",
      "appName": "",
      "appType": "",
      "appTypeName": "",
      "assigneeOrgId": "",
      "assigneeOrgName": "",
      "assigneeUserId": "",
      "assigneeUserName": "",
      "autoFinish": true,
      "businessDataId": "",
      "createOrgId": "",
      "createOrgName": "",
      "createUserName": "",
      "currentTaskNames": "",
      "currentTaskUsers": "",
      "expiredTime": null,
      "extendedFieldOne": "",
      "extendedFieldThree": "",
      "extendedFieldTwo": "",
      "finishTime": "2019-08-28 16:59:46",
      "important": 0,
      "itemId": "1bddd58f-88a8-489c-a05e-f1699b86f5d0",
      "opinionArea": "",
      "opinionContent": "",
      "passOrgId": "d8067d12-50ba-4a29-9a17-2a642e256e9c",
      "passOrgName": "集团公司高管",
      "passTaskId": 3,
      "passUserId": "f0539bf1-de4a-4877-bc05-00d30226424f",
      "passUserName": "黄飞",
      "pcPageUrl": "",
      "procId": "20190828000022",
      "procName": "",
      "readTime": "2019-08-28 16:59:46",
      "receiveTime": "2019-08-28 16:59:46",
      "secret": 0,
      "status": "autoFinished",
      "taskId": 4,
      "taskName": "结束步骤",
      "taskText": "结束步骤",
      "userChoice": "系统(结束)",
      "userId": "系统",
      "userName": "系统",
      "userOrgId": "系统",
      "userOrgName": "系统",
      "workItemType": 0,
      "workflowStatus": ""
    },
    {
      "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-28 16:59:46",
      "important": 0,
      "itemId": "c34b03b7-0182-4d8a-9f3e-243ec347bb5c",
      "opinionArea": "",
      "opinionContent": "",
      "passOrgId": "3a8a5378-9ffd-43b5-8503-e5aa3b9e9102",
      "passOrgName": "房地产事业总部财务管理部",
      "passTaskId": 2,
      "passUserId": "d7b2ae8b-bc82-4420-bb7c-69d1040d11aa",
      "passUserName": "龙茂杰",
      "pcPageUrl": "",
      "procId": "20190828000022",
      "procName": "",
      "readTime": null,
      "receiveTime": "2019-08-28 16:42:18",
      "secret": 0,
      "status": "finished",
      "taskId": 3,
      "taskName": "审批步骤1",
      "taskText": "审批步骤1",
      "userChoice": "结束步骤",
      "userId": "f0539bf1-de4a-4877-bc05-00d30226424f",
      "userName": "黄飞",
      "userOrgId": "d8067d12-50ba-4a29-9a17-2a642e256e9c",
      "userOrgName": "集团公司高管",
      "workItemType": 0,
      "workflowStatus": ""
    },
    {
      "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-28 16:42:18",
      "important": 0,
      "itemId": "ab30ea2f-ce3b-47e3-a3ec-a2a154628110",
      "opinionArea": "",
      "opinionContent": "",
      "passOrgId": "2dc9f805-f0df-42e7-b312-d7395da2018a",
      "passOrgName": "广州轨道交通建设监理有限公司财务部",
      "passTaskId": 1,
      "passUserId": "27b3f6ef-2647-4232-b064-3b5721e51dd5",
      "passUserName": "唐琪",
      "pcPageUrl": "",
      "procId": "20190828000022",
      "procName": "",
      "readTime": null,
      "receiveTime": "2019-08-28 16:40:10",
      "secret": 0,
      "status": "finished",
      "taskId": 2,
      "taskName": "审批步骤",
      "taskText": "审批步骤",
      "userChoice": "审批步骤1",
      "userId": "d7b2ae8b-bc82-4420-bb7c-69d1040d11aa",
      "userName": "龙茂杰",
      "userOrgId": "3a8a5378-9ffd-43b5-8503-e5aa3b9e9102",
      "userOrgName": "房地产事业总部财务管理部",
      "workItemType": 0,
      "workflowStatus": ""
    },
    {
      "addTask": false,
      "alertTime": null,
      "appCode": "",
      "appName": "",
      "appType": "",
      "appTypeName": "",
      "assigneeOrgId": "",
      "assigneeOrgName": "",
      "assigneeUserId": "27b3f6ef-2647-4232-b064-3b5721e51dd5",
      "assigneeUserName": "",
      "autoFinish": false,
      "businessDataId": "",
      "createOrgId": "",
      "createOrgName": "",
      "createUserName": "",
      "currentTaskNames": "",
      "currentTaskUsers": "",
      "expiredTime": null,
      "extendedFieldOne": "",
      "extendedFieldThree": "",
      "extendedFieldTwo": "",
      "finishTime": "2019-08-28 16:40:10",
      "important": 0,
      "itemId": "4a2be998-9991-42c0-a3ce-f09375065ce0",
      "opinionArea": "",
      "opinionContent": "",
      "passOrgId": "",
      "passOrgName": "",
      "passTaskId": 0,
      "passUserId": "",
      "passUserName": "",
      "pcPageUrl": "",
      "procId": "20190828000022",
      "procName": "",
      "readTime": null,
      "receiveTime": "2019-08-28 16:35:08",
      "secret": 0,
      "status": "finished",
      "taskId": 1,
      "taskName": "开始步骤",
      "taskText": "开始步骤",
      "userChoice": "审批步骤",
      "userId": "27b3f6ef-2647-4232-b064-3b5721e51dd5",
      "userName": "唐琪",
      "userOrgId": "2dc9f805-f0df-42e7-b312-d7395da2018a",
      "userOrgName": "广州轨道交通建设监理有限公司财务部",
      "workItemType": 0,
      "workflowStatus": ""
    },
    {
      "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": "2019-08-28 17:11:57",
      "important": 0,
      "itemId": "f3d356a8-c96f-11e9-bb47-d00dadbb603a",
      "opinionArea": "",
      "opinionContent": "",
      "passOrgId": "2dc9f805-f0df-42e7-b312-d7395da2018a",
      "passOrgName": "广州轨道交通建设监理有限公司财务部",
      "passTaskId": 2,
      "passUserId": "27b3f6ef-2647-4232-b064-3b5721e51dd5",
      "passUserName": "唐琪",
      "pcPageUrl": "",
      "procId": "20190828000022",
      "procName": "",
      "readTime": "2019-08-28 17:11:57",
      "receiveTime": "2019-08-28 16:44:06",
      "secret": 0,
      "status": "finished",
      "taskId": 1000,
      "taskName": "审批步骤-传阅",
      "taskText": "审批步骤-传阅",
      "userChoice": "",
      "userId": "0816ffed-26aa-495b-9987-6190a5777944",
      "userName": "张虎航",
      "userOrgId": "843b22ca-bfb6-4637-b872-bf449b17dbb7",
      "userOrgName": "领导",
      "workItemType": 1,
      "workflowStatus": ""
    }
  ],
  "message": "成功",
  "statusCode": 200,
  "success": true
}