This section describes how you can specify escalations for human tasks. It covers how you can
To add an escalation to a human task, perform the following steps:
The escalation has been added:
To specify the escalation properties, perform the following steps:
To add an escalation to an escalation chain, perform the following steps:
The escalation has been added:
To add a parallel escalation, perform the following steps:
The escalation has been added:
Instead of specifying the time for an escalation as constant string at modeling time, for example 30minutes
or 1hours
, with WebSphere Process Server 6.0.1.3 and later versions you can instead use a variable which is evaluated at runtime. This variable is supposed to contain a valid time specification at the time where the escalation is evaluated (for repeated escalations: at the time where the escalation is evaluated the first time).
To specify the escalation time dynamically, perform the following steps:
myEscalationTime
.%htm:input.\yourVariableName%
, in this example %htm:input.\myEscalationTime%
.BPC offers a system programming interface that allows for plugging in custom notification event handlers. These event handlers must implement the com.ibm.task.spi.NotificationEventHandlerPlugin
interface. A reference to this event handler must be declared at the task-level. This reference points to a file in the META-INF
directory of your application, in which the implementation class is listed. This section will guide you through the steps you must perform to specify your own notification event handler.
You can package the implementation class of the com.ibm.task.spi.NotificationEventHandlerPlugin
into the same application as your human task, or you can put it into a dependent utility project. This section describes, how you add the notification event handler implementation class to the same application as the human task.
To create a notification event handler implementation, perform the following steps:
The New Java Class wizard opens:
The Implemented Interfaces Selection window opens:
notif
'. This activates the Matching types list.The NotificationEventHandlerPlugin
interface has been added:
escalationNotification
method.The following code snippet shows the implementation of the escalationNotification
method for this sample:
public void escalationNotification(Task task, Escalation escalation) {
System.out.println("--- Notification event received: " + DateFormat.getDateTimeInstance().format( new Date(System.currentTimeMillis())));;
if(task != null)
{
System.out.println("Task template name: " + task.getTaskTemplateName());
System.out.println("Task name: " + task.getName());
System.out.println("Event handler name: " + task.getEventHandlerName());
System.out.println("Is escalated: " + task.isEscalated());
}
else
{
System.out.println("Task is null");
}
System.out.println("Notification event received.");
if(escalation != null)
{
System.out.println("Escalation name: " + escalation.getName());
System.out.println("Duration until escalated: " + escalation.getDurationUntilEscalated());
System.out.println("Duration until repeated: " + escalation.getDurationUntilRepeated());
}
else
{
System.out.println("Escalation is null");
}
System.out.println("--- End notification event");
}
To declare an notification event handler for your task, perform the following steps:
To add your plugin to your application, perform the following steps:
'services'
.The New File window opens.
com.ibm.task.spi.<EventHandlerName>NotificationEventHandlerPlugin
.<EventHandlerName>
is the event handler name you have specified for your task.To specify an escalation with a notification type 'Event', perform the following steps: