Example #1
0
        public IStepBuilder <TData, InlineStepBody> Then(Func <IStepExecutionContext, ExecutionResult> body)
        {
            WorkflowStepInline newStep = new WorkflowStepInline();

            newStep.Body = body;
            WorkflowBuilder.AddStep(newStep);
            var stepBuilder = new StepBuilder <TData, InlineStepBody>(WorkflowBuilder, newStep);

            Outcome.NextStep = newStep.Id;
            return(stepBuilder);
        }
Example #2
0
        public IStepBuilder <TData, TStepBody> CompensateWith(Func <IStepExecutionContext, ExecutionResult> body)
        {
            WorkflowStepInline newStep = new WorkflowStepInline();

            newStep.Body = body;
            WorkflowBuilder.AddStep(newStep);
            var stepBuilder = new StepBuilder <TData, InlineStepBody>(WorkflowBuilder, newStep);

            Step.CompensationStepId = newStep.Id;
            return(this);
        }
Example #3
0
        public IStepBuilder <TData, InlineStepBody> Then(Func <IStepExecutionContext, ExecutionResult> body)
        {
            WorkflowStepInline newStep = new WorkflowStepInline
            {
                Body = body
            };

            WorkflowBuilder.AddStep(newStep);
            var stepBuilder = new StepBuilder <TData, InlineStepBody>(WorkflowBuilder, newStep);

            Step.Outcomes.Add(new StepOutcome()
            {
                NextStep = newStep.Id
            });
            return(stepBuilder);
        }