Starts and executes a Workflow Instance

Use this step to start and execute a process instance.

Last published at: July 12th, 2023

createExecuteInstance Step

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 variable/global to store the process instance ID after execution
  • Click on the "createExecuteInstance" step to configure its "Settings" properties. Provide a name to the step. 

 

  • Click on the "createExecuteInstance" step to configure its "Advanced" properties. Select the process definition from the drop-down list. Select if variables and globals must be passed to the new process instance. Provide specific variables to be passed instead of passing all variables to the new process instance (separate by a comma). Select execution priority from the drop-down list (low, medium, high).  Select the execution interval type from the drop-down list (days, months, hours, minutes). Note: Configuring the execution interval for a few minutes is recommended when executing this process step in a loop. Provide specific globals to be passed instead of passing all globals to the new process instance (separate by comma). Provide a name for the new process instance. Provide execute interval value in time. Provide variable/global reference to hold new process instance ID. 

 

  • The “Logging” setting configuration is necessary for documentation and also measures the workflow progress and the percent complete. This is achieved by configuring the step state and percent fields individually, as shown in the images below. Configure the “Logging” using the following properties.

 

  • Save the process definition. Create a new process instance and execute it. The process step should create and execute a process instance by the name, as configured. Navigate to the Run—Process Instances page to view the new instance.  

 

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

 

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

 

Definition Sample:

You may download the sample definition(s) from the link here and later import it (drag-drop) to your FlowWright Process Definition (XML file) or Form Definition (HTML file) page.

NOTE: Please verify and complete the process steps for any missing configurations, such as file path references and database connections after import. Then, save the definition to confirm the changes.

Click here to download the sample file.