[英]Failed to transition out of the state. The state does not point to a next state
hi I want to create a step function I which scenario is I want to go Like this there are 2 scenarios :嗨,我想创建一个步骤 function 我想要哪个场景 go 像这样有 2 个场景:
1st_step --> 2nd step --> if (Job Complete) -- > special function --> step 3
or要么
1st_step --> 2nd step --> step 3
and I wrote code like this for cdk我为 cdk 写了这样的代码
sfn_step_1.next(sfn_step_2).next(sfn.Choice(self, "Job Complete?").when(sfn.Condition.string_equals("$.is_query", "True"), sfn_special_step ).afterwards()).next(sfn_step_3)
In case of "False" I am getting如果是“假”,我会得到
** Failed to transition out of the state. The state does not point to a next state.** ** 无法转换出 state。state 不指向下一个 state。**
As I don't want to add state and let it go to step 3 and end.因为我不想添加 state 并让它 go 到第 3 步并结束。 what should I do to fix this?我该怎么做才能解决这个问题?
You can do it like this:你可以这样做:
step1 = tasks.LambdaInvoke()
step2 = tasks.LambdaInvoke()
step3 = tasks.LambdaInvoke()
sfn_special_step = tasks.LambdaInvoke()
# here you define the next step and it will keep the flow on as you define in the main flow
sfn_special_step.next(step3)
step1.next(step2)
.next(
sfn.Choice(self, "Job Complete?")
.when(sfn.Condition.string_equals("$.is_query", "True"), sfn_special_step)
.afterwards())
.next(step3)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.