garpinc2
Apr 3rd, 2006, 04:49 PM
Is there a way to instantiate object in flow. Basically as part of the flow I want an object to be instantiated for the life of the flow that can then be passed into the actions either in the context or through ognl with pojo actions.
i.e
<flow start-state="Initial">
<instantiate id="theBean" bean="xx.TheBean"/>
<!-- in context -->
<action-state id="Initial">
<action bean="enrollmentSystemRouteCreateUnitOfWorkActivity"/>
<transition on="UnitOfWorkCreated" to="UnitOfWorkCreated"/>
</action-state>
<!-- in arg to pojo action -->
<action-state id="DoNotCommitWork">
<action bean="enrollmentSystemRouteCreateUnitOfWorkActivity"
method="populateObject(#theBean)"/>
<transition on="UnitOfWorkCreated" to="UnitOfWorkCreated"/>
</action-state>
i.e
<flow start-state="Initial">
<instantiate id="theBean" bean="xx.TheBean"/>
<!-- in context -->
<action-state id="Initial">
<action bean="enrollmentSystemRouteCreateUnitOfWorkActivity"/>
<transition on="UnitOfWorkCreated" to="UnitOfWorkCreated"/>
</action-state>
<!-- in arg to pojo action -->
<action-state id="DoNotCommitWork">
<action bean="enrollmentSystemRouteCreateUnitOfWorkActivity"
method="populateObject(#theBean)"/>
<transition on="UnitOfWorkCreated" to="UnitOfWorkCreated"/>
</action-state>