Exemple #1
0
        public virtual MigratingActivityInstance addActivityInstance(MigrationInstruction migrationInstruction, ActivityInstance activityInstance, ScopeImpl sourceScope, ScopeImpl targetScope, ExecutionEntity scopeExecution)
        {
            MigratingActivityInstance migratingActivityInstance = new MigratingActivityInstance(activityInstance, migrationInstruction, sourceScope, targetScope, scopeExecution);

            migratingActivityInstances.Add(migratingActivityInstance);

            if (processInstanceId.Equals(activityInstance.Id))
            {
                rootInstance = migratingActivityInstance;
            }

            return(migratingActivityInstance);
        }
Exemple #2
0
        public override void setParent(MigratingScopeInstance parentInstance)
        {
            if (parentInstance != null && !(parentInstance is MigratingActivityInstance))
            {
                throw MIGRATION_LOGGER.cannotHandleChild(parentInstance, this);
            }

            MigratingActivityInstance parentActivityInstance = (MigratingActivityInstance)parentInstance;

            if (this.parentInstance != null)
            {
                ((MigratingActivityInstance)this.parentInstance).removeChild(this);
            }

            this.parentInstance = parentActivityInstance;

            if (parentInstance != null)
            {
                parentActivityInstance.addChild(this);
            }
        }
Exemple #3
0
        protected internal override void instantiateScopes(MigratingScopeInstance ancestorScopeInstance, MigratingScopeInstanceBranch executionBranch, IList <ScopeImpl> scopesToInstantiate)
        {
            if (scopesToInstantiate.Count == 0)
            {
                return;
            }

            // must always be an activity instance
            MigratingActivityInstance ancestorActivityInstance = (MigratingActivityInstance)ancestorScopeInstance;

            ExecutionEntity newParentExecution = ancestorActivityInstance.createAttachableExecution();

            IDictionary <PvmActivity, PvmExecutionImpl> createdExecutions = newParentExecution.instantiateScopes((System.Collections.IList)scopesToInstantiate, skipCustomListeners, skipIoMappings);

            foreach (ScopeImpl scope in scopesToInstantiate)
            {
                ExecutionEntity createdExecution = (ExecutionEntity)createdExecutions[scope];
                createdExecution.setActivity(null);
                createdExecution.Active = false;
                executionBranch.visited(new MigratingActivityInstance(scope, createdExecution));
            }
        }
Exemple #4
0
        public override void attachState(MigratingScopeInstance scopeInstance)
        {
            if (!(scopeInstance is MigratingActivityInstance))
            {
                throw MIGRATION_LOGGER.cannotHandleChild(scopeInstance, this);
            }

            MigratingActivityInstance activityInstance = (MigratingActivityInstance)scopeInstance;

            setParent(activityInstance);

            representativeExecution = activityInstance.createAttachableExecution();
            representativeExecution.ActivityInstanceId = null;
            representativeExecution.Active             = activeState;

            jobInstance.attachState(this);

            foreach (MigratingInstance dependentInstance in migratingDependentInstances)
            {
                dependentInstance.attachState(this);
            }
        }
Exemple #5
0
 public MigratingUserTaskInstance(TaskEntity userTask, MigratingActivityInstance migratingActivityInstance)
 {
     this.userTask = userTask;
     this.migratingActivityInstance = migratingActivityInstance;
 }
Exemple #6
0
 public MigratingScopeActivityInstanceBehavior(MigratingActivityInstance outerInstance)
 {
     this.outerInstance = outerInstance;
 }
Exemple #7
0
 public HistoryEventCreatorAnonymousInnerClass2(MigratingActivityInstance outerInstance)
 {
     this.outerInstance = outerInstance;
 }
Exemple #8
0
 public HistoryEventCreatorAnonymousInnerClass(MigratingActivityInstance outerInstance, DelegateExecution execution)
 {
     this.outerInstance = outerInstance;
     this.execution     = execution;
 }
Exemple #9
0
 public virtual void removeChild(MigratingActivityInstance activityInstance)
 {
     this.childActivityInstances.remove(activityInstance);
 }
Exemple #10
0
 public virtual void addChild(MigratingActivityInstance activityInstance)
 {
     this.childActivityInstances.Add(activityInstance);
 }
Exemple #11
0
 public MigratingProcessElementInstanceTopDownWalker(MigratingActivityInstance activityInstance) : base(new MigrationContext(activityInstance, new MigratingScopeInstanceBranch()))
 {
 }
Exemple #12
0
 public MigratingExternalTaskInstance(ExternalTaskEntity externalTask, MigratingActivityInstance migratingActivityInstance)
 {
     this.externalTask = externalTask;
     this.migratingActivityInstance = migratingActivityInstance;
 }