if(dueDate.getTime() > getBpelRuntimeContext().getCurrentEventDateTime().getTime()) {
final TimerResponseChannel timerChannel = newChannel(TimerResponseChannel.class);
getBpelRuntimeContext().registerTimer(timerChannel, dueDate);
object(false, new TimerResponseChannelListener(timerChannel){
private static final long serialVersionUID = 3120518305645437327L;
public void onTimeout() {
_self.parent.completed(null, CompensationHandler.emptySet());
}
public void onCancel() {
_self.parent.completed(null, CompensationHandler.emptySet());
}
}.or(new TerminationChannelListener(_self.self) {
private static final long serialVersionUID = -2791243270691333946L;
public void terminate() {
_self.parent.completed(null, CompensationHandler.emptySet());
object(new TimerResponseChannelListener(timerChannel) {
private static final long serialVersionUID = 677746737897792929L;
public void onTimeout() {
//ignore
}