Generates a new 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.
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
- Click on the “generateID” step to configure its properties as shown on the below graphic
- 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.
- 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.