
Whenever you need to specify a processing time for a notification instance, you create a deadline. It can be:
DEADLINE_ABSOLUTE_POINT
DEADLINE_FROM_ACTION_START
DEADLINE_FROM_PROCESS_START
Creating an Absolute Deadline
For this type of deadline, you need to specify an exact deadline date. You should not provide duration:
importcom.sap.caf.eu.gp.process.rt.notification.api.GPNotificationFactory; importcom.sap.caf.eu.gp.process.api.IGPDeadline; //Create a deadline in one hour IGPDeadlinedeadline = GPNotificationFactory.createDeadline( IGPDeadline.DEADLINE_ABSOLUTE_POINT, null, 0, System.currentTimeMillis() + 10*1000*60*60 ); |
Creating a Deadline with Duration
importcom.sap.caf.eu.gp.process.rt.notification.api.GPNotificationFactory; importcom.sap.caf.eu.gp.process.api.IGPDuration; // create a duration of one hour IGPDurationduration = GPNotificationFactory.createDuration( 1, IGPDuration.DURATION_HOUR ); |
You can choose from the following duration types:
DURATION_MINUTE
DURATION_HOUR
DURATION_DAY
DURATION_WEEK
DURATION_MONTH
DURATION_YEAR
This time, specify duration and a start date from which the deadline can be calculated:
importcom.sap.caf.eu.gp.process.api.IGPDeadline; // create a deadline with duration one hour (start date is current system time) IGPDeadlinedeadline2 = GPNotificationFactory.createDeadline( IGPDeadline.DEADLINE_FROM_PROCESS_START, duration, System.currentTimeMillis(), 0 ); |
You may use the deadlines you have created to update the processing time information of notification instances. For more information, see Updating Notification Processing Time and Status .