how to get microflow name with javaaction?

0
I want to create a JavaAction that outputs logs like '{microflow name} is called' just by placing it in a microflow. But I don't know how to get the name of the microflow where the activity is placed.I would like an example of code on how I can get it.
asked
2 answers
1

Hello Morimoto,

 

Have you tried out the suggestions in these posts:

 

https://community.mendix.com/link/space/java-actions/questions/91216

 

https://community.mendix.com/link/space/studio-pro/questions/90433

 

Hope this helps,

 

Good luck

answered
0

Hi Morimoto,

 

The Emixa commons module from the marketplace has a java action called like that: GetCurrentMicroflow

 

Emixa commons module

 

This will return the current microflow name or depending on the parameter an above microflow.

 

You can use this action in combination with a subflow to create what you want or use it as an example to create what you want. Personally I would opt for the subflow approach it's easy to create and you can add it to your toolkit.

answered