Description:
This step generates a new ID value, using the start value as a reference for the first time and adding +1 to the last stored value in the degenerated table for a specific ID type. For example, the step generates a new value of 1001 if the previous value is 1000 and the ID Type is ATP.
Example:
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 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 the “generateID” step to configure its “Advanced” properties. Provide the ID start value. The step searches for the last numeric value for ID TYPE (e.g., ATP) in the degenerated 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. Suppose there's a last entry of the ID TYPE. In that case, the step generates the following value (ID) in sequence, assigns it to variable/global, and inserts a new record in the degenerated table.
- 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 in the images below. Configure the “Logging” using the following properties.
- Save the process definition, create a new instance, and execute. Render the process instance. Click on the process step to view its properties. The step should generate the following ID in sequence using the format configured.