
You can update existing process notification instances at runtime by changing their processing time and status.
The processing time is represented by a deadline, which can be an exact date set in time, or duration related to some starting point (action or process start). For more information, see Creating Deadlines and Durations .
For more information, see Setting Up Your Project .
For more information, see Creating Deadlines and Durations .
importcom.sap.caf.eu.gp.process.rt.notification.api.IGPNotificationInstance; importjava.util.Enumeration; // get all notification instances of a process Enumerationnotifications = process.getNotificationInstanceEnumeration(); // retrieve a single notification instance IGPNotificationInstancenotification = null; while(notifications.hasMoreElements()) {notification = (IGPNotificationInstance) notifications.nextElement(); } |
For more information, see Retrieving Process Notification Instances .
Depending on the update operation you want to perform, you may need to know certain notification instance attributes in advance, for example, notification ID, process ID, whether it is a due date notification, and so on.
importcom.sap.caf.eu.gp.process.api.IGPDeadline; //get relevant attribute information, for example: StringprocessInstanceID = notification.getProcessInstanceID(); StringnotifID = notification.getNotificationID(); booleandueDate = notification.isDueDateNotification(); longcreateDate = notification.getCreationDate(); IGPDeadlinedeadline = notification.getDeadline(); ...
|
NOTIFICATION_STATUS_WAITING
You can choose from the following notification statuses:
NOTIFICATION_STATUS_DEPRECATED
NOTIFICATION_STATUS_EXECUTED
NOTIFICATION_STATUS_CANCELLED
NOTIFICATION_STATUS_ERROR
// update the status - cancel the notification notifManager.updateNotificationStatus( processInstanceID, activityID, notifID, IGPNotificationInstance.NOTIFICATION_STATUS_CANCELLED ); |
NOTIFICATION_STATUS_DEPRECATED
importcom.sap.caf.eu.gp.process.rt.api.IGPNotificationManager; // update the notification instance with a new deadline notifManager.updateNotification( processInstanceID, activityID, notifID, deadline ); |