From 554a5b63e1f51de42059d6de96a9f73fdfe5e633 Mon Sep 17 00:00:00 2001 From: Victoria McDonald Date: Tue, 4 Jun 2024 10:13:16 -0700 Subject: [PATCH] fix state machine transitions --- terraform/state_machine_definition.tpl | 62 +++++++++++++------------- 1 file changed, 30 insertions(+), 32 deletions(-) diff --git a/terraform/state_machine_definition.tpl b/terraform/state_machine_definition.tpl index a85018e..d245e76 100644 --- a/terraform/state_machine_definition.tpl +++ b/terraform/state_machine_definition.tpl @@ -448,40 +448,39 @@ "Type": "Task", "Resource": "arn:aws:states:::lambda:invoke", "TimeoutSeconds": 86400, - "End": "true", - "ResultPath": "$.gitc_response" + "Next": "SaveCNMMessage" }, "SaveCNMMessage": { - "Type": "Task", - "Resource": "${SaveCNMMessageLambda}", - "Parameters": { - "cma": { - "event.$": "$", - "task_config": { - "collection": "{$.collection_name}", - "granule_ur": "{$.granule_ur}", - "pobit_audit_bucket": "${PobitAuditBucket}", - "cumulus_message": { - "input": "{$.gitc_response}" + "Type": "Task", + "Resource": "${SaveCNMMessageLambda}", + "Parameters": { + "cma": { + "event.$": "$", + "task_config": { + "collection": "{$.collection_name}", + "granule_ur": "{$.granule_ur}", + "pobit_audit_bucket": "${PobitAuditBucket}", + "cumulus_message": { + "input": "{$}" + } } } - } - }, - "Retry": [ - { - "ErrorEquals": [ - "Lambda.ServiceException", - "Lambda.AWSLambdaException", - "Lambda.SdkClientException", - "Lambda.TooManyRequestsException" - ], - "IntervalSeconds": 2, - "MaxAttempts": 6, - "BackoffRate": 2 - } - ], - "Next": "WorkflowSucceeded" - } + }, + "Retry": [ + { + "ErrorEquals": [ + "Lambda.ServiceException", + "Lambda.AWSLambdaException", + "Lambda.SdkClientException", + "Lambda.TooManyRequestsException" + ], + "IntervalSeconds": 2, + "MaxAttempts": 6, + "BackoffRate": 2 + } + ], + "End": "true" + } }, "ResultPath": "$.payload.pobit", "Catch": [ @@ -502,10 +501,9 @@ "MaxAttempts": 1 } ], - "Next": "SaveCNMMessage" } + "Next": "WorkflowSucceeded" }, - "WorkflowSucceeded": { "Type": "Succeed" },