void executeRetryStepFunction(WorkflowExecution execution, String stepFunctionArn) { retryTemplate.execute { RetryContext context -> workflowExecutionInitiatorService.addExecuteStepFunction(execution, stepFunctionArn) } }
This function will execute the step function if it fails, it will retry 3 times, and then it will stop retrying.