Announcement Announcement Module
Collapse
No announcement yet.
Registrering custom flowhandler does not work for me? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Registrering custom flowhandler does not work for me?

    I am using SWF 2.0.5 on a IBM Websphere Portal Server 6.0.1.4.

    Since redirects in a portal does not work unless you implement your own FlowHandler (section 13.6.1 in the SWF reference) I would like to do so.

    My flowId is "kreditsagFlow", so according to section "10.4. Implementing custom FlowHandlers" I need to register a bean with a name-attribute containing the flowId value.

    Code:
    <bean name="kreditsagFlow" class="dk.jyskebank.test.PrivatkreditPortletFlowHandler" />
    The custom flowhandler extends org.springframework.webflow.mvc.portlet.AbstractFl owHandler.

    In the custom flow handler I have extended all the methods that could be extended and I have set breakpoints in every method. None of the breakpoints are triggered, and I can see no evidence of the handler being loaded in the log (I have debug enabled).

    My question is how do I find out what I did wrong, is there some way I can see what flowhandler is used instead (the other beans declared in the same file are loaded) - or can I programmatically set the FlowHandler some way so that I can verify that redirects actually do work as described on a IBM WPS?
    Last edited by joensson; Feb 6th, 2009, 03:03 AM. Reason: for some reason a space is inserted in the classname of AbstractFlowHandler when viewing the post. It is not there when editing the post?

  • #2
    I have also tried:

    Code:
        <bean id="customFlowHandler" class="dk.jyskebank.test.PrivatkreditPortletFlowHandler">
        </bean>
    
        <bean id="portletModeHandlerMapping" class="org.springframework.web.portlet.handler.PortletModeHandlerMapping">
            <property name="portletModeMap">
                <map>
                    <entry key="view">
                        <ref bean="customFlowHandler" />
                    </entry>
                </map>
            </property>
        </bean>
    In my logs I can see that the "customFlowHandler" is instantiated - but it is never called - the handleExecutionOutcome/handleException methods are never invoked...

    The log statements when starting my app look like this (I marked the lines referring to my flowhandler with red text):
    Code:
    [11-02-09 13:33:56:984 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.factory.support.DefaultListableBeanFactory) - Creating shared instance of singleton bean 'customFlowHandler'
    [11-02-09 13:33:56:984 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.factory.support.DefaultListableBeanFactory) - Creating instance of bean 'customFlowHandler'
    [11-02-09 13:33:56:984 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.factory.support.DefaultListableBeanFactory) - Eagerly caching bean 'customFlowHandler' to allow for resolving potential circular references
    [11-02-09 13:33:56:984 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.factory.support.DefaultListableBeanFactory) - Finished creating instance of bean 'customFlowHandler'
    [11-02-09 13:33:56:984 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.factory.support.DefaultListableBeanFactory) - Creating shared instance of singleton bean 'portletModeHandlerMapping'
    [11-02-09 13:33:56:984 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.factory.support.DefaultListableBeanFactory) - Creating instance of bean 'portletModeHandlerMapping'
    [11-02-09 13:33:57:000 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.factory.support.DefaultListableBeanFactory) - Eagerly caching bean 'portletModeHandlerMapping' to allow for resolving potential circular references
    [11-02-09 13:33:57:000 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.factory.support.DefaultListableBeanFactory) - Returning cached instance of singleton bean 'customFlowHandler'
    [11-02-09 13:33:57:000 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.factory.support.DefaultListableBeanFactory) - Returning cached instance of singleton bean 'customFlowHandler'
    [11-02-09 13:33:57:000 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.factory.support.DefaultListableBeanFactory) - Returning cached instance of singleton bean 'customFlowHandler'
    [11-02-09 13:33:57:000 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.CachedIntrospectionResults) - Getting BeanInfo for class [org.springframework.web.portlet.handler.PortletModeHandlerMapping]
    [11-02-09 13:33:57:015 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.CachedIntrospectionResults) - Caching PropertyDescriptors for class [org.springframework.web.portlet.handler.PortletModeHandlerMapping]
    [11-02-09 13:33:57:015 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.CachedIntrospectionResults) - Found bean property 'applicationContext' of type [org.springframework.context.ApplicationContext]
    [11-02-09 13:33:57:015 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.CachedIntrospectionResults) - Found bean property 'applyWebRequestInterceptorsToRenderPhaseOnly' of type [boolean]
    [11-02-09 13:33:57:015 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.CachedIntrospectionResults) - Found bean property 'class' of type [java.lang.Class]
    [11-02-09 13:33:57:015 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.CachedIntrospectionResults) - Found bean property 'defaultHandler' of type [java.lang.Object]
    [11-02-09 13:33:57:015 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.CachedIntrospectionResults) - Found bean property 'interceptors' of type [[Ljava.lang.Object;]
    [11-02-09 13:33:57:015 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.CachedIntrospectionResults) - Found bean property 'lazyInitHandlers' of type [boolean]
    [11-02-09 13:33:57:015 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.CachedIntrospectionResults) - Found bean property 'mappings' of type [java.util.Properties]
    [11-02-09 13:33:57:015 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.CachedIntrospectionResults) - Found bean property 'order' of type [int]
    [11-02-09 13:33:57:015 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.CachedIntrospectionResults) - Found bean property 'portletModeMap' of type [java.util.Map]
    [11-02-09 13:33:57:015 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.web.portlet.handler.PortletModeHandlerMapping) - Mapped key [view] onto handler [dk.jyskebank.test.PrivatkreditPortletFlowHandler@7f317f31]
    [11-02-09 13:33:57:015 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.factory.support.DefaultListableBeanFactory) - Finished creating instance of bean 'portletModeHandlerMapping'
    [11-02-09 13:33:57:015 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.factory.support.DefaultListableBeanFactory) - Creating shared instance of singleton bean 'flowHandlerAdapter'
    [11-02-09 13:33:57:015 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.factory.support.DefaultListableBeanFactory) - Creating instance of bean 'flowHandlerAdapter'
    [11-02-09 13:33:57:015 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.factory.support.DefaultListableBeanFactory) - Eagerly caching bean 'flowHandlerAdapter' to allow for resolving potential circular references
    [11-02-09 13:33:57:015 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.factory.support.DefaultListableBeanFactory) - Returning cached instance of singleton bean 'flowExecutor'
    [11-02-09 13:33:57:015 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.CachedIntrospectionResults) - Getting BeanInfo for class [org.springframework.webflow.mvc.portlet.FlowHandlerAdapter]
    [11-02-09 13:33:57:047 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.CachedIntrospectionResults) - Caching PropertyDescriptors for class [org.springframework.webflow.mvc.portlet.FlowHandlerAdapter]
    [11-02-09 13:33:57:047 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.CachedIntrospectionResults) - Found bean property 'applicationContext' of type [org.springframework.context.ApplicationContext]
    [11-02-09 13:33:57:047 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.CachedIntrospectionResults) - Found bean property 'cacheSeconds' of type [int]
    [11-02-09 13:33:57:047 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.CachedIntrospectionResults) - Found bean property 'class' of type [java.lang.Class]
    [11-02-09 13:33:57:047 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.CachedIntrospectionResults) - Found bean property 'flowExecutor' of type [org.springframework.webflow.executor.FlowExecutor]
    [11-02-09 13:33:57:047 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.CachedIntrospectionResults) - Found bean property 'flowUrlHandler' of type [org.springframework.webflow.context.portlet.FlowUrlHandler]
    [11-02-09 13:33:57:047 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.CachedIntrospectionResults) - Found bean property 'portletContext' of type [javax.portlet.PortletContext]
    [11-02-09 13:33:57:047 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.CachedIntrospectionResults) - Found bean property 'requireSession' of type [boolean]
    [11-02-09 13:33:57:047 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.factory.support.DefaultListableBeanFactory) - Invoking afterPropertiesSet() on bean with name 'flowHandlerAdapter'
    [11-02-09 13:33:57:047 CET] 0000006a SystemOut     O ** DEBUG (org.springframework.beans.factory.support.DefaultListableBeanFactory) - Finished creating instance of bean 'flowHandlerAdapter'
    Do I need to do something else to register my flowhandler in a portal environment?
    Last edited by joensson; Feb 11th, 2009, 06:36 AM.

    Comment


    • #3
      Did you ever get any response on this? I'm having the exact same problem in a servlet environment.

      Comment


      • #4
        Originally posted by mrbill43 View Post
        Did you ever get any response on this? I'm having the exact same problem in a servlet environment.
        No, I did not hear anything regarding this problem. If you happen to fix it, I'd still like to know how :-)

        Regards,
        Flemming

        Comment


        • #5
          I would recommend having a look at the booking samples which use a custom FlowHandler in addition to checking out the documentation in the Spring MVC integration section.

          Good luck

          Keith

          Comment

          Working...
          X