If you want to apply your business rule(s) on a single object, and you know the object's GUID (because you saved its GUID somewhere, after getting it through e.g. CommunityCommons.GetGUID), you could use the following code to retrieve the object (belonging to an arbitrary entity):
IMendixIdentifier newID = Core.createMendixIdentifier(Integer.parseInt(GUID)); IMendixObject newObject = Core.retrieveId(getContext(), newID);
This saves you some trouble with XPath, but it’ll be hard to pass such an object back to a microflow.
You could test it by creating a Java action with an object input and doing:
IMendixIdentifier initialID = inputObject.getId(); String GUID = initialID.toString(); IMendixIdentifier newID = Core.createMendixIdentifier(Integer.parseInt(GUID)); IMendixObject newObject = Core.retrieveId(getContext(), newID);
Yes it is possible. You can do generic retrieves in java. There are multiple retrieve actions in the Core class. You can use one or the other, depending on what you want to achieve. You can create your xpath based on the information you get from MxModelReflection.
You will get an IMendixObject (Or a List of IMendixObjects). With this IMendixObject you can do whatever you want. If you have the names of the attributes from the objects of ModelReflection you can read or manipulate data on it.