public override void Execute() { if (WorkFlowContext.Canceled) { throw new WorkflowCanceledException(); } _branch(this); do { if (WorkFlowContext.Canceled) { throw new WorkflowCanceledException(); } WorkFlowContext.RemoveInstructions(this); foreach (var step in Nodes) { step.Execute(); if (WorkFlowContext.HasInstruction <BreakInstruction>(this)) { break; } } } while(WorkFlowContext.HasInstruction <RestartInstruction>(this)); WorkFlowContext.RemoveInstructions(this); }
public override void Execute() { _branch(this); do { WorkFlowContext.RemoveInstructions(this); var step = _step(); Result = ExecuteStep(step); ExecuteNodes(); WorkFlowContext.Path.RemoveLast(); } while(WorkFlowContext.HasInstruction <RetryInstruction>(this) || WorkFlowContext.HasInstruction <RestartInstruction>(this)); WorkFlowContext.RemoveInstructions(this); }