Results 1 to 3 of 3

Thread: <flow:listener for (inline)subflows only

  1. #1
    Join Date
    Mar 2006
    Posts
    119

    Default <flow:listener for (inline)subflows only

    is there a way to specify that a listener should ONLY listen to a subflow?

    I have an inline subflow and I would like to give a criteria to the flow:listener referencing this ONLY.

    Given:

    Code:
    	
    
    <subflow-state id="scriptingSubflow" flow="scriptingInlineFlow">
      ...
    </subflow-state>
    
    <inline-flow id="scriptingInlineFlow">
    ...
    </inline-flow>
    So far, I have tried specifying:

    Code:
    <flow:listener ref="backToLastViewStateLifecycleListener"
      criteria="scriptingInlineFlow" />
    And:

    Code:
    <flow:listener ref="backToLastViewStateLifecycleListener"
      criteria="scriptingSubflow" />
    To no effect.

    Any pointers gratefully received.

    I am assuming that restricting a listener to a given subflow will be better for performance than otherwise...

    Cheers,

    Alph

  2. #2
    Join Date
    Sep 2004
    Location
    Leuven, Belgium
    Posts
    1,853

    Default

    A FlowExecutionListener observes a FlowExecution and all flows in it (parent & subflows), so you can't attach a listener to just the subflow. What you can do however is have the FlowExecutionListener test what flow is currently running and take action as appropriate. Use the methods provided by the RequestContext to do this.

    Performance impact should be minimal.

    Erwin

  3. #3
    Join Date
    Mar 2006
    Posts
    119

    Default

    Thanks Erwin...very helpful, as always.

    Cheers,

    Alph

Posting Permissions

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