ITSM

运维管理系统


创建流程实例

简要描述
  • 创建工单API接口
请求URL
  • http://${ip}:8096//workflow/api/startProcess
请求方式
  • POST
  • Content-Type : application/json
    参数示例
  {
  "processKey":"kfw210315200910056" ,  
  "formData":{
     "test1":"值",
     "q1":{"label":"系统管理员","value":"d22ae15a56394869924059a9d5867a29"}
   },    
  "variables":{"q1":"d22ae15a56394869924059a9d5867a29"},  
  "assignee":"admin",   
  "applyUser":"admin" ,  
  "processOpinion" : "api创建工单"  
 }
参数
参数名 必选 类型 说明
processKey string 流程key
formData JSON 表单内容键值对key为表单字段唯一键,value 为对应的值如果是枚举类型则值是个map包含value和label
variables JSON 流程变量当第一个节点上有勾选流程变量则需要进行设置,一般是将表单上某个字段作为流程变量
assignee string 处理人:系统的登录名称
applyUser string 创建人:系统的登录名称
processOpinion string 流程日志
返回示例
  {
    "errorCode": 0,
    "message": "成功",
    "time": 1642732525474,
    "responseBody": {
        "uuid": "1082671",
        "processInstanceId": "1082671",
        "taskId": "1082684",
        "processName": "xsk_test",
        "processKey": "kfw210315200910056",
        "formId": "kform210701110630398",
        "handle": null,
        "currentNodeInfo": {
            "nodeName": "a",
            "nodeId": "UserTask_1p7apma",
            "nodeType": "普通",
            "assignee": "d22ae15a56394869924059a9d5867a29",
            "opinionRequired": "false",
            "candidateUsers": [],
            "button": {},
            "candidateGroups": [],
            "signTask": null
        },
        "nextNodeInfo": [
            {
                "nodeName": "用户任务",
                "nodeId": "Activity_06zxrbg",
                "nodeType": "普通",
                "assignee": null,
                "multiInstCollection": null,
                "noUser": false,
                "candidateUsers": [],
                "candidateGroups": [
                    "administratorRole"
                ],
                "state": null,
                "strategy": null
            },
            {
                "nodeName": "b",
                "nodeId": "Activity_0ov0jb7",
                "nodeType": "抢单",
                "assignee": null,
                "multiInstCollection": null,
                "noUser": true,
                "candidateUsers": [],
                "candidateGroups": [
                    "administratorRole"
                ],
                "state": null,
                "strategy": "手动抢单"
            }
        ],
        "formData": {
            "q1": "d22ae15a56394869924059a9d5867a29",
            "test1": "值"
        },
        "basicFlowInstanceLogList": [
            {
                "uuid": "bcd88a85a4b846049b284765a80d55ae",
                "arritytime": "2022-01-21 10:35:24",
                "dealTime": "2022-01-21 10:35:25",
                "nodeId": "UserTask_1p7apma",
                "nodeName": "a",
                "value": "api创建工单",
                "key": "保存",
                "userName": "系统管理员",
                "userUuid": "d22ae15a56394869924059a9d5867a29"
            }
        ],
        "processVersion": "kfw210315200910056:70:1055058",
        "formVersion": "4",
        "formConfigVersion": null,
        "externalForm": "true",
        "formUri": "viewRender?formKey=kform210701110630398&title=test",
        "lastUpdate": "2022-01-21 10:35:24.945",
        "debug": false
    }
}
返回参数说明
参数名 类型 说明
errorCode int 报错码:0正常
message String 接口返回提示
responseBody JSON 返回内容
responseBody->uuid String 生成数据的uuid
responseBody->processInstanceId String 流程实例id
responseBody->taskId String 任务id
responseBody->processName String 流程名称
responseBody->processKey String 流程pkey
responseBody->formId String 表单id
responseBody->handle String 当前人是否有处理权限 true:false
responseBody->currentNodeInfo JSON 当前所在节点信息
responseBody->nextNodeInfo JSONArray 下一节点信息
responseBody->formData JSON 表单formData
responseBody->basicFlowInstanceLogList JSONArray 流程日志
responseBody->processVersion String 当前实例所属流程版本
responseBody->formVersion String 当前实例所属表单版本
responseBody->formConfigVersion String 当前实例所属流程节点配置版本
responseBody->externalForm String 是否外部表单
responseBody->formUri String 表单链接
responseBody->lastUpdate String 最后修改时间
responseBody->debug String 当前流程是否是调试模式
备注

页面列表

ITEM_HTML