Announcement Announcement Module
Collapse
No announcement yet.
Testing webflow with inheritance, No flow model found Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Testing webflow with inheritance, No flow model found

    Hi,

    I'm trying to test a webflow that has a parent flow.
    I'm following the documentation and it says 'If your flow extends from another flow, or has states that extends other states, also override getModelResources to return the path to parent flows.'

    http://static.springsource.org/sprin...l/ch15s04.html

    But it NEVER calls the overridden method were I'm trying to add my parent flow, it always calls the method getModelResources() in AbstractXmlFlowExecutionTests class.

    MyFlowExecutionTest.java
    Code:
    public class MyFlowExecutionTest extends AbstractXmlFlowExecutionTests {
    
        public MyFlowExecutionTest() {}
    
        @Test
        public void testFlowStart() {
           //we're testing :)
        } 
    
        @Override
        protected FlowDefinitionResource getResource(FlowDefinitionResourceFactory resourceFactory) {
            return resourceFactory.createFileResource(myFlow-test.xml);
        }
    
        @Override
        protected void configureFlowBuilderContext(MockFlowBuilderContext builderContext) {
            // Register beans
            builderContext.registerBean("mockBean",   this.mockBean);
        }
         /*
          *  This method is never called
          */    
        @Override
        protected FlowDefinitionResource[] getModelResources(FlowDefinitionResourceFactory rf) {
                return new FlowDefinitionResource[] {
                       rf.createFileResource("parent-flow.xml");
                };
        }
    }
    Any help much appreciated.

    Thanks

    M
Working...
X