Can Model Reflection (or similar) be used to map microflows in the UI?

I have a bit of an interesting requirement that I'm trying to solve more elegantly.  There is an API that retrieves a list of compliance rules. Each rule needs to be mapped to some logic that can verify if the rule has been satisfied.  The list of rules can change from time to time, and if/when that happens a user will need to remap them to the logic, or request new logic to be created to satisfy the rules.  Currently, my implementation uses REST calls which each invoke a microflow to determine if the rule is broken or not. This works fine, but the setup is a little complicated. It requires three steps:    1. Create the rule check microflow    2. Create a REST call to invoke the microflow    3. Map the rest call to the compliance rule in the UI I'm wondering if it's possible to use something like the Model Reflection module to allow users the mapping of rules to microflows in the UI without the need for the REST calls. 
1 answers

That could work. The Mx Model Reflection module will give you the names and parameters of the microflows. You can then use the Community Commons module ExecuteMicroflow actions to execute the microflow by passing its name as a String. There are Java Actions to run microflows with zero, one, or two parameters. You can also choose which user needs to run these actions.


You would need to build your own UI to link up the results from Mx Model Reflection and executing the selected microflows.


Good luck!