clsgenerateid step

Use this step to generate a new ID value.

Last published at: December 5th, 2023


This step generates a new ID value, using the start value as reference for first time, adding +1 to the last stored value in deGenerateID table for a specific ID type. For eg. the step generates new value 1001, if the previous value is 1000 and ID Type is ATP.  


  • idType – Provide a string (for eg. ATP)
  • idStartValue (optional) – Provide numeric start value (for eg. 12350) to create for first time or leave it empty for subsequent use
  • varGlobalNextValue –Variable / Global to store the next value generated (using start value as reference and adding +1 to last stored value in the deGenerateID table for the idType)



True – step executed successfully 
False - step failed to execute 







Let’s build and execute the “generateIDDef” example:

  • Create a new definition called “generateIDDef” 
  • Select the definition and click the “design” button
  • Drag a “generateID” step to the canvas
  • Connect the dots between the start and “generateID” step
  • Define a variable/global to store the result after execution
  • Click on the “generateID” step to configure its “Settings” properties. Provide a name to the step. Provide the ID text value. Provide a variable/global to store the result. 
  • Click on the “generateID” step to configure its “Advanced” properties. Provide the ID start value. The step searches for last numeric value for ID TYPE (eg. ATP) in deGenerateID table. The step creates a new record for the ID TYPE when there's no previous value and assigns the same value  (12350) to the variable/global in the above reference. If there's a previous entry of the ID TYPE, the step generates the next value (ID) in sequence, assigns it to variable/global and inserts a new record in deGenerateID table.   
  • The “Logging” setting configuration is necessary for documentation and also measure the workflow progress and the percent complete. This is acheived 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 process instance and execute.  The step should generate an unique ID for the type. Navigate to Process Instances and render the instance to view the generated ID.