Beispiel #1
0
        protected internal override void instantiateScopes(MigratingScopeInstance ancestorScopeInstance, MigratingScopeInstanceBranch executionBranch, IList <ScopeImpl> scopesToInstantiate)
        {
            if (scopesToInstantiate.Count == 0)
            {
                return;
            }

            ExecutionEntity ancestorScopeExecution = ancestorScopeInstance.resolveRepresentativeExecution();

            ExecutionEntity parentExecution = ancestorScopeExecution;

            foreach (ScopeImpl scope in scopesToInstantiate)
            {
                ExecutionEntity compensationScopeExecution = parentExecution.createExecution();
                compensationScopeExecution.Scope      = true;
                compensationScopeExecution.EventScope = true;

                compensationScopeExecution.setActivity((PvmActivity)scope);
                compensationScopeExecution.Active = false;
                compensationScopeExecution.activityInstanceStarting();
                compensationScopeExecution.enterActivityInstance();

                EventSubscriptionEntity eventSubscription = EventSubscriptionEntity.createAndInsert(parentExecution, EventType.COMPENSATE, (ActivityImpl)scope);
                eventSubscription.Configuration = compensationScopeExecution.Id;

                executionBranch.visited(new MigratingEventScopeInstance(eventSubscription, compensationScopeExecution, scope));

                parentExecution = compensationScopeExecution;
            }
        }
Beispiel #2
0
        public override void attachState(MigratingScopeInstance targetActivityInstance)
        {
            Parent = targetActivityInstance;

            ExecutionEntity representativeExecution = targetActivityInstance.resolveRepresentativeExecution();

            eventSubscription.Execution = representativeExecution;
        }
Beispiel #3
0
        public virtual void attachState(MigratingScopeInstance owningInstance)
        {
            ExecutionEntity representativeExecution = owningInstance.resolveRepresentativeExecution();

            representativeExecution.addExternalTask(externalTask);

            externalTask.Execution = representativeExecution;
        }
Beispiel #4
0
        public virtual void attachState(MigratingScopeInstance newOwningInstance)
        {
            attachTo(newOwningInstance.resolveRepresentativeExecution());

            foreach (MigratingInstance dependentInstance in migratingDependentInstances)
            {
                dependentInstance.attachState(newOwningInstance);
            }
        }
Beispiel #5
0
        public virtual void attachState(MigratingScopeInstance owningInstance)
        {
            ExecutionEntity representativeExecution = owningInstance.resolveRepresentativeExecution();

            representativeExecution.addTask(userTask);

            foreach (VariableInstanceEntity variable in userTask.VariablesInternal)
            {
                variable.Execution = representativeExecution;
            }

            userTask.setExecution(representativeExecution);
        }
Beispiel #6
0
        public virtual void attachState(MigratingScopeInstance owningActivityInstance)
        {
            ExecutionEntity representativeExecution = owningActivityInstance.resolveRepresentativeExecution();
            ScopeImpl       currentScope            = owningActivityInstance.CurrentScope;

            ExecutionEntity newOwningExecution = representativeExecution;

            if (currentScope.Scope && isConcurrentLocalInParentScope)
            {
                newOwningExecution = representativeExecution.Parent;
            }

            newOwningExecution.addVariableInternal(variable);
        }
Beispiel #7
0
 public virtual void attachState(MigratingScopeInstance targetActivityInstance)
 {
     processInstance.setSuperExecution(targetActivityInstance.resolveRepresentativeExecution());
 }
Beispiel #8
0
 public virtual void attachState(MigratingScopeInstance newOwningInstance)
 {
     attachTo(newOwningInstance.resolveRepresentativeExecution());
 }
Beispiel #9
0
 public virtual void attachState(MigratingScopeInstance newOwningInstance)
 {
     eventSubscriptionEntity.Execution = newOwningInstance.resolveRepresentativeExecution();
 }