Suspend Workflow

Verb: suspendWorkflow

Suspends the current Workflow instance that is being executed.

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.

Syntax

suspendWorkflow --instance(WorkflowInstance) (String)=value

Inputs

Script Designer Required AcceptedTypes Description
--instance Instance Required Workflow Instance Workflow instance that should be suspended.

Outputs

Script Designer AcceptedTypes Description
value Workflow Instance ID Text Returns the identifier of the suspended instance.
To continue the suspended instance, use the Load Workflow Instance command.

Example

The Suspend Workflow command suspends the Workflow instance previously created by the Create Workflow Instance command and returns the suspended instance identifier.

defVar --name mappedWorkflow --type Workflow
defVar --name a --type Numeric --value 0
defVar --name workflow --type Workflow
defVar --name workflowInstance --type WorkflowInstance
defVar --name instanceId --type String
defVar --name idInstancia --type String
// Download the following file to run the command.
loadWorkflow --isfromfile  --file "bpmnTestVar.bpmn" --process "Id_f12b1ed6-0ecd-4bf7-b245-9bf31b63e900" workflow=value
mapWorkflowActivities --workflow ${workflow} --mappings "Task_inc=beginSubroutine" mappedWorkflow=value
goSub --label beginSubroutine
// Create an instance using the Mapped Workflow ID.
createWorkflowInstance --workflow ${workflow} --businessstatus "In Progress" --businessstatusreason "Developing Script" workflowInstance=value
// Suspend the instance
suspendWorkflow --instance ${workflowInstance} idInstancia=value
logMessage --message "${instanceId}" --type "Info"
beginSub --name beginSubroutine
	while --left "${a}" --operator "Less_Than" --right 5
		incrementVar --number ${a}
	endWhile
endSub
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
  • Migrate Workflow Version
  • Restart Workflow Instance
  • Start Batch
  • Update Batch
  • Update Workflow Instance