public virtual void Handle(MigratingInstanceParseContext parseContext, EventSubscriptionEntity element)
        {
            MigratingProcessElementInstance migratingInstance;

            if (!ReferenceEquals(element.Configuration, null))
            {
                migratingInstance = CreateMigratingEventScopeInstance(parseContext, element);
            }
            else
            {
                migratingInstance = CreateMigratingEventSubscriptionInstance(parseContext, element);
            }


            ExecutionEntity        owningExecution = element.Execution;
            MigratingScopeInstance parentInstance  = null;

            if (owningExecution.IsEventScope)
            {
                parentInstance = parseContext.GetMigratingCompensationInstanceByExecutionId(owningExecution.Id);
            }
            else
            {
                parentInstance = parseContext.GetMigratingActivityInstanceById(owningExecution.ParentActivityInstanceId);
            }
            migratingInstance.Parent = parentInstance;
        }
示例#2
0
 public virtual ProcessEngineException CannotHandleChild(MigratingScopeInstance scopeInstance,
                                                         MigratingProcessElementInstance childCandidate)
 {
     return
         (new ProcessEngineException(ExceptionMessage("011",
                                                      "Scope instance of type {} cannot have child of type {}", scopeInstance.GetType().Name,
                                                      childCandidate.GetType().Name)));
 }