Create the form instance

Last published at: May 2nd, 2023

Description:

Create a new form instance

Inputs

  • selectFormDefintions – Select a form definition
  • formInstanceName– name of the new form instance
  • formInstanceID -- Variable to hold the form instance ID
  • useSameForm - Use the same form (select Yes / No) 

Returns

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

Usage:

Example:

Let’s build and execute the instantiateFormDef example.          

  • Create a new definition called “instantiateFormDef
  • Select the definition and click the “design” button
  • Drag instantiateForm, RouteForm, Loop, Decision, Placeholder step from the toolbox
  • Connect the steps as shown on the below graphic 

  • Click on the “instantiateForm” step to configure its properties as shown on the below graphic. Select an existing form defintion. Define a variable/global to hold the form instance ID. The name of the form instance is optional and keep it blank if you intend to use the same form. Configure the same form option to Yes to retain the same form instance ID or select option No to instantiate new form instance ID, each time the step is processed.
  • Click on the "RouteForm" step to configure its properties as shown on the below graphic. Select the same form defintion. Select the variable/global which holds the form instance ID. Select the users to route the form to. The other step properties may be configured as necessary.    
  • Click on the "Loop" step to configure its properties as shown on the below graphic. Mention the loop value and the variable/global to hold it. Select the link connections and identify one as 'loop Returns' and the other as 'loop Completed'.  

  • Click on the "Decision" step to configure its properties as shown on the below graphic

  • Save the process definition, create a new process instance and execute. The instantiateStep should create new form instance ID each time or retain the same form instance ID as configured in the process flow above.