Results 1 to 4 of 4

Thread: Access Flow ID Programmically

  1. #1
    Join Date
    Jul 2006
    Posts
    138

    Default 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. #2
    Join Date
    Jul 2007
    Location
    Mauritius
    Posts
    127

    Default 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

  3. #3
    Join Date
    Jul 2006
    Posts
    138

    Default

    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!

  4. #4
    Join Date
    Jul 2006
    Posts
    138

    Default

    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...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •