clsDynamicStepBuilder Step

Use this tep to create serial or parallel steps dynamically, during run-time.

Last published at: July 27th, 2024

Description:

This step creates dynamic serial or parallel steps based on the schema during runtime.

 

Inputs

  • dynamicType – Select dynamic type
  • varGlobalStepData – Variable / Global holding dynamic step data
 

 

Returns

  • true  – true condition
  • false – false condition
 

 

Usage:

 

 

Example:

Let’s build and execute the clsDynamicStepBuilderDef example.

  • Create a new definition called “clsDynamicStepBuilderDef.”
  • Select the definition and click the “design” button
  • Drag the above steps to the canvas
  • Connect the dots between the start and other steps as above
  • Click the “updateGlobals” step to configure its “Settings” properties. Provide a step name. 

 

  • Click the “updateGlobals” step to configure its “Advanced” properties. Click on the button to update multiple globals. A popup window is displayed as below. Provide a global reference and the step data as a global value. Select YES for the “Has Expression” if you're providing any C# expression as a global value. Click the Save button to confirm. 

 

  • The global value contains the dynamic step data.
 PHN0ZXBEYXRhPgo8ZmlndXJlIGlkPSIxZWRmNDRiYy0yZjg2LTE4M2QtNWQyMC1lYmUxNDZhYzU1YzEiIG5hbWU9IlNhbGVzIGFwcHJvdmFsIiB0eXBlPSJ0YXNrIiB4PSIwIiB5PSItOTIwIiBpc1ZhbGlkPSJ0cnVlIj4KICA8cHJvcGVydGllcz4KICAgIDxwcm9wZXJ0eSBuYW1lPSJpdGVtTmFtZSI+U2FsZXMgYXBwcm92YWw8L3Byb3BlcnR5PgogICAgIDxwcm9wZXJ0eSBuYW1lPSJ0YXNrRGVzYyI+U2FsZXMgYXBwcm92YWw8L3Byb3BlcnR5PgogICAgPHByb3BlcnR5IG5hbWU9ImRheXNUb0NvbXBsZXRlIj41PC9wcm9wZXJ0eT4KICAgIDxwcm9wZXJ0eSBuYW1lPSJleHBpcmVUeXBlIj5taW51dGVzPC9wcm9wZXJ0eT4KICAgIDxwcm9wZXJ0eSBuYW1lPSJpbmNsdWRlV2Vla2VuZHMiPjE8L3Byb3BlcnR5PgogICAgPHByb3BlcnR5IG5hbWU9InJvdXRlVG8iPjQ2ZWNiNGRhLWQ3ZjEtNGM3Mi1iYjM3LTI2MjZmM2Y0M2Y2MzwvcHJvcGVydHk+CiAgPC9wcm9wZXJ0aWVzPgo8L2ZpZ3VyZT4gIAo8ZmlndXJlIGlkPSIxZWRmNDRiYy0yZjg2LTE4M2QtNWQyMC1lYmUxNDZhYzU1YzEiIG5hbWU9IkZpbmFuY2UgYXBwcm92YWwiIHR5cGU9InRhc2siIHg9IjAiIHk9Ii05MjAiIGlzVmFsaWQ9InRydWUiPgogIDxwcm9wZXJ0aWVzPgogICAgPHByb3BlcnR5IG5hbWU9Iml0ZW1OYW1lIj5GaW5hbmNlIGFwcHJvdmFsPC9wcm9wZXJ0eT4KICAgICA8cHJvcGVydHkgbmFtZT0idGFza0Rlc2MiPkZpbmFuY2UgYXBwcm92YWw8L3Byb3BlcnR5PgogICAgPHByb3BlcnR5IG5hbWU9ImRheXNUb0NvbXBsZXRlIj4xMjwvcHJvcGVydHk+CiAgICA8cHJvcGVydHkgbmFtZT0iZXhwaXJlVHlwZSI+bWludXRlczwvcHJvcGVydHk+CiAgICA8cHJvcGVydHkgbmFtZT0iaW5jbHVkZVdlZWtlbmRzIj4xPC9wcm9wZXJ0eT4KICAgIDxwcm9wZXJ0eSBuYW1lPSJyb3V0ZVRvIj40NmVjYjRkYS1kN2YxLTRjNzItYmIzNy0yNjI2ZjNmNDNmNjM8L3Byb3BlcnR5PgogIDwvcHJvcGVydGllcz4KPC9maWd1cmU+IAo8L3N0ZXBEYXRhPg==

 

  • Extract the Step information from any process definition XML (like below) and convert that to Base64 to use as Step data (like above). 
<stepData>
<figure id="1edf44bc-2f86-183d-5d20-ebe146ac55c1" name="Sales approval" type="task" x="0" y="-920" isValid="true">
<properties>
<property name="itemName">Sales approval</property>
<property name="taskDesc">Sales approval</property>
<property name="daysToComplete">5</property>
<property name="expireType">minutes</property>
<property name="includeWeekends">1</property>
<property name="routeTo">46ecb4da-d7f1-4c72-bb37-2626f3f43f63</property>
</properties>
</figure>  
<figure id="1edf44bc-2f86-183d-5d20-ebe146ac55c1" name="Finance approval" type="task" x="0" y="-920" isValid="true">
<properties>
<property name="itemName">Finance approval</property>
<property name="taskDesc">Finance approval</property>
<property name="daysToComplete">12</property>
<property name="expireType">minutes</property>
<property name="includeWeekends">1</property>
<property name="routeTo">46ecb4da-d7f1-4c72-bb37-2626f3f43f63</property>
</properties>
</figure> 
</stepData>

 

  • Click the “clsDynamicStepBuilder” step to configure its “Settings” properties. Provide a step name. Select the dynamic type from the list (either parallel or serial). Provide the global reference with the dynamic step data value. Click the Save button to confirm. 

 

  • 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. Render the process instance. Click on the process step to view its properties. The step creates dynamic serial or parallel steps based on the schema during runtime.