Skip to content

提交 ​

接口请求调用说明

  • HTTP 请求方式:POST
  • 请求地址:http://127.0.0.1:8080/demo/horizon/workflow/rest/flow/support/action.wf

请求参数:

json
{
  "accessToken": "",
  "flowId": "flowsupport",
  "workId": "HZ2886865bf17466015bf1871de1004b",
  "trackId": "HZ2886865bf17466015bf1872089004c",
  "subjection": "D_HZ28821856ef63420156ef63429c0000",
  "authorKey": "Author",
  "comment": "",
  "nodeId": "Node1",
  "title": "",
  "actionData": {
    "operate": "submit",
    "operateFlag": 0,
    "operateClazz": "com.horizon.wf.action.ActionSubmit",
    "flowVars": {
      "field1": "123"
    },
    "nextNodes": [
      {
        "nodeKey": "Line2",
        "selectId": "Line2~Node2",
        "selectName": "新路由2(任务2)",
        "isSelect": "true",
        "isDone": "false",
        "nodeGroup": "",
        "isShowTabs": null,
        "timeLimit": "0",
        "timeLimitType": "0",
        "nodeStatus": "4",
        "authors": {
          "SecondAuthor": {
            "authorId": "SecondAuthor",
            "authorName": "协办",
            "selectType": "checkbox",
            "isFree": "true",
            "isUser": "false",
            "isDefUser": "false",
            "isSelect": "true",
            "selectAuthor": null,
            "selectAuthorName": null,
            "required": null,
            "initAuthor": null
          },
          "Reader": {
            "authorId": "Reader",
            "authorName": "读者",
            "selectType": "checkbox",
            "isFree": "true",
            "isUser": "false",
            "isDefUser": "false",
            "isSelect": "true",
            "selectAuthor": null,
            "selectAuthorName": null,
            "required": null,
            "initAuthor": null
          },
          "Author": {
            "authorId": "Author",
            "authorName": "主办",
            "selectType": "radio",
            "isFree": "true",
            "isUser": "false",
            "isDefUser": "false",
            "isSelect": "false",
            "selectAuthor": "U_admin/D_HZ28821856ef63420156ef63429c0000",
            "selectAuthorName": "管理员(慧正通软)",
            "required": null,
            "initAuthor": null
          }
        },
        "nodeId": "Node2",
        "nodeName": "任务2",
        "trackId": null
      }
    ]
  }
}
参数是否必须描述
accessToken是调用接口凭证,唯一用户标识
flowId否流程id
workId是流程实例id
trackId是流程路径id
subjection是提交人所属的组织机构id(如部门id、群组id、岗位id等),格式为D_xxxid、G_xxxxid、P_xxxxid
authorKey否提交人身份标识
comment否意见
nodeId否节点id
title否标题
actionData是流程操作json数据对象

actionData 数据参数:

参数是否必须描述
operate是操作提交标识,固定值submit
operateFlag是操作标记 -1:显示关闭,0、1正常提交
operateClazz是操作提交操作类路径,固定值com.horizon.wf.action.ActionSubmit
flowVars否流程变量赋值使用,flowVars为map,支持传多个,key变量名,value为变量值
nextNodes否需要选择的节点列表(如果已经设置好路由及办理人信息,可以不填)

nextNodes 参数说明:

参数是否必须描述
nodeKey是节点主键
selectId是需要选择的节点id
selectName否需要选择的节点名称
isSelect是是否已选择
isDone否是否已经走过
nodeGroup否节点分组,单节点时无值
isShowTabs否是否显示办理人页签
timeLimit否节点办理时限
timeLimitType否办理时限类型:0(自然日)、1(工作日)
nodeStatus否节点状态
authors是下一节点办理人对象
nodeId是节点id
nodeName否节点名称

authors 中 Author/SecondAuthor/Reader 对象参数说明:

参数是否必须描述
authorId否办理人类型id:Author(主办)、SecondAuthor(协办)、Reader(读者)
authorName否办理人名称
selectType否人员选择类型:radio(单选)、checkbox(多选)
isFree否是否自由选择
isUser否是否只允许选择人员
isDefUser否流程定义列表中选择
isSelect否是否允许选择办理人
selectAuthor是节点已选择办理人
selectAuthorName是节点已选择办理人名称
required否办理人必填标识
initAuthor否节点初始化办理人id

返回结果示例:

json
{
  "operate": "submit",
  "operateClazz": "com.horizon.wf.action.ActionSubmit",
  "operateText": "提交",
  "operateFlag": "0",
  "operateMsg": "提交成功",
  "reOpen": "false",
  "workId": "HZ2886865c0ec540015c0fb3103700da",
  "trackId": "HZ2886865c0ec540015c0fb3103800db",
  "nodeId": "Node1",
  "nodeName": "任务1",
  "subjection": "",
  "authorKey": "Author",
  "operateStatus": "success",
  "alert": "",
  "messageType": "",
  "nextNodes": [],
  "subFlows": ""
}

结果参数说明:

参数类型描述
operateString提交操作标识
operateClazzString提交操作类路径
operateTextString操作显示名称
operateFlagString操作标记 -1:显示关闭,0、1正常提交
operateMsgString返回操作信息
reOpenString是否重新打开,可忽略
workIdString流程实例id
trackIdString流程实例路径id
nodeIdString当前节点id
nodeNameString当前节点name
subjectionString提交人身份标识
authorKeyString参与者id
operateStatusString流程操作结果
alertString是否弹出操作成功信息,可忽略
messageTypeString消息发送类型
nextNodesList需要选择的节点列表
subFlowsList子流程列表