You have 2 options (here I am assuming your domain model has an entity called CurrentGeo with a latitude and longitude attribute):
Option 1: Mendix objects are passed into java actions by reference (just like objects in java). So, you need to create a new CurrentGeo entity in your microflow, then pass it in as a parameter to the java action. In the java action, you can use the setter methods to set the latitude and longitude values. When you return to the microflow, the CurrentGeo object will have the updated info.
Option 2: Create the new CurrentGeo object.
CurrentGeo newG = new CurrentGeo(getContext()
Then operate upon it by calling the setter methods. Finally, return newG by calling:
return newG.getMendixObject()
You should configure the Java action in the modeler to either pass the GeoLocation object as a parameter and fill it there so you can use it in the microflow later, or return it as a result of the action.
Note that you may have more serious issues running this, since you're trying to get the location by IP but without passing any parameters. All I can possibly see this library do is try to get the IP address of the server itself, which would be kinda pointless. You'd have to find a way to obtain and pass the IP of the client.
Or you might be better off using a client widget for this altogether.
That is correct Bas but not my question.
How can I retrieve these parameters to my Mendix object?
The part
getContext();
CurrentGeo.setLatitude((double) latitude1);
CurrentGeo.setLongitude((double) longitude2);
// CurrentGeo.setLatitude(this.getContext(Latitude), latitude1); // CurrentGeo.setLongitude(context, Longitude2); // Core.commit(context, CurrentGeo.getMendixObject()); // Core.execute(context, "WhereIAm", params); // END USER CODE
seems not to work!