Set a due date for a workflow process
An example of how a date can be stored and used across multiple steps to represent the due date for all of the steps in a workflow process.
Scenario
When an invoice enters an approval workflow, the entire approval process must be completed within 2 days. In this situation, it is not important how long a document sits on each step in the process, it just matters that all the steps are completed within the two days after the document enters the workflow.
Workflow design and configuration
When a document is routed for approval, the first step is a custom action that will determine the date and time that the document started into the workflow. In this example, 2 days is added to this date and time to determine the due date for the document in the process. This interval can be changed in the VB Script by exchanging the "2" with a different number. This due date is then stored in a variable labeled "rtduedate" in the context of the unique route path for that document. To use this due date, each following user step in the workflow will need to be an Assignable step type. The Assignable step type allows the Due Date for the step to be set using VB Script to call the "rtduedate" variable. Below is the script that is used in the VB Script term:
VB Script: DateAdd("d",2,Now())
After the document moves through the Set Due Date custom action stencil, it moves to the "Examine" step which is an Assignable step type. In this stencil, it is configured as a standard single user type of step. On the Step Information tab in the Due Date area, the VB Script term is used to call the "rtduedate" variable which contains the due date for the process. Below is the script that is used in the VB Script term:
VB Script: "{RoutePath.rtduedate}"
When the "Send for Approval" button is clicked, the document is then moved to the "Approve" step which is configured exactly like the Examine step. This step will have the exact same due date as the Examine step.
See Set a due date for a workflow process using only business days for an example that uses only Business Days for due dates.
Setting the Due Date in a Variable
Using the Variable to recall the Due Date
Menu