Beispiel #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");
                        }
                    }
                }
            }
        }
Beispiel #2
0
        protected internal virtual bool isProcessStartJob(JobEntity job)
        {
            AsyncContinuationConfiguration configuration = (AsyncContinuationConfiguration)job.JobHandlerConfiguration;

            return(org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperation_Fields.PROCESS_START.CanonicalName.Equals(configuration.AtomicOperation));
        }