Starts and executes a Workflow Instance

Last published at: May 2nd, 2023

Description:

Starts and executes a Process Instance.  

Inputs

  • definitionID--Definition to use
  • passVariables--Pass variables to new instance
  • passGlobals--Pass globals to new instance
  • variablesToPass--Select variables to pass to new instance 
  • globalsToPass--Select globals to pass to new instance
  • executionPriority--Select execution priority
  • instanceName--Name of the instance
  • variableToStoreID--Variable/Global to store instance ID 

Returns

  • True – step executed successfully
  • False – step failed to execute

Usage:

Example:

Let’s build and execute the createExecuteInstanceDef example.           

  • Create a new definition called “createExecuteInstanceDef
  • Select the definition and click the “design” button
  • Drag and connect the "createExecuteInstance" step to the canvas as shown in the above graphic
  • Define a process variable "variable.procInstID" as string to store the process instance ID
  • Click on the “createExecuteInstance” step to configure its properties as shown on the below graphic. Select the process definition from the dropdown list to use. Configure the variables / globals to pass to the new instance (not mandatory).
  • Select the variables to pass to the new instance. If there's no selection then all process variables from the source process instance is passed to the new target instance.   
  • Select the globals to pass to the new instance. If there's no selection then all global variables from the source process instance is passed to the new target instance. 
  • Configure the execution priority. Provide the name for the new instance. Provide the variable/global reference to store the instance ID.  
  • Save the process definition. Create a new process instance and execute. The process step should create and execute a process instance by the name, as configured. Navigate to Run - Process Instances page to view the new instance.  

  • Render the new process instance to view the variables and globals passed from the source process instance.