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.

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 item form.

5. Click «Workflow Scheme».

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

7. Find the required field and click «Set Value».

8. Type the following rule expression, which will be applied on transition execution:

 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 item is returned to the step, duration of repeated activity will be added to the current field value.

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

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