Announcement Announcement Module
Collapse
No announcement yet.
<flow:listener for (inline)subflows only Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

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

    Comment


    • #3
      Thanks Erwin...very helpful, as always.

      Cheers,

      Alph

      Comment

      Working...
      X