简体   繁体   English

无法转换出 state。state 未指向下一个 state

[英]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.

相关问题 Airflow 任务卡在“排队”中 state。依赖项阻止任务被安排 - Airflow task stuck in 'queued' state. Dependencies Blocking Task From Getting Scheduled 环境无法启动,因为它进入终止 state - Environment failed to launch as it entered Terminated state 如何修复崩溃 IllegalStateException:设备上的文件系统处于错误状态 state。WorkManager 无法访问应用程序的内部数据存储 - How to fix crash IllegalStateException: The file system on the device is in a bad state. WorkManager cannot access the app's internal data store DataFlow 中的管道“状态”是什么意思? - What does the pipeline "state" mean in DataFlow? Terraform如果资源是动态生成的,不保留state - Terraform does not keep state if resources are generated dynamically 错误 state:字段在 DocumentSnapshotPlatform 中不存在 - Bad state: field does not exist within the DocumentSnapshotPlatform 无法将数据传递到下一个屏幕,因为选择 state 未知 - Can't pass data to next screen because selection state is unknown flutter_bloc: ^8.0.0 state 不更新 - flutter_bloc: ^8.0.0 state does not updating CloudFormation:服务员 StackCreateComplete 失败:服务员遇到终端故障 state - CloudFormation: Waiter StackCreateComplete failed: Waiter encountered a terminal failure state redux state 未重置为初始值 state - redux state is not resetting to initial state value
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM