Migrate Workflow Version

Verb: migrateWorkflowInstance

Migrates the defined Workflow instance to a new version and returns it in a variable.

1. Workflow is a process flow control engine. A Workflow represents a process within a BPMN file.
2. Instance represents the item that should be processed. It is the variable responsible for receiving data for the Workflow execution, assigning each task to its respective process.


migrateWorkflowInstance --instance(WorkflowInstance) --workflow(Workflow) (WorkflowInstance)=value


Script Designer Required AcceptedTypes Description
--instance Instance Required Workflow Instance Workflow instance that should be migrated to another version.
--workflow Target Workflow Version Required Workflow "Workflow" type variable from which the instance will be migrated.
This variable is generated through the Workflow parameter of the Load Workflow command.


Script Designer AcceptedTypes Description
value Migrated Instance Workflow Instance Returns the variable with the new version of the Workflow instance defined in the Target Workflow Version parameter.


The Migrate Workflow Version command migrates the defined instance to a new version by storing it in Workflow "workflowToMigrate".

defVar --name a --type Numeric --value 0
defVar --name workflow --type Workflow
defVar --name workflowInstance --type WorkflowInstance
defVar --name migratedWorkflow --type WorkflowInstance
defVar --name workflowToMigrate --type Workflow
// Download the following file to run the command.
loadWorkflow --isfromfile  --file "bpmnTestVar.bpmn" --process "Id_f12b1ed6-0ecd-4bf7-b245-9bf31b63e900" workflow=value
loadWorkflow --isfromfile  --file "bpmnTestVar.bpmn" --process "Id_f12b1ed6-0ecd-4bf7-b245-9bf31b63e900" workflowToMigrate=value
mapWorkflowActivities --workflow ${workflow} --mappings "Task_inc=beginSubroutine"
goSub --label beginSubroutine
// Create an instance using the Mapped Workflow ID.
createWorkflowInstance --workflow ${workflow} --businessstatus "In Progress" --businessstatusreason "Developing Script" workflowInstance=value
// Migrate an instance.
migrateWorkflowInstance --instance ${workflowInstance} --workflow ${workflowToMigrate} migratedWorkflow=value
logMessage --message "${migratedWorkflow}" --type "Info"
beginSub --name beginSubroutine
while --left "${a}" --operator "Less_Than" --right 5
incrementVar --number ${a}
Download File

To run the sample script, it is necessary to download the file and inform its path in the File parameter of the Load Workflow command.

See Also

  • Cancel Workflow Instance
  • Create Batch
  • Create Workflow Instance
  • End Batch
  • Execute Workflow Instance
  • Get Batch
  • Get the Next Workflow Instance
  • List Batches
  • List Workflow Instances
  • Load Workflow
  • Load Workflow Instance
  • Map Workflow Activities
  • Restart Workflow Instance
  • Start Batch
  • Suspend Workflow
  • Update Batch
  • Update Workflow Instance