Announcement Announcement Module
No announcement yet.
Determine if flow is a subflow or top level flow Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Determine if flow is a subflow or top level flow


    one of my flows can be executed either directly or as a sub-flow of another flow. If it's a sub-flow, I want to display a BACK button, so that one can return to the calling flow.

    How do I determine that a flow is executed as a sub flow? or as a top level flow?

    Thank you!

  • #2
    I haven't looked into a programmatic way to find this out, but there is a quick hack you can do for this.

    Have the flow take an input boolean as a flag that it's a subflow. Whenever you call the flow as a subflow, pass true for that input flag. You can evaluate this value (it will be flow-scoped) on your page. If the flow was executed as a subflow, the flag will be true. If not, then the flag will be null, and won't evluate to true.


    • #3
      I think what you want is:

      requestContext.getFlowExecutionContext().getActive Session().isRoot()


      • #4
        Hi! Thank you both for great ideas!