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

            var ancestorScopeExecution = ancestorScopeInstance.ResolveRepresentativeExecution();

            var parentExecution = ancestorScopeExecution;

            foreach (var scope in scopesToInstantiate)
            {
                var compensationScopeExecution = parentExecution.CreateExecution();
                compensationScopeExecution.IsScope      = true;
                compensationScopeExecution.IsEventScope = true;

                //compensationScopeExecution.setActivity((IPvmActivity) scope);
                compensationScopeExecution.IsActive = 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;
            }
        }
示例#2
0
        public virtual void AttachState(MigratingScopeInstance owningInstance)
        {
            var representativeExecution = owningInstance.ResolveRepresentativeExecution();
            //representativeExecution.addExternalTask(externalTask);

            //externalTask.Execution = representativeExecution;
        }
示例#3
0
        public override void AttachState(MigratingScopeInstance targetActivityInstance)
        {
            Parent = targetActivityInstance;

            var representativeExecution = targetActivityInstance.ResolveRepresentativeExecution();
            //eventSubscription.Execution = representativeExecution;
        }
示例#4
0
        public virtual void AttachState(MigratingScopeInstance newOwningInstance)
        {
            AttachTo(newOwningInstance.ResolveRepresentativeExecution());

            foreach (var dependentInstance in MigratingDependentInstances)
            {
                dependentInstance.AttachState(newOwningInstance);
            }
        }
示例#5
0
        public virtual void AttachState(MigratingScopeInstance owningInstance)
        {
            var representativeExecution = owningInstance.ResolveRepresentativeExecution();
            //representativeExecution.addTask(userTask);

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

            //userTask.setExecution(representativeExecution);
        }
        public virtual void AttachState(MigratingScopeInstance owningActivityInstance)
        {
            throw new NotImplementedException();
            var representativeExecution = owningActivityInstance.ResolveRepresentativeExecution();
            var currentScope            = owningActivityInstance.CurrentScope;

            var newOwningExecution = representativeExecution;

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

            //newOwningExecution.addVariableInternal(variable);
        }
示例#7
0
 public virtual void AttachState(MigratingScopeInstance newOwningInstance)
 {
     AttachTo(newOwningInstance.ResolveRepresentativeExecution());
 }