Interface BatchClient

Hierarchy

  • BatchClient

Properties

batchCancelProcess: ((syncCommit, input) => BatchOutputCommon)

Type declaration

    • (syncCommit, input): BatchOutputCommon
    • 批量取消流程

      Parameters

      • syncCommit: boolean

        默认值为true,表示所有成功或者或者失败,为false时表示出错后继续执行后续启动流程

      • input: Dict[]

        流程取消参数数组,用于批量取消流程

      Returns BatchOutputCommon

      返回取消成功的流程的基本信息,以及取消失败的流程的错误信息

      Example


      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)
batchCompleteTask: ((syncCommit, input) => BatchOutputCommon)

Type declaration

    • (syncCommit, input): BatchOutputCommon
    • 批量完成任务

      Parameters

      • syncCommit: boolean

        默认值为true,表示所有成功或者或者�����败,为false时表示出错后继续执行后续启动流程

      • input: Dict[]

        任务完成参数数组,用于批量任务完成

      Returns BatchOutputCommon

      返回完成的task的基本信息,以及完成失败的流程的错误信息

      Example


      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)
batchDelegateTask: ((syncCommit, input) => BatchOutputCommon)

Type declaration

    • (syncCommit, input): BatchOutputCommon
    • 批量委派

      Parameters

      • syncCommit: boolean

        默认值为true,表示所有成功或者或者失败,为false时表示出错后继续执行后续启动流程

      • input: Dict[]

        任务委派参数数组,用于批量任务委派

      Returns BatchOutputCommon

      返回委派的task的基本信息,以及委派失败的流程的错误信息

      Example


      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)
batchRevokeProcessTask: ((syncCommit, input) => BatchOutputCommon)

Type declaration

    • (syncCommit, input): BatchOutputCommon
    • 批量撤回

      Parameters

      • syncCommit: boolean

        默认值为true,表示所有成功或者或者失败,为false时表示出错后继续执行后续启动流程

      • input: Dict[]

        流程撤回参数数组,用于批量撤回流程的task

      Returns BatchOutputCommon

      返回撤回成功的流程的基本信息,以及撤回失败的流程的错误信息

      Example


      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)
batchRollbackProcessTask: ((syncCommit, input) => BatchOutputCommon)

Type declaration

    • (syncCommit, input): BatchOutputCommon
    • 批量打回

      Parameters

      • syncCommit: boolean

        默认值为true,表示所有成功或者或者失败,为false时表示出错后继续执行后续启动流程

      • input: Dict[]

        流程撤回参数数组,用于批量撤回流程的task

      Returns BatchOutputCommon

      返回撤回成功的流程的基本信息,以及撤回失败的流程的错误信息

      Example


      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)
batchStartProcess: ((syncCommit, input) => BatchOutputCommon)

Type declaration

    • (syncCommit, input): BatchOutputCommon
    • 批量启动流程

      Parameters

      • syncCommit: boolean

        默认值为true,表示所有成功或者或者失败,为false时表示出错后继续执行后续启动流程

      • input: Dict[]

        流程启动参数数组,用于批量启动流程

      Returns BatchOutputCommon

      返回启动成功的流程的基本信息,以及启动失败的流程的错误信息

      Example


      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)
batchTransferTask: ((syncCommit, input) => BatchOutputCommon)

Type declaration

    • (syncCommit, input): BatchOutputCommon
    • 批量委派

      Parameters

      • syncCommit: boolean

        默认值为true,表示所有成功或者或者失败,为false时表示出错后继续执行后续启动流程

      • input: Dict[]

        任务转派参数数组,用于批量任务转派

      Returns BatchOutputCommon

      返回转派的task的基本信息,以及转派失败的流程的错误信息

      Example


      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)