Ejemplo n.º 1
0
        public virtual void validate(MigratingTransitionInstance migratingInstance, MigratingProcessInstance migratingProcessInstance, MigratingTransitionInstanceValidationReportImpl instanceReport)
        {
            ActivityImpl targetActivity = (ActivityImpl)migratingInstance.TargetScope;

            if (targetActivity != null && migratingInstance.AsyncAfter)
            {
                MigratingJobInstance           jobInstance = migratingInstance.JobInstance;
                AsyncContinuationConfiguration config      = (AsyncContinuationConfiguration)jobInstance.JobEntity.JobHandlerConfiguration;
                string sourceTransitionId = config.TransitionId;

                if (targetActivity.OutgoingTransitions.Count > 1)
                {
                    if (string.ReferenceEquals(sourceTransitionId, null))
                    {
                        instanceReport.addFailure("Transition instance is assigned to no sequence flow" + " and target activity has more than one outgoing sequence flow");
                    }
                    else
                    {
                        TransitionImpl matchingOutgoingTransition = targetActivity.findOutgoingTransition(sourceTransitionId);
                        if (matchingOutgoingTransition == null)
                        {
                            instanceReport.addFailure("Transition instance is assigned to a sequence flow" + " that cannot be matched in the target activity");
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
 public virtual void validate(MigratingTransitionInstance migratingInstance, MigratingProcessInstance migratingProcessInstance, MigratingTransitionInstanceValidationReportImpl instanceReport)
 {
     if (isInvalid(migratingInstance))
     {
         instanceReport.addFailure("There is no migration instruction for this instance's activity");
     }
 }
Ejemplo n.º 3
0
        public virtual void validate(MigratingTransitionInstance migratingInstance, MigratingProcessInstance migratingProcessInstance, MigratingTransitionInstanceValidationReportImpl instanceReport)
        {
            ActivityImpl targetActivity = (ActivityImpl)migratingInstance.TargetScope;

            if (targetActivity != null)
            {
                if (isProcessStartJob(migratingInstance.JobInstance.JobEntity) && !isTopLevelActivity(targetActivity))
                {
                    instanceReport.addFailure("A transition instance that instantiates the process can only be migrated to a process-level flow node");
                }
            }
        }
Ejemplo n.º 4
0
        public virtual void validate(MigratingTransitionInstance migratingInstance, MigratingProcessInstance migratingProcessInstance, MigratingTransitionInstanceValidationReportImpl instanceReport)
        {
            ActivityImpl targetActivity = (ActivityImpl)migratingInstance.TargetScope;

            if (targetActivity != null)
            {
                if (migratingInstance.AsyncAfter)
                {
                    if (!targetActivity.AsyncAfter)
                    {
                        instanceReport.addFailure("Target activity is not asyncAfter");
                    }
                }
                else
                {
                    if (!targetActivity.AsyncBefore)
                    {
                        instanceReport.addFailure("Target activity is not asyncBefore");
                    }
                }
            }
        }