clsGenerateID step
Description:
The Generate ID step enables a FlowWright workflow to generate an identifier based on the selected ID generation type.
Many business processes require unique identifiers for business records, transactions, documents, requests, cases, assets, or integration messages. Instead of manually constructing identifiers, this step automatically generates the next available identifier and makes it available to the workflow.
The step allows the workflow designer to specify the type of identifier to generate, optionally provide an initial starting value, and store the generated identifier in a workflow variable or global variable. The generated value can then be reused throughout the workflow for naming documents, assigning reference numbers, creating business records, or communicating with external systems.
Typical uses include:
- Generating request numbers
- Creating case identifiers
- Assigning document reference numbers
- Creating invoice numbers
- Generating purchase order identifiers
- Producing integration transaction IDs
- Creating customer reference numbers
- Assigning workflow tracking numbers
This step enables organizations to automate identifier generation while ensuring consistent numbering across workflow processes. This step generates a new ID value by using the start value as a reference the first time and adding +1 to the last stored value in the generated 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 CHECK.
The Generate ID step is typically used near the beginning of a workflow before creating business records, generating documents, or communicating with external systems.
During execution:
- Read the configured ID generation type.
- If specified, apply the configured starting value.
- Generate the next identifier according to the selected ID type.
- Store the generated identifier in the configured workflow variable or global variable.
- Continue workflow execution through either the True or False return path.
A typical workflow might look like this:

Typical workflow scenarios include:
- Creating customer request numbers
- Generating invoice identifiers
- Assigning purchase order numbers
- Producing workflow tracking IDs
- Creating document reference numbers
- Assigning asset identifiers
- Generating support ticket numbers
- Creating integration transaction identifiers
Example:
Let’s build and execute the “generateIDDef” example:
- Create a new process definition named “generateIDDef” and open it in Designer mode.
- Drag a “generateID” step to the canvas.
- Connect the dots between the “Start” step and “generateID” steps, as shown above.
- Define a variable or a global to store the result.
-
Click the “generateID” step to configure its “Required” properties. Provide a name for the step, the ID text value, and a variable or global to store the result. Click the Save button. Note: Click the "AI Predict" button for the Copilot to add new process steps that match your process description.

- Click the “generateID” step to configure its “Optional” properties. Provide the ID start value. The step searches for the last numeric value for ID TYPE (e.g., CHECK) in the degenerated table. If there's no previous value, the step creates a new record for the ID TYPE and assigns the same value (00001) to the variable or global referenced above. If there's a last entry for the ID TYPE, the step generates the next value (ID) in sequence, assigns it to a variable or global referenced above, and inserts a new record into the degenerated table. Click the Save button.

- The “Logging” configuration is necessary for documentation and also measures workflow progress and percent complete. This is achieved by configuring the step state and percent fields individually, as shown below. Configure the “Logging” using the following properties.

- Save the process definition, create a new instance, execute it, and then render the process instance.

- Click the process step to view its properties. The step should generate the following ID in sequence, using the configured format.

Tips:
- Select the appropriate ID generation type for the business process.
- Use an ID Start Value only when initializing a new numbering sequence or when business requirements specify a starting value.
- Store the generated identifier in a global variable if multiple workflow branches will use the value.
- Generate identifiers early in the workflow so they can be referenced consistently by downstream activities.
- Route the False execution path to logging and notification activities for easier troubleshooting.
- Combine this step with Create Form Instance, Insert Database Record, Generate PDF, Send Email, Store File into DB, or integration steps to maintain consistent business identifiers throughout the workflow.
Notes:
- The step generates an identifier based on the selected ID generation type.
- The Enter ID Type property is required.
- The Variable/Global to Store Next Value property is required.
- The ID Start Value property is optional.
- The generated identifier is returned through the configured workflow variable or global variable.
- Both the True and False return paths should be implemented for complete workflow handling.
- Ensure that the selected ID generation type is configured appropriately for the business process.
Generate ID vs. Update Variable Values:
Although both workflow steps produce values that can be used by later workflow activities, they serve different purposes.
| Generate ID | Update Variable Values |
|---|---|
| Generates a new identifier during workflow execution. | Updates one or more workflow variables or global variables with specified values. |
| Creates a new value based on the selected ID generation type. | Assigns values without generating sequential or configured identifiers. |
| Optionally supports a starting value for ID generation. | Does not generate IDs or maintain numbering sequences. |
| Returns the generated identifier through a workflow variable or global variable. | Updates existing workflow variables directly. |
| Used for business reference numbers, tracking IDs, and transaction identifiers. | Used for general workflow data manipulation and variable assignment. |
As a general guideline:
- Use Generate ID when workflows require unique identifiers, business reference numbers, transaction IDs, or tracking numbers.
- Use Update Variable Values when workflows simply need to assign or modify workflow variables without generating new identifiers.
Definition Sample:
You may download the sample workflow definition from the link provided and import it into your FlowWright environment.
Note: Verify and complete any missing configuration after importing the sample, including:
- ID generation type
- Optional ID start value
- Variable/Global to store the generated identifier
- Success and failure workflow branches
After verifying the configuration, save and publish the workflow before execution.
Click here to download the sample file.