多个分支的通用通行状态
在我的步骤函数中,有一个平行状态,存在选择状态。如果选择是正确的,则调用相应的lambda。如果没有,我们在不执行Lambda的情况下退出了分支。 出口通行状态在所有并行分支的下面所示,因为选择状态不支持终端字段
Pass:
Type: Pass
End: true
Pass(1):
Type: Pass
End: true
Pass(2):
Type: Pass
End: true
是否可以将它们全部发送到单个通过状态以避免为每个分支创建一堆额外状态吗?
In my step function there are parallel states under which there is a choice state. If the choice is true , the corresponding lambda is invoked. If not, we exit from the branch without executing the lambda.
Exit Pass state is as below for all the parallel branches as Choice states don't support the End field
Pass:
Type: Pass
End: true
Pass(1):
Type: Pass
End: true
Pass(2):
Type: Pass
End: true
Is it possible to instead send them all to a single pass state to avoid having to create a bunch of extra states for each branch?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您只能参考在平行状态的给定分支中声明的状态。鉴于您的选择状态位于两个不同的分支中,因此他们不能“共享”一个状态来指向其默认选择。
这里的一个解决方案(如果您不想重复通过状态)是根据其输入来处理lambda函数内部的选择。
You can only refer to the states declared within the given branch of parallel state. Given that your choice states are in 2 different branches, they cannot "share" a state to point their default choice to.
One solution here (if you don't want to repeat pass state) would be to handle the choice inside of lambda function, based on its input.