Passing a microflow as a parameter

1
Hi everybody, I'm new to Mendix and I hope you can help me. I'd like to pass as a  to a microflow another microflow as a parameter. This because I want to execute the same logic before and after the execution of a set of predefined microflows Is it possible? Thai you Alessandro
asked
4 answers
5

Hi Alessandro, 

I'm not familiar with the possibility to add a microflow as parameter to another microflow. However I think that extracting the same logic to a sub microflow would help you with your request. More information about extracting and creating a sub microflow can be found here: https://docs.mendix.com/howto/logic-business-rules/extract-and-use-sub-microflows

 

Hope that helps :-)

answered
3

Thank you Jeffrey, I'll read it.

 

Alessandro

answered
2

Hi Alessandro,

You can pass a microflow name as a String and then use the java action executeMicroflow to run it.
This however leaves you open to runtime errors if the microflow name was changed.

An alternative would be to use the ProcessQueue module and send a Process Name as a String and then run it with a java action. This also comes with the benefit that the job will be executed asyncrhonusly.

-Andrej

answered
1

Thank you...

this definitely helps.

answered