fjtirado commented on code in PR #3937:
URL: 
https://github.com/apache/incubator-kie-kogito-runtimes/pull/3937#discussion_r2439423728


##########
kogito-serverless-workflow/kogito-serverless-workflow-rest-runtime/src/main/java/org/kie/kogito/serverless/workflow/rest/RestKogitoProcessContextResolver.java:
##########
@@ -24,13 +24,25 @@
 import org.kie.kogito.internal.process.runtime.KogitoProcessContext;
 import 
org.kie.kogito.serverless.workflow.utils.KogitoProcessContextResolverExtension;
 
+import static 
org.kie.kogito.serverless.workflow.rest.JsonNodeResultHandler.FAIL_ON_STATUS_ERROR;
+import static 
org.kie.kogito.serverless.workflow.rest.JsonNodeResultHandler.RESPONSE_HEADERS;
+import static 
org.kie.kogito.serverless.workflow.rest.JsonNodeResultHandler.RETURN_HEADERS;
+import static 
org.kie.kogito.serverless.workflow.rest.JsonNodeResultHandler.RETURN_STATUS_CODE;
+import static 
org.kie.kogito.serverless.workflow.rest.JsonNodeResultHandler.RETURN_STATUS_MESSAGE;
 import static 
org.kie.kogito.serverless.workflow.rest.JsonNodeResultHandler.STATUS_CODE;
 import static 
org.kie.kogito.serverless.workflow.rest.JsonNodeResultHandler.STATUS_MESSAGE;
 
 public class RestKogitoProcessContextResolver implements 
KogitoProcessContextResolverExtension {
+
     @Override
     public Map<String, Function<KogitoProcessContext, Object>> 
getKogitoProcessContextResolver() {
-        return Map.of(JsonNodeResultHandler.STATUS_CODE, k -> 
k.getVariable(STATUS_CODE),
-                JsonNodeResultHandler.STATUS_MESSAGE, k -> 
k.getVariable(STATUS_MESSAGE));
+        return Map.of(
+                JsonNodeResultHandler.RETURN_HEADERS, k -> 
k.getVariable(RETURN_HEADERS),
+                JsonNodeResultHandler.RETURN_STATUS_CODE, k -> 
k.getVariable(RETURN_STATUS_CODE),
+                JsonNodeResultHandler.RETURN_STATUS_MESSAGE, k -> 
k.getVariable(RETURN_STATUS_MESSAGE),
+                JsonNodeResultHandler.FAIL_ON_STATUS_ERROR, k -> 
k.getVariable(FAIL_ON_STATUS_ERROR),
+                JsonNodeResultHandler.STATUS_CODE, k -> 
k.getVariable(STATUS_CODE),
+                JsonNodeResultHandler.STATUS_MESSAGE, k -> 
k.getVariable(STATUS_MESSAGE),
+                JsonNodeResultHandler.RESPONSE_HEADERS, k -> 
k.getVariable(RESPONSE_HEADERS));

Review Comment:
   The only one that you need to add is RESPONSE_HEADERS (so there are three 
variables that the user will check, status_code, status_mesage (already 
present) and the response headers (added by this PR)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to