Workflows create tasks. These tasks are created using the specifications in workflow steps.
Tasks and time
Tasks have the following model of time:
Workflow steps and time
The start, reminder and due dates of a workflow-generated task are calculated using the settings at the workflow step it is linked to:
- The task's activation date is the date it was created. The activation date is usually the completion date of the parent task (i.e. the previous, connected task).
- If the step has no lag time, the task's start date is the same as its activation date.
- If set, a reminder appears at the task's reminder date, which is calculated as the due date minus the lead time.
- The task's due date is calculated as the start date plus the duration.
See Activation dates below for more details.
Some examples, using only hours for simplicity are:
To understand activation dates we can look at the first two steps of a simple workflow template:
For the task created from the first step (1), the parent task is the workflow template itself.
The template is activated when its trigger (change in state) is detected.
The first task's activation date is usually (but not always) the template's activation date. See below for further details on the template activation date for the first task.
For task 2, the parent task is the previous task in the sequence (1). Its activation date is task 1's completion date.
Similarly, the third task's activation date would be task 2's completion date, and so on.
Once you have understood these concepts, it is important to read Time and workflows - advanced concepts.
This may be the Trigger date (actual template activation date) or a date taken from the case such as its:
- Referral date
- Date closed
- Date opened
- Condition date
This depends on what was set for the trigger at its Date type field.
When the activation date is the Trigger date the time is set to the time that the trigger occurs. For the other options the time is set to the start of the business day, see below.
The completion date of a task can be any time after its start date, including after its due date.
It can even be before the start date if the setting that allows tasks to be completed prior to their start date+time is turned on
Days in the workflow system are business days, i.e. Monday to Friday. The workflow settings specify what time days start and finish.
For example, if the working day is set to 9am-5pm and a task is generated at 5:05pm, its start date becomes 9am the following morning. If the following day is a Saturday or Sunday, the start date is 9am the following Monday.