Пример #1
0
        public virtual void handle(MigratingInstanceParseContext parseContext, TransitionInstance transitionInstance)
        {
            if (!isAsyncTransitionInstance(transitionInstance))
            {
                return;
            }

            MigrationInstruction applyingInstruction = parseContext.getInstructionFor(transitionInstance.ActivityId);

            ScopeImpl sourceScope = parseContext.SourceProcessDefinition.findActivity(transitionInstance.ActivityId);
            ScopeImpl targetScope = null;

            if (applyingInstruction != null)
            {
                string activityId = applyingInstruction.TargetActivityId;
                targetScope = parseContext.TargetProcessDefinition.findActivity(activityId);
            }

            ExecutionEntity asyncExecution = Context.CommandContext.ExecutionManager.findExecutionById(transitionInstance.ExecutionId);

            MigratingTransitionInstance migratingTransitionInstance = parseContext.MigratingProcessInstance.addTransitionInstance(applyingInstruction, transitionInstance, sourceScope, targetScope, asyncExecution);

            MigratingActivityInstance parentInstance = parseContext.getMigratingActivityInstanceById(transitionInstance.ParentActivityInstanceId);

            migratingTransitionInstance.setParent(parentInstance);

            IList <JobEntity> jobs = asyncExecution.Jobs;

            parseContext.handleDependentTransitionInstanceJobs(migratingTransitionInstance, jobs);

            parseContext.handleDependentVariables(migratingTransitionInstance, collectTransitionInstanceVariables(migratingTransitionInstance));
        }
Пример #2
0
        protected internal virtual void parseDependentEntities(MigratingInstanceParseContext parseContext, MigratingEventScopeInstance migratingInstance)
        {
            ExecutionEntity representativeExecution = migratingInstance.resolveRepresentativeExecution();

            IList <VariableInstanceEntity> variables = new List <VariableInstanceEntity>(representativeExecution.VariablesInternal);

            parseContext.handleDependentVariables(migratingInstance, variables);
        }
Пример #3
0
 public virtual void parseDependentInstances(MigratingInstanceParseContext parseContext, MigratingActivityInstance migratingInstance)
 {
     parseContext.handleDependentVariables(migratingInstance, collectActivityInstanceVariables(migratingInstance));
     parseContext.handleDependentActivityInstanceJobs(migratingInstance, collectActivityInstanceJobs(migratingInstance));
     parseContext.handleDependentEventSubscriptions(migratingInstance, collectActivityInstanceEventSubscriptions(migratingInstance));
 }