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");
     }
 }
Beispiel #2
0
        public virtual void Validate(MigratingTransitionInstance migratingInstance,
                                     MigratingProcessInstance migratingProcessInstance,
                                     MigratingTransitionInstanceValidationReportImpl instanceReport)
        {
            var 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");
                }
            }
        }
Beispiel #3
0
        public virtual void Validate(MigratingTransitionInstance migratingInstance,
                                     MigratingProcessInstance migratingProcessInstance,
                                     MigratingTransitionInstanceValidationReportImpl instanceReport)
        {
            var 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");
                    }
                }
            }
        }