Pass identifier to a microflow or nanoflow

1
Hello, My question is pretty basic. I have 8 associations to an approver list.  each association is filled out with an approver, half the associations are for finance people, the other half are for the sales people.   On a page I have 8 reference selectors to choose from a list of finance and sales people.   I use a microflow to limit the list down depending on what has been chosen on each prior step.   Anyway… I now have 8 different workflows that are literally the same exact thing except for the associative path that I need to fill out. So when I choose the change object in a microflow, I literally have to make a new one just to say change object for MyFirstModule.Areas/MyFirstModule.FINANCE_EMAIL, then another for MyFirstModule.Areas/MyFirstModule.SALES_EMAIL etc…   So instead of having 8 different microflows, I was curious if the microflow knew where the event that called it came from?   for example in javascript with an event, you can find the id of the element that caused the event to be triggered…  Is there something like this? If so I would then be able to create 1 WF that has a series of if statements (switch statement) that can change the association accordingly.   
asked
2 answers
0

You might want to look into java actions for this as the on change action is ‘hard coded’. The mapping is set in the MF and can’t be influenced at runtime. Maybe with some actions to find the changed member (community commons) and some splits you would be able to implement this in a MF, but maybe some more flexibility is available when implementing this in a java action.

answered
0

Not certain, but this might work:

Create 4 different specializations of Approver each for one type of sales person. No extra attributes.
Create 4 different specializations of Approver each for one type of financial person. No extra attributes.
Connect the associations to theses specialization entities. Now your microflow, which still takes the generalization as the input parameter, can know what type of entity called the microflow.

answered