I've do this transition and i've this error :
No transition found on occurence of event 'save' in state 'cloneChoice' of flow 'entitymngt/newEntity/cloneEntity'
Code:
<view-state id="editEntity" model="entity">
<transition on="save" to="moreAnswersNeeded" />
</view-state>
<decision-state id="moreAnswersNeeded">
<if test="entityController.saveEntity(flowScope.entity)" then="answerClone"
else="saved" />
</decision-state>
<subflow-state id="answerClone" subflow="entitymngt/newEntity/cloneEntity">
<!-- <input name="entityClone" value="flowScope.entity" /> -->
<input name="entityClone" value="entityController.entityToSaved" />
<input name="clone" value="flowScope.clone"/>
<input name="nbTransaction" value="entityController.nbTransactionCloned"/>
<input name="nbDocument" value="entityController.nbDocumentCloned"/>
<transition on="clone" to="cloned" />
<transition on="quit" to="editEntity" />
<transition on="saved" to="editEntity" />
</subflow-state>
code of subflow
Code:
<flow xmlns="http://www.springframework.org/schema/webflow"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">
<persistence-context />
<input name="projectEdit" type="com.plasticomnium.optidoc.domain.model.entity.Project" />
<input name="create" type="boolean" />
<decision-state id="editionChoice">
<if test="create" then="setUpForm" else="editForm" />
</decision-state>
<!-- Setting up for creating a new project -->
<action-state id="setUpForm">
<evaluate expression="projectController.createProject()" result="flowScope.project" />
<transition on="success" to="projectEditForm" />
</action-state>
<!-- Setting up for editing an existing project -->
<action-state id="editForm">
<set name="flowScope.project" value="projectEdit" />
<transition to="projectEditForm" />
</action-state>
<!-- =========== -->
<!-- COMMON-EDIT -->
<!-- =========== -->
<view-state id="projectEditForm">
<transition on="save" to="saved" validate="false" >
<evaluate expression="projectController.saveProject(flowScope.project)" />
</transition>
<transition on="quit" to="quit" validate="false" />
</view-state>
<!-- ========== -->
<!-- END STATE -->
<!-- ========== -->
<end-state id="quit"/>
<end-state id="saved"/>
</flow>