use of org.camunda.bpm.engine.impl.bpmn.behavior.EventSubProcessStartEventActivityBehavior in project camunda-bpm-platform by camunda.
the class EventHandlerImpl method handleIntermediateEvent.
public void handleIntermediateEvent(EventSubscriptionEntity eventSubscription, Object payload, CommandContext commandContext) {
PvmExecutionImpl execution = eventSubscription.getExecution();
ActivityImpl activity = eventSubscription.getActivity();
ensureNotNull("Error while sending signal for event subscription '" + eventSubscription.getId() + "': " + "no activity associated with event subscription", "activity", activity);
if (payload instanceof Map) {
execution.setVariables((Map<String, Object>) payload);
}
if (activity.equals(execution.getActivity())) {
execution.signal("signal", null);
} else {
// and not the subprocess itself
if (activity.getActivityBehavior() instanceof EventSubProcessStartEventActivityBehavior) {
activity = (ActivityImpl) activity.getFlowScope();
}
execution.executeEventHandlerActivity(activity);
}
}
Aggregations