persistProcessInstance Step

Use this step to persist the process instance to the database

Last published at: July 27th, 2024

Description:

This step in the workflow persists the process instance to the database. By design, the process instance persists automatically to the database when the instance status is Sleeping, Error, ErrorWait, Aborted, and Completed. This step allows the process instance to persist to the database on demand.

 

Inputs

  • None
 

 

Returns

  • None
 

 

Usage:

 

 

Example:

Let’s build and execute the persistProcessInstanceDef example.                             

  • Create a new definition called “persistProcessInstanceDef.”
  • Select the definition and click the “design” button
  • Drag the “UpdateVariables,” “subWorkflow,”  “persistProcessInstance,”, “executeSQL”,  and “getXMLValue” steps to the canvas. 
  • Connect the dots between the start and other steps, as shown in the above image 
  • Define a few variables/globals to store the file path result after execution
  • Configure the process steps with the necessary values 
  • Save the process definition, create a new instance, and execute. This “persistProcessInstance” step persists the current instance to the database as configured. 
  • In this example, the process instance values from the Start step till the “persistProcessInstance” step are recorded to the database. This step makes it possible when the current instance is still not completed. 
  • On the process instance page, select the current process instance and navigate to the View—History menu option. The instance history, including the persistence to the database event, is displayed in a table on a new page.