更新批处理

动词:updateBatch

可从以下位置获取: <Standard>

更新有关先前在 创建批处理 命令中定义的一组实例的信息。

1. 工作流程是一个过程流控制引擎。 工作流程表示 BPMN 文件内的一个流程。
2. 实例表示应处理的项。 变量负责接收工作流程执行的数据,将每个任务指定到各自对应的流程。

语法

updateBatch --description(String) [--businessstatus(String)] [--businessstatusreason(String)] [--instances(List<WorkflowInstance>)] [--defaultvalues(String)] --workflow(Workflow)

输入

脚本 设计器 必需的 AcceptedTypes Description
-- 描述 Description 必需的 文本 应分配到实例组的新描述。
--businessstatus 业务状态 可选 文本 用于根据业务规则逻辑识别实例的业务状态。
此参数用于在流程内部进行指导,而不干扰脚本的操作。
--businessstatusreason 原因 可选 文本 调整要更新的业务状态的新原因。
--instances 实例 可选 列表<Workflow Instance> 应该更新的工作流程实例,通过创建工作流程实例命令获取。
--defaultvalues 缺省值 可选 文本 应进行更新的实例的映射和值的映射。
--workflow 工作流程 必需的 Workflow 将从其中装入实例的“工作流程”类型变量。
此变量是使用装入工作流程命令的工作流程参数生成的。

示例

使用更新批处理命令更新给定组的名称和状态。

defVar --name mappedWorkflow --type Workflow
defVar --name a --type Numeric --value 0
defVar --name workflow --type Workflow
defVar --name workflowInstance --type WorkflowInstance
defVar --name instancesBatch --type WorkflowBatch
defVar --name instanceToExecute --type WorkflowInstance
defVar --name executedInstances --type Boolean
// Download the following file to run the command.
loadWorkflow --isfromfile  --file "bpmnTestVar.bpmn" --process "Id_f12b1ed6-0ecd-4bf7-b245-9bf31b63e900" --automapvariables  workflow=value
mapWorkflowActivities --workflow ${workflow} --mappings "Task_inc=beginSubroutine" mappedWorkflow=value
createBatch --description "Batch containing Workflow instances" --workflow ${workflow} --key initialBatch --comment "Creates a batch to store Workflow instances" instancesBatch=value
while --left "${a}" --operator "Less_Than" --right 2
	incrementVar --number ${a}
	createWorkflowInstance --workflow ${workflow} --businessstatus "In Progress" --businessstatusreason "Developing Script" --defaultvalues "a=${a}" --batch ${instancesBatch} workflowInstance=value
endWhile
beginBatch --batch ${instancesBatch} --timeout 00:00:40
	foreach --collection "${instancesBatch}" --variable "${instanceToExecute}"
		executeWorkflow --instance ${instanceToExecute} executedInstances=Success
	endFor
	logMessage --message "${instancesBatch}" --type "Info"
	updateBatch --description "Workflow after running the instances" --businessstatus Done --businessstatusreason "Updated and finalized workflow" --workflow ${workflow}
endBatch
// Displays the status and name of the group before and after using the Update Batch command.
logMessage --message "${instancesBatch}" --type "Info"
beginSub --name beginSubroutine
	logMessage --message Executed --type "Info"
	return
endSub
下载文件
要运行样本脚本,需要下载该文件,并在装入工作流程命令的文件参数中显示其路径。

另请参阅

  • 取消工作流程实例
  • 创建批处理
  • 创建工作流程实例
  • 结束批处理
  • 执行工作流程实例
  • 获取批处理
  • 获取下一个工作流程实例
  • 列出批处理
  • 列出工作流程实例
  • 装入工作流程
  • 装入工作流程实例
  • 映射工作流程活动
  • 迁移工作流程版本
  • 重新启动工作流程实例
  • 启动批处理
  • 暂挂工作流程
  • 更新工作流程实例