gpt4 book ai didi

amazon-web-services - 并行状态合并 Step Function 中的输出

转载 作者:行者123 更新时间:2023-12-04 04:26:52 24 4
gpt4 key购买 nike

是否可以有以下类型的阶跃函数图,即从 2 个并行状态输出,一个组合状态:

enter image description here

如果是,那么 json 会是什么样子?如果不是,为什么?

最佳答案

有可能如下图所示

enter image description here

并行状态应该是这样的

"MyParallelState": {
"Type": "Parallel",
"InputPath": "$",
"OutputPath": "$",
"ResultPath": "$.ParallelResultPath",
"Next": "SetCartCompleteStatusState",
"Branches": [
{
"StartAt": "UpdateMonthlyUsageState",
"States": {
"UpdateMonthlyUsageState": {
"Type": "Task",
"InputPath": "$",
"OutputPath": "$",
"ResultPath": "$.UpdateMonthlyUsageResultPath",
"Resource": "LambdaARN",
"End": true
}
}
},
{
"StartAt": "QueueTaxInvoiceState",
"States": {
"QueueTaxInvoiceState": {
"Type": "Task",
"InputPath": "$",
"OutputPath": "$",
"ResultPath": "$.QueueTaxInvoiceResultPath",
"Resource": "LambdaARN",
"End": true
}
}
}
MyParallelState的输出将按数组填充,来自 Parallel state 中的每个州.他们居住在 ParallelResultPath 内对象并将被传递到 Next 状态
{
"ParallelResultPath": [
{
"UpdateMonthlyUsageResultPath": Some Output
},
{
"QueueTaxInvoiceResultPath": Some Output
}
]
}

关于amazon-web-services - 并行状态合并 Step Function 中的输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54105792/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com