Announcement Announcement Module
No announcement yet.
How to make a flow only executable as a sub flow Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to make a flow only executable as a sub flow

    I have a flow defined "participantTransaction" that invokes a subflow "selectParticipant". The sub flow works as expected.

    I was wondering if there is a way to keep the flow "selectParticipant" from being directly invoked as the main flow since it will only ever be used as a subflow to another flow?



  • #2
    You might be able to use the FlowExecutionListener interface to do this. You could implement a sessionStarting method that looks to see if the flowSession has a parent flow and throw an exception if it does not. The listener will fire for all flows so you will some way of indicating that specific flows should not be started directly (perhaps use a flow attribute).

    For inspiration, take a look at the SecurityFlowExecutionListener that is used to handle secured flows.