protected void dispatchActivitiesCanceledIfNeeded(EventSubscriptionEntity eventSubscription, ExecutionEntity execution, FlowElement currentFlowElement, CommandContext commandContext) { if (currentFlowElement instanceof BoundaryEvent) { BoundaryEvent boundaryEvent = (BoundaryEvent) currentFlowElement; if (boundaryEvent.isCancelActivity()) { dispatchExecutionCancelled(eventSubscription, execution, commandContext); } } }
protected void dispatchExecutionCancelled(EventSubscriptionEntity eventSubscription, ExecutionEntity execution, CommandContext commandContext) { // subprocesses for (ExecutionEntity subExecution : execution.getExecutions()) { dispatchExecutionCancelled(eventSubscription, subExecution, commandContext); } // call activities ExecutionEntity subProcessInstance = commandContext.getExecutionEntityManager().findSubProcessInstanceBySuperExecutionId(execution.getId()); if (subProcessInstance != null) { dispatchExecutionCancelled(eventSubscription, subProcessInstance, commandContext); } // activity with message/signal boundary events FlowElement flowElement = execution.getCurrentFlowElement(); if (flowElement instanceof BoundaryEvent) { BoundaryEvent boundaryEvent = (BoundaryEvent) flowElement; if (boundaryEvent.getAttachedToRef() != null) { dispatchActivityCancelled(eventSubscription, execution, boundaryEvent.getAttachedToRef(), commandContext); } } }
protected void dispatchActivitiesCanceledIfNeeded(EventSubscriptionEntity eventSubscription, ExecutionEntity execution, FlowElement currentFlowElement, CommandContext commandContext) { if (currentFlowElement instanceof BoundaryEvent) { BoundaryEvent boundaryEvent = (BoundaryEvent) currentFlowElement; if (boundaryEvent.isCancelActivity()) { dispatchExecutionCancelled(eventSubscription, execution, commandContext); } } }
protected void dispatchActivitiesCanceledIfNeeded(EventSubscriptionEntity eventSubscription, ExecutionEntity execution, ActivityImpl boundaryEventActivity, CommandContext commandContext) { ActivityBehavior boundaryActivityBehavior = boundaryEventActivity.getActivityBehavior(); if (boundaryActivityBehavior instanceof BoundaryEventActivityBehavior) { BoundaryEventActivityBehavior boundaryEventActivityBehavior = (BoundaryEventActivityBehavior) boundaryActivityBehavior; if (boundaryEventActivityBehavior.isInterrupting()) { dispatchExecutionCancelled(eventSubscription, execution, commandContext); } } }
protected void dispatchExecutionCancelled(EventSubscriptionEntity eventSubscription, ExecutionEntity execution, CommandContext commandContext) { // subprocesses for (ExecutionEntity subExecution : execution.getExecutions()) { dispatchExecutionCancelled(eventSubscription, subExecution, commandContext); } // call activities ExecutionEntity subProcessInstance = commandContext.getExecutionEntityManager().findSubProcessInstanceBySuperExecutionId(execution.getId()); if (subProcessInstance != null) { dispatchExecutionCancelled(eventSubscription, subProcessInstance, commandContext); } // activity with message/signal boundary events ActivityImpl activity = execution.getActivity(); if (activity != null && activity.getActivityBehavior() != null) { dispatchActivityCancelled(eventSubscription, execution, activity, commandContext); } }
protected void dispatchExecutionCancelled(EventSubscriptionEntity eventSubscription, ExecutionEntity execution, CommandContext commandContext) { // subprocesses for (ExecutionEntity subExecution : execution.getExecutions()) { dispatchExecutionCancelled(eventSubscription, subExecution, commandContext); } // call activities ExecutionEntity subProcessInstance = commandContext.getExecutionEntityManager().findSubProcessInstanceBySuperExecutionId(execution.getId()); if (subProcessInstance != null) { dispatchExecutionCancelled(eventSubscription, subProcessInstance, commandContext); } // activity with message/signal boundary events FlowElement flowElement = execution.getCurrentFlowElement(); if (flowElement instanceof BoundaryEvent) { BoundaryEvent boundaryEvent = (BoundaryEvent) flowElement; if (boundaryEvent.getAttachedToRef() != null) { dispatchActivityCancelled(eventSubscription, execution, boundaryEvent.getAttachedToRef(), commandContext); } } }