public override void Execute(IActivityExecution execution) { IPvmActivity initialActivity = execution.Activity.Properties.Get(BpmnProperties.InitialActivity); EnsureUtil.EnsureNotNull("No initial activity found for subprocess " + execution.Activity.Id, "initialActivity", initialActivity); execution.ExecuteActivity(initialActivity); }
protected internal virtual void PerformInstance(IActivityExecution execution, IPvmActivity activity, int loopCounter) { SetLoopVariable(execution, LoopCounter, loopCounter); EvaluateCollectionVariable(execution, loopCounter); execution.IsEnded = false; execution.IsActive = true; execution.ExecuteActivity(activity); }
protected internal virtual void executeEscalationHandler(EscalationEventDefinition escalationEventDefinition, ActivityExecutionMappingCollector activityExecutionMappingCollector) { var escalationHandler = escalationEventDefinition.EscalationHandler; var escalationScope = GetScopeForEscalation(escalationEventDefinition); IActivityExecution escalationExecution = activityExecutionMappingCollector.GetExecutionForScope(escalationScope); if (!ReferenceEquals(escalationEventDefinition.EscalationCodeVariable, null)) { escalationExecution.SetVariable(escalationEventDefinition.EscalationCodeVariable, Escalation.EscalationCode); } escalationExecution.ExecuteActivity(escalationHandler); }
public void Execute(IActivityExecution execution) { var startActivities = new List <IPvmActivity>(); foreach (var activity in execution.Activity.Activities) { if (!activity.IncomingTransitions.Any()) { startActivities.Add(activity); } } foreach (var startActivity in startActivities) { execution.ExecuteActivity(startActivity); } }