예제 #1
0
        public override void DoLeave(IActivityExecution execution)
        {
            // continue via the appropriate cancel boundary event
            var eventScope = (ScopeImpl)cancelBoundaryEvent.EventScope;

            var boundaryEventScopeExecution = execution.FindExecutionForFlowScope(eventScope);

            boundaryEventScopeExecution.ExecuteActivity(cancelBoundaryEvent);
        }
        protected internal virtual void CreateCompensateEventSubscription(IActivityExecution execution,
                                                                          ActivityImpl compensationHandler)
        {
            // the compensate event subscription is created at subprocess or miBody of the the current activity
            var currentActivity = execution.Activity;
            var scopeExecution  = execution.FindExecutionForFlowScope(currentActivity.FlowScope);

            EventSubscriptionEntity.CreateAndInsert((ExecutionEntity)scopeExecution, EventType.Compensate, compensationHandler);
        }