I've created a custom Java action in the modeler and managed to call it successfully from a microflow. The Java Action requires a parameter of a metaobject I've defined, "Person", which has a name (a String), a date of birth and an age (an integer). I'd like to use the Java action to set the age, based on the date of birth and the current date, but I can't really figure out how to do it.
The basics of programming with Mendix objects in Java are explained here: Java basics in Mendix, you will find an explanation + some examples there.
I wouldn't know how to calculate a persons age, but the website of Java might help you with this (Java Sun website)
In the Java action you created you can change the incoming Person object using the generated Java proxies.