protected internal override void InstantiateScopes(MigratingScopeInstance ancestorScopeInstance, MigratingScopeInstanceBranch executionBranch, IList <ScopeImpl> scopesToInstantiate) { if (scopesToInstantiate.Count == 0) { return; } var ancestorScopeExecution = ancestorScopeInstance.ResolveRepresentativeExecution(); var parentExecution = ancestorScopeExecution; foreach (var scope in scopesToInstantiate) { var compensationScopeExecution = parentExecution.CreateExecution(); compensationScopeExecution.IsScope = true; compensationScopeExecution.IsEventScope = true; //compensationScopeExecution.setActivity((IPvmActivity) scope); compensationScopeExecution.IsActive = false; //compensationScopeExecution.activityInstanceStarting(); //compensationScopeExecution.enterActivityInstance(); //EventSubscriptionEntity eventSubscription = EventSubscriptionEntity.createAndInsert(parentExecution, // EventType.COMPENSATE, (ActivityImpl) scope); //eventSubscription.Configuration = compensationScopeExecution.Id; //executionBranch.visited(new MigratingEventScopeInstance(eventSubscription, compensationScopeExecution, // scope)); parentExecution = compensationScopeExecution; } }
public virtual void AttachState(MigratingScopeInstance owningInstance) { var representativeExecution = owningInstance.ResolveRepresentativeExecution(); //representativeExecution.addExternalTask(externalTask); //externalTask.Execution = representativeExecution; }
public override void AttachState(MigratingScopeInstance targetActivityInstance) { Parent = targetActivityInstance; var representativeExecution = targetActivityInstance.ResolveRepresentativeExecution(); //eventSubscription.Execution = representativeExecution; }
public virtual void AttachState(MigratingScopeInstance newOwningInstance) { AttachTo(newOwningInstance.ResolveRepresentativeExecution()); foreach (var dependentInstance in MigratingDependentInstances) { dependentInstance.AttachState(newOwningInstance); } }
public virtual void AttachState(MigratingScopeInstance owningInstance) { var representativeExecution = owningInstance.ResolveRepresentativeExecution(); //representativeExecution.addTask(userTask); //foreach (VariableInstanceEntity variable in userTask.VariablesInternal) //{ // variable.Execution = representativeExecution; //} //userTask.setExecution(representativeExecution); }
public virtual void AttachState(MigratingScopeInstance owningActivityInstance) { throw new NotImplementedException(); var representativeExecution = owningActivityInstance.ResolveRepresentativeExecution(); var currentScope = owningActivityInstance.CurrentScope; var newOwningExecution = representativeExecution; //if (currentScope.Scope && isConcurrentLocalInParentScope) //{ // newOwningExecution = representativeExecution.Parent; //} //newOwningExecution.addVariableInternal(variable); }
public virtual void AttachState(MigratingScopeInstance newOwningInstance) { AttachTo(newOwningInstance.ResolveRepresentativeExecution()); }