Announcement Announcement Module
Collapse
No announcement yet.
Access Flow ID Programmically Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Access Flow ID Programmically

    I'm looking for a way to access the user's current Flow ID so that we can identify the sub-flow the user is in as part of a Workflow process (if the user is in FlowA, it corresponds to Step1, so that step is bolded and highlighted in the UI). I could set a static variable in the flowscope of each sub-flow, but it seems overkill just to get an ID value that should already exist somewhere.

  • #2
    RequestContext

    hello there,

    you could extend FormAction and use one is methods with RequestContext as a parameter. You can then retrieve the active flow and perform your logic.


    Kris

    Comment


    • #3
      True, context.getActiveFlow().getId() would have it. It seems this should be inherently available within the FlowScope so you could immediately access it in decision-states and views. I can work with this though... thanks!

      Comment


      • #4
        Just out of curiosity, I tried to get the ID within the JSP directly through the request context - context.getActiveFlow().getId():

        Code:
        <c:out value="${activeFlow.id}"/>
        And that doesn't return anything. I'm not even sure if that would have been an alternate approach, just thought I'd try...

        Comment

        Working...
        X