Designer 10.15 | webMethods BPM Task Development Help | Processing Task Change Events | Typical Use of Task Change Events
 
Typical Use of Task Change Events
You can subscribe to these events and receive them in your application using CustomTaskChangeHandler. For example, suppose a user wants to store all the tasks in a custom data store for analysis. To do so, the user can first subscribe to task change events and listen to the events that contain all the information about the tasks. Then, this API can be used to extract the required information from the events and insert it into their custom data store.
The events can be subscribed by implementing the ICustomTaskEventSubscriber interface:
com.webmethods.portal.mech.task.impl.CustomTaskChangeHandler.ICustomTaskEventSubscriber
This interface contains two methods:
*getDescription() This returns a string that can be used to describe the subscriber (for usability only).
*deliver(ITaskChangedEvent) This method is called for each ITaskChangedEvent.
The subscribers are registered and maintained using CustomTaskChangeHandler:
com.webmethods.portal.mech.task.impl.CustomTaskChangeHandler
Which contains these methods:
*addSubscriber(ICustomTaskEventSubscriber) Adds the passed subscriber, and begins delivering events.
*removeSubscriber(ICustomTaskEventSubscriber) Stops event delivery and removes the subscriber.
*ICustomTaskEventSubscriber[] getSubscribers() Returns an array of all the current ITaskChangedEvent subscribers (for usability only).
For more information about these components, refer to the webMethods CAF and My webMethods Server Java API Reference.
Related Topics