Call Microflow from JavaAction with parameter is a HttpResponse

0
Hello everyone,  I’m trying calling a microflow from JavaAction as below.  Map<String, Object> params = new LinkedHashMap<String, Object>(); params.put("httpResponse", this.HttpResponse); params.put("listObjects", listObjects); MicroflowCallBuilder result = Core.microflowCall(MicroflowName).withParams(params).execute(this.context()); When calling the above JavaAction, Mendix throw an Exception error: com.mendix.systemwideinterfaces.MendixRuntimeException: Unsupported value: system.proxies.HttpResponse@a8a2eaec (class system.proxies.HttpResponse)     at com.mendix.basis.value.MendixValue$.apply(MendixValue.scala:85)     at com.mendix.basis.actionmanagement.MicroflowCallBuilderImpl.withParam(MicroflowCallBuilderImpl.scala:28)     at com.mendix.basis.actionmanagement.MicroflowCallBuilderImpl.withParam(MicroflowCallBuilderImpl.scala:17)     at com.mendix.core.actionmanagement.MicroflowCallBuilder.withParams(MicroflowCallBuilder.java:30)     at com.mendix.basis.actionmanagement.InternalMicroflowCallBuilder.withParams(InternalMicroflowCallBuilder.scala:15)     at com.mendix.basis.actionmanagement.InternalMicroflowCallBuilder.withParams$(InternalMicroflowCallBuilder.scala:14)     at com.mendix.basis.actionmanagement.MicroflowCallBuilderImpl.withParams(MicroflowCallBuilderImpl.scala:17)     at com.mendix.basis.actionmanagement.MicroflowCallBuilderImpl.withParams(MicroflowCallBuilderImpl.scala:17)   It's seem be like Mendix does not support type "HttpResponse" as param when calling from JavaAction. Does anyone have experence about this issue?
asked
1 answers
2

I think you’d need to call getMendixObject() on this.HttpResponse when you pass it as a parameter. Try the following...
 

Map<String, Object> params = new LinkedHashMap<String, Object>();
		      params.put("httpResponse", this.HttpResponse.getMendixObject());
		      params.put("listObjects", listObjects);
		      MicroflowCallBuilder result = Core.microflowCall(MicroflowName).withParams(params).execute(this.context());


Hope this helps.

answered