protected internal virtual void createCompensateEventSubscription(ActivityExecution execution, ActivityImpl compensationHandler) { // the compensate event subscription is created at subprocess or miBody of the the current activity PvmActivity currentActivity = execution.Activity; ActivityExecution scopeExecution = execution.findExecutionForFlowScope(currentActivity.FlowScope); EventSubscriptionEntity.createAndInsert((ExecutionEntity)scopeExecution, EventType.COMPENSATE, compensationHandler); }
public override void doLeave(ActivityExecution execution) { // continue via the appropriate cancel boundary event ScopeImpl eventScope = (ScopeImpl)cancelBoundaryEvent.EventScope; ActivityExecution boundaryEventScopeExecution = execution.findExecutionForFlowScope(eventScope); boundaryEventScopeExecution.executeActivity(cancelBoundaryEvent); }