Creating automatic tasks
Users can create an automatic task that polls a specified field on a specified form (the TMS:SampleApprovalForm is provided out-of-the-box) to see if approval has been obtained. (If the field on the form is not NULL, approval has been obtained). The automatic task created is closed after the approval is obtained (Status = Closed and Status Reason = Success).
After the automatic task is instantiated and becomes active, an initial check is done to see if approval has been obtained. Approval checking is done through filters that set zTmpExecuteTask to CHECKAPPROVAL on the Task form. At the same time, the AutomaticIntervalTime is also set based on the Automatic Interval and Unit fields from the Task Template form.
Approval is obtained, the task is closed and the AutomaticIntervalTime is set to NULL.
If approval is not obtained, an escalation (TMS:TAS:GetDataInterval) is sent every fifteen minutes to check if the AutomaticIntervalTime is greater than (or equal to) the current time. If it is, the escalation sets zTmpExecuteTask = CHECKAPPROVAL on the Task form, which starts the approval checking process. This is repeated until approval is obtained or the task times out (time out values must be set on the Task Template form for the time out to occur).
The example used in the following procedure is provided out of the box for BMC Change Management 7.x.
To use automatic tasks in a change request
- Create a change request.
- Click the Tasks tab.
- Choose the Task Template request type, and then click Relate.
- Relate the Check Approval automatically task template to the change request.
- Use the Process Flow Status bar to work the change request to the Implementation In Progress status.
The status of the task is set to Waiting.
- Open the Sample Task Approval form and search for the sample approval record.
- Update the record (for example, In the Approved By field, enter your name).
- Wait at least 15 minutes until the TMS:TAS:GetDataInterval escalation fires.
This escalation checks the Automatic interval.
- Refresh the change request until the status of the task is set to Closed.