Task Observers

Task observers can register to be notified when a stage in the task instance lifecycle is reached. You register a task instance observer by adding its fully-qualified class name on the Observers tab of the Manual Task Activity properties. Your observer class must implement the TaskInstanceObserver interface or extend TaskActionReporter, which provides default no-op implementations for the interface methods.

Lifecycle Outcomes

An observer may be notified when the following lifecycle transitions occur for a task instance. See the documentation topic Task Actions for an explanation of the actions which may trigger these transitions.

Open Task instance is newly-created or becomes unassigned
Assigned Task instance has been claimed or assigned to someone
Failed Task instance has been failed due to a user performing the Abort action
Completed Task instance has been completed by a user performing the Complete action or a custom action
Cancelled Task instance has been cancelled by a user
In Progress Task instance has been flagged as being worked by a user
Alert Task instance is approaching its scheduled Due Date without having been completed
Jeopardy Task instance has passed its scheduled Due Date without having been completed
Hold Task instance has been placed on hold


Your registered observer receives the task instance ID as a parameter, and may use this value to retrieve data related to the task instance, such as the task name.

A very common use of task observers has been to send e-mail notices when a task lifecycle outcome has been reached. With MDW 4.2 the ability to send templated notifications is built in to the framework (see Task Notices).