Community commons executeMicroflowAsUser_2

0
Hi,  I have a requirement to create objects using the above microflow and use those objects outside of the microflow. The problem is that since the microflow doesn’t support mendix objects as input/output parameters, I tried associating these objects to a wrapper object. But when I retrieve them outside the Java action, they are shown empty. Are the objects created in the microflow destroyed when the Java action execution is completed(I guess because the delegated session is destroyed)?  if so how can we retain them? One option that I thought of is by modifying the existing Java action to support Mendix objects as either input or output. Is there any simpler way to do this? PS, I need the ‘execute as user’ part as we have many Enum captions in different languages  which needs to be added to the new object and I don’t want to hard code them.  They get added depending on the user.   Edit: The objects are Non-persistable and both the users have complete access.  Thanks in Advance  
asked
2 answers
0

Non persistable objects live only client side and can not be passed to other users. Make it a persistable object and use commit in seperate database transaction (community commons) to make that object directly visible / retrievable for other users.

Regards,

Ronald

 

answered
0

Objects would be committed in the microflow if you have a Commit or Change with commit action.

If you are executing the microflow as a different user, then the problem could well be one of permissions where the two users don’t have the permission to access or change the same objects as each other. What security do you have on these entities?

Update: Non-persistent entities can not be shared between users. See this page for more details - https://www.mendix.com/evaluation-guide/app-capabilities/data-storage/

answered