Esempio n. 1
0
        public virtual void validate(MigratingActivityInstance migratingInstance, MigratingProcessInstance migratingProcessInstance, MigratingActivityInstanceValidationReportImpl instanceReport)
        {
            ScopeImpl sourceScope = migratingInstance.SourceScope;

            if (sourceScope != sourceScope.ProcessDefinition)
            {
                ActivityImpl sourceActivity = (ActivityImpl)migratingInstance.SourceScope;

                if (!SupportedActivityValidator.INSTANCE.isSupportedActivity(sourceActivity))
                {
                    instanceReport.addFailure("The type of the source activity is not supported for activity instance migration");
                }
            }
        }
Esempio n. 2
0
        public virtual void onParseMigratingInstance(MigratingInstanceParseContext parseContext, MigratingActivityInstance migratingInstance)
        {
            ActivityImpl callActivity = (ActivityImpl)migratingInstance.SourceScope;

            // A call activity is typically scope and since we guarantee stability of scope executions during migration,
            // the superExecution link does not have to be maintained during migration.
            // There are some exceptions, though: A multi-instance call activity is not scope and therefore
            // does not have a dedicated scope execution. In this case, the link to the super execution
            // must be maintained throughout migration
            if (!callActivity.Scope)
            {
                ExecutionEntity callActivityExecution = migratingInstance.resolveRepresentativeExecution();
                ExecutionEntity calledProcessInstance = callActivityExecution.getSubProcessInstance();
                migratingInstance.addMigratingDependentInstance(new MigratingCalledProcessInstance(calledProcessInstance));
            }
        }
Esempio n. 3
0
        public virtual void onParseMigratingInstance(MigratingInstanceParseContext parseContext, MigratingActivityInstance migratingInstance)
        {
            ExecutionEntity execution = migratingInstance.resolveRepresentativeExecution();

            foreach (ExternalTaskEntity task in execution.ExternalTasks)
            {
                MigratingExternalTaskInstance migratingTask = new MigratingExternalTaskInstance(task, migratingInstance);
                migratingInstance.addMigratingDependentInstance(migratingTask);
                parseContext.consume(task);
                parseContext.submit(migratingTask);
            }
        }
Esempio n. 4
0
 protected internal virtual bool isInvalid(MigratingActivityInstance migratingInstance)
 {
     return(hasNoInstruction(migratingInstance) && migratingInstance.Children.Count == 0);
 }