This commit is contained in:
Keith Donald
2008-06-06 05:20:37 +00:00
parent 55ae985655
commit d277e83509

View File

@@ -42,6 +42,18 @@ protected void configureFlowBuilderContext(MockFlowBuilderContext builderContext
builderContext.registerBean("bookingService", new StubBookingService());
}]]>
</programlisting>
<para>
If your flow extends from another flow, or has states that extend other states,
also override <code>getModelResources(FlowDefinitionResourceFactory)</code> to return the path to the parent flows.
</para>
<programlisting language="java"><![CDATA[
@Override
protected FlowDefinitionResource[] getModelResources(FlowDefinitionResourceFactory resourceFactory) {
return new FlowDefinitionResource[] {
resourceFactory.createFileResource("src/main/webapp/WEB-INF/flows/common/common.xml")
};
}]]>
</programlisting>
</sect1>
<sect1 id="testing-flowstartup">
<title>Testing flow startup</title>
@@ -127,6 +139,7 @@ public Flow createMockBookingSubflow() {
});
// immediately return the bookingConfirmed outcome so the caller can respond
new EndState(mockBookingFlow, "bookingConfirmed");
return mockBookingFlow;
}]]>
</programlisting>
</sect1>