public EventListenerReference createEventListenerReference(Descriptor descriptor) { EventListenerReference eventListenerReference = createEventListenerReference(); eventListenerReference.setDescriptor(descriptor); return eventListenerReference; }
public EventListenerReference createEventListenerReference(EventListener eventListener) { EventListenerReference eventListenerReference = createEventListenerReference(); eventListenerReference.set(eventListener); return eventListenerReference; }
public EventListenerReference createEventListenerReference(String expression) { EventListenerReference eventListenerReference = createEventListenerReference(); eventListenerReference.setExpression(expression); return eventListenerReference; }
/** adds an action to the current event. The current event was either * created by {@link #event(String)} or by a {@link #transition()}. * Subsequent invocations of {@link #exceptionHandler(Class)} will * be associated to this event listener. */ public ProcessFactory listener(EventListener eventListener) { if (exceptionHandler!=null) { exceptionHandler.createEventListenerReference(eventListener); } else { eventListenerReference = getEvent().createEventListenerReference(eventListener); } return this; }
/** adds an action to the current event. The current event was either * created by {@link #event(String)} or by a {@link #transition()}. * Subsequent invocations of {@link #exceptionHandler(Class)} will * be associated to this event listener. */ public ProcessFactory listener(String expression) { if (exceptionHandler!=null) { exceptionHandler.createActivityReference(expression); } else { eventListenerReference = getEvent().createEventListenerReference(expression); } return this; }
/** adds an action to the current event. The current event was either * created by {@link #event(String)} or by a {@link #transition()}. * Subsequent invocations of {@link #exceptionHandler(Class)} will * be associated to this event listener. */ public ProcessFactory listener(Descriptor descriptor) { if (exceptionHandler!=null) { exceptionHandler.createEventListenerReference(descriptor); } else { getEvent().createEventListenerReference(descriptor); } return this; }
protected IntermediateCatchTimerEvent createIntermediateTimerCatchEvent(String catchEventId, Element eventDefinitionElement, BpmnParser parser, Parse parse) { IntermediateCatchTimerEvent intermediateCatchTimerEvent = new IntermediateCatchTimerEvent(); TimerDefinitionImpl timerDefinition = parser.parseTimerEventDefinition(eventDefinitionElement, parse, catchEventId); // Attach the timerDefinition to the current activity. // That way, the PVM will automatically pcik it up when the execution arrives in the activity. ActivityImpl activity = parse.contextStackFind(ActivityImpl.class); activity.addTimerDefinition(timerDefinition); // The timer will fire an event on which this class will listen. String eventName = "INTERMEDIATE_TIMER_" + catchEventId; timerDefinition.setEventName(eventName); EventImpl timerEvent = activity.createEvent(eventName); timerEvent.createEventListenerReference(intermediateCatchTimerEvent); return intermediateCatchTimerEvent; }