See the Java API tutorial for an example of this, at https://world.mendix.com/display/NRG/Java+API+Tutorial
You will need to cast the return object to the type of object that the microflow returns, so either a Java type or a(n) (list of) IMendixObject(s)