Skip to Content

Calculate and log active time spent on a workflow step

Let’s calculate and log active time spent on a workflow step. To do so, the following rule should be added to transition rules.

To add the rule:

1. Select a workspace, select an application inside a workspace.

2. Create the required number of fields of the Date/Time type as in previous example.

3. Create several fields of the Duration type for logging active time of the required workflow steps.

You should reset your Duration and Date/Time fields before start using them. You can perform this operation on entering the start step of your workflow.

4. Click Form and drag all the created fields to the workflow task form.

5. Click Workflow.

6. Enter any transition settings and click the Pre-populate Fields tab.

7. Find the required field and type the following expression as the predefined rule:

 ADD($Step_Active_Time, SUBTRACT($$now, $Enter_Step))

This expression takes current time and time stamp was made on enter the step you just left (Enter_Step) and calculates the difference. Then adds the result to the current value of the Step_Active_Time field. If a workflow task is returned to the step, duration of repeated activity will be added to the current field value.

Repeat the steps 5-7 for each transition using appropriate field identifiers.

To check how the created rules work, create a new workflow task and move it through workflow.