流程处理
激活节点
this.$flowHandler.activateActivity(activityCode, flowId, participants);
支持版本:V3.3.0
输入参数:
| 参数 | 类型 | 必填 | 说明 | |
|---|---|---|---|---|
| activityCode | string | 是 | 节点code | |
| flowId | string | 是 | 流程id | |
| participants | array | 否 | 参与人id数组 |
返回内容:
返回一个Promise类型的对象,可以直接通过then来处理正确回调,通过catch来处理错误回调
样例:
dataForm.addButtonBefore('激活',function(){
console.log(dataForm.getDataFormInfo());
const flowId = dataForm.getDataFormInfo().flowId;
dataForm.$flowHandler.activateActivity('Activity3',flowId,['18f923a7-5a5e-426d-94ae-a55ad1a4b239','a3c99908-c434-4b96-b413-a82dedbcb7b5']).then(res=>{
console.log(res);
})
})
调整参与人
this.$flowHandler.adjustActivity(activityCode, flowId, participants);
支持版本:V3.3.0
输入参数:
| 参数 | 类型 | 必填 | 说明 | |
|---|---|---|---|---|
| activityCode | string | 是 | 节点code | |
| flowId | string | 是 | 流程id | |
| participants | array | 是 | 参与人id数组 |
返回内容:
返回一个Promise类型的对象,可以直接通过then来处理正确回调,通过catch来处理错误回调
样例:
dataForm.addButtonBefore('调整参与人',function(){
console.log(dataForm.getDataFormInfo());
const flowId = dataForm.getDataFormInfo().flowId;
dataForm.$flowHandler.adjustActivity('Activity3',flowId,['18f923a7-5a5e-426d-94ae-a55ad1a4b239','a3c99908-c434-4b96-b413-a82dedbcb7b5']).then(res=>{
console.log(res);
})
})
取消活动节点
this.$flowHandler.cancelActivity(activityCode, flowId);
支持版本:V3.3.0
输入参数:
| 参数 | 类型 | 必填 | 说明 | |
|---|---|---|---|---|
| activityCode | string | 是 | 节点code | |
| flowId | string | 是 | 流程id |
返回内容:
返回一个Promise类型的对象,可以直接通过then来处理正确回调,通过catch来处理错误回调
样例:
dataForm.addButtonBefore('取消',function(){
console.log(dataForm.getDataFormInfo());
const flowId = dataForm.getDataFormInfo().flowId;
dataForm.$flowHandler.cancelActivity('Activity3',flowId).then(res=>{
console.log(res);
})
})