Determining duration, due date, and overdue periods
In Business Process Server, you typically specify the duration of a process or a workstep when you create the process or add the workstep to a process template. Duration is defined as the period of time you anticipate it takes to complete the process or workstep. Due date is calculated by adding the duration of the process or workstep to the time the process or workstep is actually activated (It is also possible, however, for the client to set a specific due date by invoking the appropriate BP Server APIs). When the duration is not specified, the due date of an activated workstep is set to 'activation time of Workstep + 2 hours' and due date of an activated process is set to 'activation time of process + 1 day'.The Overdue period starts when the due date is passed.
To determine the period of time that a process instance or workstep instance has been running:
For a process instance, inorder to obtain the period of time that a process instance has been running, read the value of start time by calling getStartTime() API against the 'ProcessInstance' object and compare it to the current system time.
For a workstep instance, obtain the start time by calling getStartTime() API against the WorkStepInstance object and compare it to the current system time.
To determine the period of time remaining before a process instance or workstep instance becomes overdue, obtain the due date through the getDueDate() API against the ProcessInstance or WorkStepInstance objects and compare it to the current system time.