Announcement Announcement Module
Collapse
No announcement yet.
Accessing subflow name/expression from subflow state Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Accessing subflow name/expression from subflow state

    <subflow-state id="testSubFlow" subflow="testsubflow">

    From any listener or action, is there a way to read this "subflow" expression value?. Looks like the spring "SubFlowState" does not provide easy access to this and this is not accessible through getAttributes() on the state. I am seeking a generic way to get this.

  • #2
    I just put the flow name to a variable in flowscope or viewscope..
    Maybe not good, but it works.

    Originally posted by aybh View Post
    <subflow-state id="testSubFlow" subflow="testsubflow">

    From any listener or action, is there a way to read this "subflow" expression value?. Looks like the spring "SubFlowState" does not provide easy access to this and this is not accessible through getAttributes() on the state. I am seeking a generic way to get this.

    Comment


    • #3
      Yeah thats not a scalable solution. I am surprised Spring's SubFlowState does not make this available to query. It would have been also nice to get a handle on subflowattributemapper for example during exceptions. That is also inaccessible and internal to the SubFlowState. And I don't want to supply a custom subflowattributemapper.

      Comment


      • #4
        get current flow id using:
        flowExecutionContext.activeSession.definition.id

        get parent flow id in a flow using:
        flowExecutionContext.activeSession.parent.definiti on.id

        tested with:
        Code:
        <set name="conversationScope.test" value="flowExecutionContext.activeSession.parent.definition.id"></set>

        Comment


        • #5
          This does not help. From within the subflow you can access the flow id and the parent flow id but that is not what I was looking for.

          Comment

          Working...
          X