更新工作流程实例

动词:updateWorkflowInstance

更新有关在 映射工作流程活动中先前指定的执行例程中使用的实例的信息。

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

语法

updateWorkflowInstance [--businessstatus(String)] [--businessstatusreason(String)]

输入

脚本 设计器 必需的 AcceptedTypes Description
--businessstatus 业务状态 可选 文本 用于根据业务规则逻辑识别实例的业务状态。
此参数用于在流程内部进行指导,而不干扰脚本的操作。
--businessstatusreason 原因 可选 文本 调整要更新的业务状态的新原因。

示例

使用更新工作流程实例命令更新实例,该实例用于映射工作流程活动命令先前指定的子例程中。 该实例由执行工作流程实例命令运行。

defVar --name mappedWorkflow --type Workflow
defVar --name workflow --type Workflow
defVar --name workflowInstance --type WorkflowInstance
defVar --name status --type String --value "In progress"
defVar --name reason --type String --value "Developing Script"
defVar --name newStatus --type String --value "New status"
defVar --name newReason --type String --value "New reason"
defVar --name successRunInstance --type Boolean
defVar --name a --type Numeric --value 1
// Download the following file to run the command.
loadWorkflow --isfromfile  --file "bpmnTesteVar.bpmn" --process "Id_f12b1ed6-0ecd-4bf7-b245-9bf31b63e900" --automapvariables  workflow=value
mapWorkflowActivities --workflow ${workflow} --mappings "Task_inc=inicioSub" mappedWorkflow=value
createWorkflowInstance --workflow ${workflow} --businessstatus "${status}" --businessstatusreason "${reason}" --defaultvalues "a=${a}" workflowInstance=value
executeWorkflow --instance ${workflowInstance} successRunInstance=Success
logMessage --message "${workflowInstance.BusinessStatus}\r\n${workflowInstance.BusinessStatusReason}" --type "Info"
beginSub --name inicioSub
	updateWorkflowInstance --businessstatus "${newStatus}" --businessstatusreason "${newReason}"
endSub
下载文件
要运行样本脚本,需要下载该文件,并在装入工作流程命令的文件参数中显示其路径。

另请参阅

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