diff --git a/backend/go-app/go.mod b/backend/go-app/go.mod index 8e686705..ea02517b 100644 --- a/backend/go-app/go.mod +++ b/backend/go-app/go.mod @@ -22,7 +22,7 @@ require ( github.com/gorilla/mux v1.8.1 github.com/h2non/filetype v1.1.3 github.com/satori/go.uuid v1.2.0 - github.com/shuffle/shuffle-shared v0.8.39 + github.com/shuffle/shuffle-shared v0.8.50 golang.org/x/crypto v0.36.0 google.golang.org/api v0.228.0 google.golang.org/grpc v1.71.1 diff --git a/backend/go-app/walkoff.go b/backend/go-app/walkoff.go index 14c5ac28..8357de3e 100755 --- a/backend/go-app/walkoff.go +++ b/backend/go-app/walkoff.go @@ -3039,7 +3039,13 @@ func executeSingleAction(resp http.ResponseWriter, request *http.Request) { shouldRerun = true } - workflowExecution, err := shuffle.PrepareSingleAction(ctx, user, fileId, body, runValidationAction) + decisionId := "" + decision, decisionOk := query["decision_id"] + if decisionOk && len(decision) > 0 { + decisionId = decision[0] + } + + workflowExecution, err := shuffle.PrepareSingleAction(ctx, user, fileId, body, runValidationAction, decisionId) debugUrl := fmt.Sprintf("/workflows/%s?execution_id=%s", workflowExecution.Workflow.ID, workflowExecution.ExecutionId) resp.Header().Add("X-Debug-Url", debugUrl) @@ -3101,7 +3107,12 @@ func executeSingleAction(resp http.ResponseWriter, request *http.Request) { return } - returnBody := shuffle.HandleRetValidation(ctx, workflowExecution, 1) + actionId := "" + if len(workflowExecution.Workflow.Actions) == 1 { + actionId = workflowExecution.Workflow.Actions[0].ID + } + + returnBody := shuffle.HandleRetValidation(ctx, workflowExecution, 1, actionId) returnBytes, err := json.Marshal(returnBody) if err != nil { log.Printf("[ERROR] Failed to marshal retStruct in single execution: %s", err)