Passing Object as a parameter

Hi All,   I'm from java background and I want to pass an "OBJECT" type as object as a parameter to a microflow and it is a generic object like is java. But here it is mandated to choose an entity all the time. Is it possible to do how we do it in java. Or we should create an non persisteble entity and pass that as parameter. Like Only in mendix way.   Thanks, Gopi
2 answers

Hi Gopinath,

 It is totally possible. You can create a java action and in the microflow from where you are calling java action you can create a parameter of object and pass the same object as parameter in the java action. I am attaching screen shots for your reference. 

Here, I am calling java action using a microflow and organization object is passed as a parameter.



Here you can see there is add parameter button where you can select object and pass the same parameter object.



And then you can deploy for eclipse, and you will get the object in java action.

Hope it helps and let me know if you still face issue.


All the best,

Dibyanshu Singh

Resilient IT Services


Hi Gopinath,

It's not possible to pass "OBJECT" to java action, but with some "stupid" code you will able to do it, you can pass two string entityName and GUID where you can later use in your retrieve in java action, with following code you solve issue with getting your generic "OBJECT" to Java action, but then next issue is how to return to microflow, nothing really come to my mind how to solve, only rest of logic create in java.


Let us know if you solve this, Best regards Slavko.