/// <summary> /// Creates an emerged activity instance /// </summary> public MigratingActivityInstance(ScopeImpl targetScope, ExecutionEntity scopeExecution) { this.targetScope = targetScope; this.currentScope = targetScope; this.representativeExecution = scopeExecution; this.instanceBehavior = determineBehavior(targetScope); }
/// <summary> /// Creates a migrating activity instances /// </summary> public MigratingActivityInstance(ActivityInstance activityInstance, MigrationInstruction migrationInstruction, ScopeImpl sourceScope, ScopeImpl targetScope, ExecutionEntity scopeExecution) { this.activityInstance = activityInstance; this.migrationInstruction = migrationInstruction; this.sourceScope = sourceScope; this.currentScope = sourceScope; this.targetScope = targetScope; this.representativeExecution = scopeExecution; this.instanceBehavior = determineBehavior(sourceScope); if (activityInstance.ChildActivityInstances.Length == 0 && activityInstance.ChildTransitionInstances.Length == 0) { // active state is only relevant for child activity instances; // for all other instances, their respective executions are always inactive activeState = representativeExecution.Active; } }