Core.executeAsync mutiple parameters

Hi, I'm trying to call a microflow asynchronous out of a java action: Core.executeAsync(c, MicroflowName, Parameter1, Parameter2); Both parameters are IMendixObjects. In my microflow I'm retrieving only the first object. Same if I try to pass a simple datatype instead of an IMendixObject. Has anyone else used that method before with multiple parameters and knows how to do that? Thanks, Tobias
3 answers

The regular execute method has an overload where you can pass a map with parameters by their names. This is not implemented for the executeAsync method, but it would be a minor feature. You could file a request for this. Though normally this situation should still work, but perhaps there is a problem with the entities being of the same type or in the same inheritance hierarchy?


Hi Tobias,

If you pass a Map object this will probably work, but note that you have to use the exact names of the parameters:

Core.executeAsync(c, MicroflowName, ImmutableMap.of("paramname1", (Object) Parameter1, "paramname2", Parameter2)));

Hi Michel,

I already tried with a map:

Map<String,Object> parameters = new HashMap<String, Object>();
parameters.put("ExecutionLog", ParameterParameter1);
parameters.put("ParentExecutionLog", Parameter2);
Core.executeAsync(c, MicroflowName, parameters);

this is working when I used Core.execute. But with Core.executeAsync it is not working. If I look at the api documentation the method with a map as parameter is only availanle for Core.execute and not for Core.executeAsync.