Exemple #1
0
        public virtual void handle(MigratingInstanceParseContext parseContext, EventSubscriptionEntity element)
        {
            MigratingProcessElementInstance migratingInstance;

            if (!string.ReferenceEquals(element.Configuration, null))
            {
                migratingInstance = createMigratingEventScopeInstance(parseContext, element);
            }
            else
            {
                migratingInstance = createMigratingEventSubscriptionInstance(parseContext, element);
            }


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

            if (owningExecution.EventScope)
            {
                parentInstance = parseContext.getMigratingCompensationInstanceByExecutionId(owningExecution.Id);
            }
            else
            {
                parentInstance = parseContext.getMigratingActivityInstanceById(owningExecution.ParentActivityInstanceId);
            }
            migratingInstance.Parent = parentInstance;
        }