Task Engine 10.7 | Task Engine Webhelp | webMethods Task Engine User's Guide | Task Expression Reference | About Global Rule Expressions | Expressions for Default Global Rules | Delete a Task Rule
 
Delete a Task Rule
This rule deletes a task in Completed, Cancelled, Expired, or Error status after a specified period of time defined by the keepDays parameter. The rule evaluates the keepDays value based on the time since the task was last modified. This rule is evaluated once per day. The default value for keepDays is 30.
The condition #{currentTaskExtended.processArchived} specifies that the task is allowed to be deleted if the business process owning a task is archived. This condition checks the Process Audit database schema for the presence of the process that owns the task.
Condition expression:
(["completed", "cancelled", "expired", "error"] contains
#{currentTask.taskInfo.status}) && (#{currentTaskExtended.processArchived})
&& keepDays
Result expression:
#{currentTask.deleteTask}