Developing event handlers for human task events

You can create plug-ins for human task API events and escalation notification events.

Before you begin

To work with the events that occur when a task is processed, you must specify the event handler name in the task model.

Why and when to perform this task

You can create the following types of event handlers for human task events:
Notification event handler
To create an event handler for escalation notifications, you must implement the com.ibm.task.spi.NotificationEventHandlerPlugin interface.
API event handler
To create an event handler for human task events, you must implement the com.ibm.task.spi.APIEventHandlerPlugin interface.

Steps for this task

  1. Implement the event handler as a JAR file.
    The JAR file requires the following:
    • A class that implements the event handler interface. For example, com.ibm.task.spi.NotificationEventHandlerPlugin for notification events or com.ibm.task.spi.APIEventHandlerPlugin for API events. For example:
      package com.ibm.task.spi ;
      
      public interface NotificationEventHandlerPlugin
      { 
         public void interFaceMethod(Param param) ;
         :
      }
    • In the JAR file, you must have a property file in the directory META-INF/services/ directory with the following file name: com.ibm.task.spi.%identifier%%type%EventHandlerPlugin, where %identifier% is the event handler name that is specified in your model, for example, MyEventHandler, and %type% is the event type (either Notification or API).
      The first line of this file that is neither a comment line nor a blank line must specify the name of the plug-in implementation. For example, the META-INF/services/com.ibm.task.spi.MyEventHandlerNotificationEventHandlerPlugin file might contain the line
      myevents.EventHandlerImplementation
  2. Make the JAR file available to applications.
    • If you want the event handler to be used by only one Java™ 2 Enterprise Edition (J2EE) application, you can include the JAR file in the application EAR file.
    • If you want several applications to use the event handler, consider putting the JAR file in a WebSphere® Application Server shared library. You can then explicitly associate the library with the applications that need access to the event handler.

    The event handler handles human task events that occur within the application.

Related information
About tasks and escalations

Terms of use |

Last updated: Thu Apr 27 14:54:58 2006

(c) Copyright IBM Corporation 2006.
This information center is powered by Eclipse technology (http://www.eclipse.org)