Description:
The LastStepDuration workflow step retrieves the duration of the last workflow step and stores the value in the specified Variable or Global variable.
The step supports:
- Retrieving the last step's duration.
- Storing the retrieved value in a Variable or Global variable.
- Using the stored value in subsequent workflow activities.
- Evaluating or processing the duration in later workflow steps.
- Returning a True or False result for subsequent workflow processing.
Inputs
- Variable/Global to store value - The Variable/Global to store value property specifies the Variable or Global variable in which the retrieved last-step-duration value should be stored.
Returns
- True - The True return path can be connected to the next workflow activity after the LastStepDuration operation returns True.
- False - The False return path can be used for an alternative workflow path or error-handling logic when the operation returns False.
Usage:
The LastStepDuration step is typically placed after another workflow activity when the workflow needs to retrieve and use the duration associated with the last step.
A typical workflow pattern is:
Execute Step → Get Last Step Duration → Use Duration
The retrieved value can then be made available to later workflow activities through the configured Variable or Global variable.

Typical Workflow Suggestions:
Store the Duration of a Processing Step
Use LastStepDuration immediately after a workflow activity when the duration needs to be retained for later use.
Example:
Process Data
|
v
Get Last Step Duration
|
v
Continue Workflow
Measure Processing Time
Use the step to capture the duration associated with a preceding processing activity.
Example:
Process Records
|
v
Get Last Step Duration
|
v
Store Duration
Evaluate Processing Performance
The stored duration can conceptually be passed to a later Decision step.
Example:
Process Data
|
v
Get Last Step Duration
|
v
Decision
/ \
Within Exceeded
Limit Limit
| |
v v
Continue Investigate
Record Workflow Performance Information
A workflow can store the duration for later reporting or analysis.
Example:
Execute Process
|
v
Get Last Step Duration
|
v
Store Duration
|
v
Generate Performance Report
Use Duration in Subsequent Processing
The stored value can be passed to a later workflow activity.
Example:
Execute Step
|
v
Get Last Step Duration
|
v
Use Stored Duration
|
v
Continue Process
Identify Long-Running Processing
A workflow can retrieve a step duration and use another activity to determine whether it exceeds an expected threshold.
Example:
Process Documents
|
v
Get Last Step Duration
|
v
Evaluate Duration
/ \
Normal Long
| |
v v
Continue Notify
Generate Performance Notifications
You can use the stored duration as input to a notification or reporting workflow activity.
Example:
Process Data
|
v
Get Last Step Duration
|
v
Evaluate Duration
|
v
Send Notification
Track Processing Duration Across Workflow Steps
Multiple processing activities can be followed by duration-capture steps when the workflow needs to retain timing information at different points.
Conceptually:
Process A
|
v
Get Last Step Duration
|
v
Process B
|
v
Get Last Step Duration
|
v
Continue
Compare Processing Duration Against a Business Threshold
A later Decision step can conceptually use the stored duration to control workflow routing.
Example:
Process Request
|
v
Get Last Step Duration
|
v
Decision
|
┌──┴──┐
True False
| |
v v
Normal Review
Process Performance
Store Duration for Later Reporting
Use the step as part of a reporting workflow.
Example:
Execute Workflow Activity
|
v
Get Last Step Duration
|
v
Store Performance Data
|
v
Generate ReportUse Duration for Workflow Monitoring
You can place the step after an activity whose execution duration you need to capture for monitoring.
Example:
Run Integration
|
v
Get Last Step Duration
|
v
Evaluate Result
|
v
Continue/Notify
Handle the Retrieved Value
The destination Variable or Global variable can be used by subsequent workflow activities.
A typical pattern is:
Get Last Step Duration
|
v
Store Duration
|
+----> Decision
|
+----> Report
|
+----> NotificationExample:
Let’s build and execute the “LastStepDurationDef” example:
- Create a new Process Definition named “LastStepDurationDef” and open it in designer mode.
- Drag the “Task, RouteForm, LastStepDuration” steps to the canvas.
- Connect the dots between the “Start” and other steps as shown in the usage image above.
- Select the line between the steps to configure the “Connection Properties”. The default property values are “None, True, False, Error, and Evaluate”. Depending on the step’s purpose, additional values are available for configuration.
- Define a few variables or globals to store the values.
- Click the "Task" step to configure its "Required" properties. Enter a name and a task description for the step. Select the “Optional” tab. Select the users to route the Task. Click the Save button. Note: Click the "AI Predict" button to have the Copilot add new process steps that match your process description.
- Click the "RouteForm" step to configure its "Required" properties. Enter a name and a task description for the step. Select the “Optional” tab. Select the users to route the Form. Click the Save button. Note: Click the "AI Predict" button to have the Copilot add new process steps that match your process description.
- Click the "LastStepDuration" step to configure its "Optional" properties. Provide a name. Provide a variable or global variable reference to store the last duration value. Click the Save button.

- The “Logging” configuration is necessary for documentation and also measures workflow progress and percent complete. Configure 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, and execute it. The process instance is rendered on a new page as shown below. The workflow waits at the task steps.

- The workflow tasks require manual completion.

- Render the process instance and click the Get last step duration step to view its properties. When the workflow reaches the LastStepDuration step, FlowWright retrieves the duration associated with the last step and stores the value in the configured Variable or Global variable. Verify:
- The configured Variable/Global destination.
- The workflow activity preceding LastStepDuration.
- The stored duration value.
- The True workflow path.
- The False workflow path.
- The use of the stored value in downstream activities.

Tips:
- Place the LastStepDuration step after the workflow activity whose duration needs to be retrieved.
- Configure a meaningful Variable or Global destination name.
- Verify that the destination Variable or Global is available when the step executes.
- Test the step with a representative preceding workflow activity.
- Verify the stored value after execution.
- Test both the True and False workflow paths.
- Use the stored duration consistently in downstream processing.
- If the duration is used in a Decision step, verify the expected value and comparison behavior before deployment.
- Use separate destination Variables when durations from multiple activities need to be retained independently.
- Document the purpose of Variables used to store performance-related values.
- Verify the stored value before using it in reporting or notification activities.
- Test workflows with activities having different execution characteristics.
- Avoid overwriting a duration value that is still required by downstream activities.
- Do not assume the unit of the returned duration unless confirmed by the FlowWright implementation.
- Do not assume the exact format of the stored duration value unless confirmed by the implementation.
- Do not assume how the step behaves when there is no preceding step or when the preceding step's duration cannot be retrieved unless confirmed by the implementation.
- Do not assume specific timing precision or rounding behavior unless confirmed by the implementation.
Definition Sample:
You may download and extract the sample process definition, form definition, and document templates, then import them by drag-and-drop into the FlowWright Process Definition (XML file) page.
After importing a sample, verify and complete any missing configuration, including:
- Variable/Global to store the value.
- Any workflow Variable references.
- The workflow activity preceding LastStepDuration.
- Downstream True workflow path.
- Downstream False workflow path.
- Any Decision or reporting activities that consume the stored duration.
- Environment-specific settings.
- Logging configuration.
After verifying the configuration, save the Process Definition before execution.
Click here to download the sample file.