默认值为true,表示所有成功或者或者失败,为false时表示出错后继续执行后续启动流程
流程取消参数数组,用于批量取消流程
import * as bp from 'bp'
let batchClient = bp.newBatchClient()
let batchOutput = batchClient.batchCancelProcess(
syncCommit: true,
input: [ {
"processInsID": "002N000000uKGAT6ZXM0",
"reason": "cancel process",
},
{
"processInsID": "002N000000uKGATFehW4",
"reason": "cancel process",
}])
console.log(batchOutput)
返回取消成功的流程的基本信息,以及取消失败的流程的错误信息
批量完成任务
默认值为true,表示所有成功或者或者�����败,为false时表示出错后继续执行后续启动流程
任务完成参数数组,用于批量任务完成
import * as bp from 'bp'
let batchClient = bp.newBatchClient()
let batchOutput = batchClient.batchCompleteTask(
syncCommit: true,
input: [ {
"taskInsId":"002q000000uAMQutQXtA",
"action": "complete this task",
"variables": {}
},
{
"taskInsId":"002q000000uAMQv0o7Gq",
"action": "complete this task",
"variables": {}
}])
console.log(batchOutput)
返回完成的task的基本信息,以及完成失败的流程的错误信息
批量委派
默认值为true,表示所有成功或者或者失败,为false时表示出错后继续执行后续启动流程
任务委派参数数组,用于批量任务委派
import * as bp from 'bp'
let batchClient = bp.newBatchClient()
let batchOutput = batchClient.batchDelegateTask(
syncCommit: true,
input: [ {
"taskInsId":"002q000000uAMQutQXtA",
"assignee": "user:zhangshan",
"reason": "delegate task to assignee",
},
{
"taskInsId":"002q000000uAMQv0o7Gq",
"assignee": "user:lisi",
"reason": "delegate task to assignee",
}])
console.log(batchOutput)
返回委派的task的基本信息,以及委派失败的流程的错误信息
批量撤回
默认值为true,表示所有成功或者或者失败,为false时表示出错后继续执行后续启动流程
流程撤回参数数组,用于批量撤回流程的task
import * as bp from 'bp'
let batchClient = bp.newBatchClient()
let batchOutput = batchClient.batchRevokeProcessTask(
syncCommit: true,
input: [ {
"taskInsId":"002q000000uAMQutQXtA",
"processInsID": "002N000000uKGAT6ZXM0",
"allowClose": true,
"allowCreate": true
},
{
"taskInsId":"002q000000uAMQv0o7Gq",
"processInsID": "002N000000uKGATFehW4",
"allowClose": true,
"allowCreate": true
}])
console.log(batchOutput)
返回撤回成功的流程的基本信息,以及撤回失败的流程的错误信息
批量打回
默认值为true,表示所有成功或者或者失败,为false时表示出错后继续执行后续启动流程
流程撤回参数数组,用于批量撤回流程的task
import * as bp from 'bp'
let batchClient = bp.newBatchClient()
let batchOutput = batchClient.batchRollbackProcessTask(
syncCommit: true,
input: [ {
"taskInsId":"002q000000uAMQutQXtA",
"processInsID": "002N000000uKGAT6ZXM0",
"allowClose": true,
"allowCreate": true
},
{
"taskInsId":"002q000000uAMQv0o7Gq",
"processInsID": "002N000000uKGATFehW4",
"allowClose": true,
"allowCreate": true
}])
console.log(batchOutput)
返回撤回成功的流程的基本信息,以及撤回失败的流程的错误信息
批量启动流程
默认值为true,表示所有成功或者或者失败,为false时表示出错后继续执行后续启动流程
流程启动参数数组,用于批量启动流程
import * as bp from 'bp'
let batchClient = bp.newBatchClient()
let batchOutput = batchClient.batchStartProcess(
syncCommit: true,
input: [ {
"name": "AutoTest1640426626697965_168",
"version": "1.0.1",
"variables": {}
},
{
"name": "AutoTest1640426678948802_168",
"version": "1.0.1",
"variables": {}
}])
console.log(batchOutput)
返回启动成功的流程的基本信息,以及启动失败的流程的错误信息
批量委派
默认值为true,表示所有成功或者或者失败,为false时表示出错后继续执行后续启动流程
任务转派参数数组,用于批量任务转派
import * as bp from 'bp'
let batchClient = bp.newBatchClient()
let batchOutput = batchClient.batchTransferTask(
syncCommit: true,
input: [ {
"taskInsId":"002q000000uAMQutQXtA",
"assignee": "user:zhangshan",
"reason": "delegate task to assignee",
},
{
"taskInsId":"002q000000uAMQv0o7Gq",
"assignee": "user:lisi",
"reason": "delegate task to assignee",
}])
console.log(batchOutput)
返回转派的task的基本信息,以及转派失败的流程的错误信息
批量取消流程