Trigger a microflow from java application

0
I'm currently working on a project where a button triggers a java application. When the user completes an action within this java application I want to trigger a microflow to display a message in the mendix app. I tried calling the Core.execute() method in java but this doesn't seem to work. Is there any way to achieve this? Edit: It seems the java application can call the microflow but the showMessage that is called by the microflow does not show up in the browser afterwards.
asked
4 answers
0

Take a look at the community commons module executeMicroflowAsUser action. I think you find here what you are looking for.

Regards,

Ronald

answered
0

I have struggled with something similar. I ended up returning an object from the Java action and let the microflow that calls the Java action do the display message. Maybe that could work for you too. You could also return a boolean or pass an object as parameter and change it in the Java code. Non-persistent entities can be a great help with these situations.

answered
0

The problem is probably that the showmessage only works in the same context as the current user. If you loose that context or run in a system context the message will not be displayed in the browser.

You can try notify widget from the appstore to achieve this.

answered
0

Please check the API, there you will find a method, like addFromFeedback (something like that). may be that will helps.

There is another way to do about it... Create a microflow, which will open a page( may be a blank one..)show the message. Call that microflow from the java action.

Hope this helps!

answered