Default flow id will be the path to the flow definition resource if a 'base-path' is provided on the flow-registry.  Otherwise the current convension of filename minus extension is used.  Flow locations are defined relative to the base-path
This commit is contained in:
Scott Andrews
2008-10-14 22:43:35 +00:00
parent 4fb4c65280
commit 7b4a3d25f6
8 changed files with 7 additions and 8 deletions

View File

@@ -20,9 +20,8 @@
</webflow:flow-executor>
<!-- The registry of executable flow definitions -->
<webflow:flow-registry id="flowRegistry" flow-builder-services="facesFlowBuilderServices">
<webflow:flow-location path="/WEB-INF/flows/main/main.xml" />
<webflow:flow-location path="/WEB-INF/flows/booking/booking.xml" />
<webflow:flow-registry id="flowRegistry" flow-builder-services="facesFlowBuilderServices" base-path="/WEB-INF/flows">
<webflow:flow-location-pattern value="**/*-flow.xml" />
</webflow:flow-registry>
<!-- Configures the Spring Web Flow JSF integration -->

View File

@@ -20,7 +20,7 @@ public class BookingFlowExecutionTests extends AbstractXmlFlowExecutionTests {
@Override
protected FlowDefinitionResource getResource(FlowDefinitionResourceFactory resourceFactory) {
return resourceFactory.createFileResource("src/main/webapp/WEB-INF/flows/booking/booking.xml");
return resourceFactory.createFileResource("src/main/webapp/WEB-INF/flows/booking/booking-flow.xml");
}
@Override

View File

@@ -29,7 +29,7 @@ public class MainFlowExecutionTests extends AbstractXmlFlowExecutionTests {
@Override
protected FlowDefinitionResource getResource(FlowDefinitionResourceFactory resourceFactory) {
return resourceFactory.createFileResource("src/main/webapp/WEB-INF/flows/main/main.xml");
return resourceFactory.createFileResource("src/main/webapp/WEB-INF/flows/main/main-flow.xml");
}
@Override

View File

@@ -17,8 +17,8 @@
</webflow:flow-executor>
<!-- The registry of executable flow definitions -->
<webflow:flow-registry id="flowRegistry" flow-builder-services="flowBuilderServices">
<webflow:flow-location id="hotels/booking" path="/WEB-INF/hotels/booking/booking.xml" />
<webflow:flow-registry id="flowRegistry" flow-builder-services="flowBuilderServices" base-path="/WEB-INF">
<webflow:flow-location-pattern value="**/*-flow.xml" />
</webflow:flow-registry>
<!-- Plugs in a custom creator for Web Flow views -->

View File

@@ -19,7 +19,7 @@ public class BookingFlowExecutionTests extends AbstractXmlFlowExecutionTests {
@Override
protected FlowDefinitionResource getResource(FlowDefinitionResourceFactory resourceFactory) {
return resourceFactory.createFileResource("src/main/webapp/WEB-INF/hotels/booking/booking.xml");
return resourceFactory.createFileResource("src/main/webapp/WEB-INF/hotels/booking/booking-flow.xml");
}
@Override