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子流程列表