From 9d2387e9085b4cff0638efbc2494563089d879b4 Mon Sep 17 00:00:00 2001 From: Adam Grare Date: Fri, 28 Jul 2023 11:29:52 -0400 Subject: [PATCH 1/2] Fix Workflows Service Entrypoint arguments `Workflow#run` takes hash argument --- app/models/miq_request_task.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/miq_request_task.rb b/app/models/miq_request_task.rb index ae1fe5e85af..4640658e6c6 100644 --- a/app/models/miq_request_task.rb +++ b/app/models/miq_request_task.rb @@ -140,7 +140,7 @@ def deliver_queue(req_type = request_type, zone = nil) _log.info("Queuing #{request_class::TASK_DESCRIPTION}: [#{description}]...") if resource_action&.configuration_script_payload - resource_action.configuration_script_payload.run(dialog_values, get_user.userid) + resource_action.configuration_script_payload.run(:inputs => dialog_values, :userid => get_user.userid, :zone => zone) elsif self.class::AUTOMATE_DRIVES deliver_to_automate(req_type, zone) else From 75b9683016c36286093ed36f6b367fac779033d8 Mon Sep 17 00:00:00 2001 From: Adam Grare Date: Fri, 28 Jul 2023 13:16:21 -0400 Subject: [PATCH 2/2] Pass request task into workflow as object --- app/models/miq_request_task.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/miq_request_task.rb b/app/models/miq_request_task.rb index 4640658e6c6..b68d482d9f6 100644 --- a/app/models/miq_request_task.rb +++ b/app/models/miq_request_task.rb @@ -140,7 +140,7 @@ def deliver_queue(req_type = request_type, zone = nil) _log.info("Queuing #{request_class::TASK_DESCRIPTION}: [#{description}]...") if resource_action&.configuration_script_payload - resource_action.configuration_script_payload.run(:inputs => dialog_values, :userid => get_user.userid, :zone => zone) + resource_action.configuration_script_payload.run(:inputs => dialog_values, :userid => get_user.userid, :zone => zone, :object => self) elsif self.class::AUTOMATE_DRIVES deliver_to_automate(req_type, zone) else