cancel
Showing results for 
Search instead for 
Did you mean: 

Driving Menus Using BPMN

izaak
Champ in-the-making
Champ in-the-making
I'm trying to drive my app's menu system via the process only, the first way to do this that occured to me was to find outgoing sequenceFlows for a given exclusive gateway.

Reading this post:Is this correct way to get outgoing transitions?, and this post Querying ExclusiveGateway and other gateways.

Leads me to believe that there is no intent for a given exclusive gateway to be able to find it's possible outoing sequenceFlows (or at least doing so is a bad idea). I believe i understand the desire for this - the sequenceFlow should be the things that determine which one is taken (so that they could be executed in parallel).

My idea is that I don't want to have to specify twice what the possible options are for any given exclusive gateway (i.e. in the menu, or in the user task, and in the criteria of the sequenceFlow itself). This would allow me to dynamically drive my process dependant only on the process itself (i.e. draw buttons for each sequenceFlow name, set process variables based on button pushed as the name of the sequenceFlow) Then if a user chooses to add additional sequenceFlows to a given gateway the UI doesn't have to be explicitly aware of it.

This to me seems very reasonable (mostly because it's about reducing duplication). Am I missing something?

Thanks for your time
3 REPLIES 3

jbarrez
Star Contributor
Star Contributor
Your analysis is correct. The 'right' BPMN 2.0 way to do it is indeed duplicating that information in the choice for the user and in the sequenceflow.

If it is a matter of the user selecting themselves which sequence flow to take, you could look into adding those sequence flow without an exclusive gateway, straight out of the task …. However, you would need specific conditions on the outgoing sequence flow still, something like 'sequenceFlowId == blah'.

So another thing you could do, is write your own activitybehaviour that only takes one outgoing sequenceflow instead the default way of taking everything in parallel.

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
Or parse the xml and get the information from the conditions on the sequence flows

jbarrez
Star Contributor
Star Contributor
In the 5.11 release, we'll have an easy xml -> pojo parser in there which you can use as enhancement on Ronald's suggestion.