Exemple #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;
            }
        }
Exemple #2
0
        public override void attachState(MigratingScopeInstance targetActivityInstance)
        {
            Parent = targetActivityInstance;

            ExecutionEntity representativeExecution = targetActivityInstance.resolveRepresentativeExecution();

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

            representativeExecution.addExternalTask(externalTask);

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

            foreach (MigratingInstance dependentInstance in migratingDependentInstances)
            {
                dependentInstance.attachState(newOwningInstance);
            }
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #7
0
 public virtual void attachState(MigratingScopeInstance targetActivityInstance)
 {
     processInstance.setSuperExecution(targetActivityInstance.resolveRepresentativeExecution());
 }
Exemple #8
0
 public virtual void attachState(MigratingScopeInstance newOwningInstance)
 {
     attachTo(newOwningInstance.resolveRepresentativeExecution());
 }
Exemple #9
0
 public virtual void attachState(MigratingScopeInstance newOwningInstance)
 {
     eventSubscriptionEntity.Execution = newOwningInstance.resolveRepresentativeExecution();
 }