I am facing the same problem. I ve created an abstract flow named Search and have to subflows named SimpleSearch and ComplexSearch.
My view state is defined in the Search Flow as following:
The Subflows add the following information to that view-state:
<view-state id="enterSearchCriteria" model="kundenSearchCriteria" view="/WEB-INF/flows/search/enterSearchCriteria.xhtml">
<transition on="search" to="resultList">
<evaluate expression="kundenSearchAction.search(kundenSearchCriteria)" result="flowScope.resultList" />
The problem now is, that I do need different validation logic for both transitions. With build in Validator mechanisms, I could only specify a Validator for a combination of ViewState + Model. As both of these are identical in both situations, I dont see how i could implement the usage of two different Validators.
<transition on="search" to="detailedResultList">
<evaluate expression="kundenSearchAction.detailedSearch(kundenSearchCriteria)" result="flowScope.resultList" />
Is there any way to retrieve the concrete flow type/name from within the validator? I checked the ValidationContext, but couldnt find anything helpful in there.
Furthermore, I believe this is not only a problem occuring with flow inheritance, but with multiple flows in general. From my perspective it looks like I am not able to have two viewstates with the same name using the same name for their model, and validate these with different Validators. So wouldnt it be helpfull to either append the Flowname to the Validator Binding Rules validate<$flowname><$viewstatename> or at least pass in some more inforation to determine the concrete flow?
Any suggestions to tackle this issue?