Results 1 to 5 of 5

Thread: Accessing subflow name/expression from subflow state

  1. #1
    Join Date
    Jan 2010
    Posts
    9

    Default 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. #2

    Default

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

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

  3. #3
    Join Date
    Jan 2010
    Posts
    9

    Default

    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.

  4. #4

    Default

    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>

  5. #5
    Join Date
    Jan 2010
    Posts
    9

    Default

    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.

Posting Permissions

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