PDA

View Full Version : Couple of Questions to the Team


portlet2
Apr 15th, 2006, 01:55 AM
Hi Guys,

Can you tell me where I can find the example of setting the XML file for using Java Flow Builder.

It seems all confusing as the API still has old information which is no longer available in 1.0 ea library.
There is no FlowFactoryBean. It looks like the whole config package is replaced by a different looking registry
package.

Please show me a pointer towards using webflow using Java API.

I have created the states and the java class, what needs to go in xml files.

Any help appreciated.

Thanks

Keith Donald
Apr 15th, 2006, 08:14 AM
Please review the Phonebook sample application and reference documentation for examples of how to build flows with Java and deploy them into a Flow registry. There is no XML required if you are defining your flows in Java.

Please review the changelog for 1.0 ea and you'll see the config package has been replaced by the builder package, and the *FactoryBean classes in PR5 are replaced by the registry infrastructure.

You might also find this PR5 porting thread helpful:
http://forum.springframework.org/showthread.php?t=22856

If something still doesn't make sense, let us know specifically so we can improve it.

Keith

portlet2
Apr 15th, 2006, 11:36 AM
Hi

I have looked at the phonebook application and noticed the flowbuilders there.
What I mean by XML here is not the xml-flow files declaring the states but the
xml bean declaration that needs to be done instead of

<!-- I hope this should remain the same-->
<bean name="/controller.htm" class="org.springframework.webflow.executor.mvc.FlowContr oller">
<property name="flowExecutor" ref="flowExecutor"/>
</bean>
<!--this stays the same? -->
<bean id="flowExecutor" class="org.springframework.webflow.executor.FlowExecutorI mpl">
<constructor-arg>
<bean id="repositoryFactory" class="org.springframework.webflow.execution.repository.c ontinuation.ContinuationFlowExecutionRepositoryFac tory">
<constructor-arg ref="flowRegistry"/>
</bean>
</constructor-arg>
</bean>

<!--this one changes-->
<bean id="flowController" class="org.springframework.webflow.registry.FlowRegistryF actoryBean">
<property name="flowLocations">
<list>
<value>/WEB-INF/flows/*-flow.xml</value>
</list>
</property>
</bean>

portlet2
Apr 15th, 2006, 12:30 PM
<!--For Java API
<bean id="flowRegistry" class="org.springframework.webflow.registry.FlowRegistryF actoryBean">
<property name="flowRegistrar">
<bean class="org.springframework.webflow.samples.phonebook.webf low.PhoneBookFlowRegistrar">
</bean>
</property>
</bean>
-->
Finally figured out there was a FlowRegistrar file in the phonebook directory. I skipped past that thinking they were all FlowBuilders.

I think it would be nice for people starting up to actually see the above entry in the webflow.xml

Thank you for your help.
Works.