Get name of parent microflow in a subflow

0
Hi everyone,   A simple question: does anyone know of a way to log/track in a subflow what the name the of parent microflow was that called it?    
asked
3 answers
3

There is a java action "GetCurrentMicroflow" in EmixaCommons that can get you the name of the current microflow (level = 1) or it's parent (level = 2) or grandparent (level = 3) etc. You could also get the complete stack using your own custom java action of course, using the getActionStack function.

 

 

answered
-1

Hi Richard,

 

I don't think any default logic for that, but you can pass string from parent microflow and log it in submicroflow manually. 

 

Hope it helps!

Thanks & Regards,

Manikandan K

answered
-1

Mendix doesn’t provide a direct way to track the name of the parent microflow that called a sub-microflow. However, you can manually pass the name of the parent microflow as a parameter to the sub-microflow. Here’s how:

  1. Add a Parameter to the Sub-Microflow: Create a parameter in the sub-microflow (e.g., ParentMicroflowName as a String).

  2. Pass the Name in Each Call: In each parent microflow, when you call the sub-microflow, pass the parent microflow’s name as a string.

  3. Log the Information: Within the sub-microflow, you can then log the ParentMicroflowName or use it as needed.

If your sub-microflows are frequently called from various microflows, this can become a useful manual tracking approach. For more automated tracking, consider creating a logging microflow where you standardize and centralize such logging practices.

answered