public void MapStateWithoutIterator_IsNotValid() { Assert.Throws <ValidationException>(() => StateMachineBuilder.StateMachine() .StartAt("Initial") .State("Initial", StateMachineBuilder.MapState() .Transition(StateMachineBuilder.End())) .Build()); }
public void SimpleMapState() { var stateMachine = StateMachineBuilder.StateMachine() .StartAt("Validate-All") .State("Validate-All", StateMachineBuilder.MapState() .InputPath("$.detail") .ItemPath("$.shipped") .ResultPath("$.detail.shipped") .MaxConcurrency(0) .Parameters(JObject.FromObject(new { value = "param" })) .ResultSelector(JObject.FromObject(new { value = "param" })) .Transition(StateMachineBuilder.End()) .Iterator(StateMachineBuilder.SubStateMachine() .StartAt("Validate") .State("Validate", StateMachineBuilder.TaskState() .Resource("arn:aws:lambda:us-east-1:123456789012:function:ship-val") .Transition(StateMachineBuilder.End())))) .Build(); AssertStateMachine(stateMachine, "SimpleMapState.json"); }