public void fireEvent(String eventType, ExecutionContext executionContext) { Token token = executionContext.getToken(); if (log.isDebugEnabled()) log.debug(token + " fires event '" + eventType + "' on " + this); GraphElement eventSource = executionContext.getEventSource(); try { executionContext.setEventSource(this); JbpmContext jbpmContext = executionContext.getJbpmContext(); if (jbpmContext != null) { EventService eventService = (EventService) jbpmContext.getServices() .getService(EventService.SERVICE_NAME); if (eventService != null) eventService.fireEvent(eventType, this, executionContext); } fireAndPropagateEvent(eventType, executionContext); } finally { executionContext.setEventSource(eventSource); } }
public void fireEvent(String eventType, ExecutionContext executionContext) { Token token = executionContext.getToken(); if (log.isDebugEnabled()) log.debug(token + " fires event '" + eventType + "' on " + this); GraphElement eventSource = executionContext.getEventSource(); try { executionContext.setEventSource(this); JbpmContext jbpmContext = executionContext.getJbpmContext(); if (jbpmContext != null) { EventService eventService = (EventService) jbpmContext.getServices() .getService(EventService.SERVICE_NAME); if (eventService != null) eventService.fireEvent(eventType, this, executionContext); } fireAndPropagateEvent(eventType, executionContext); } finally { executionContext.setEventSource(eventSource); } }
executionContext.setEventSource(task); executionContext.setEventSource(null);
executionContext.setEventSource(task); executionContext.setEventSource(null);