Well i think if you short circuit the jsf life cycle your issue will be resolved. And we can short circuit the life cycle using immediate attribute
Regards
Saif Kamaal
-sent from note
Hi!I am facing the following challenge.I am building the taskflow for a BPM Human Task. In this taskflow I have a page where I display an editable form with information from a custom db schema.Some of those fields have validation rules (e.g. a date field value must be less than the current date)After the user edits those fields, there are 2 possible actions: click on "Save" button, or "Save and Continue" button.The "Save and Continue" button will call Commit on the DataControl, and then the pass the control to the BPM Process. If there are validation errors, the user is notified and requested to fix the errors before committing. So far, nothing special.The "Save" button should only save the information in the db, skipping the validations. I'm thinking there will still be some minimal validations for the correct data type to go into the tables. But no business validation.How do you think I can achieve this?I am also flexible on where to put the business validation: on EntityObject level, on pageDef level or on JSF level.However, I didn't have any success so far with any of these approaches.The main problem comes from the fact that the validation step in ADF page lifecycle is executed before the event triggered by the button is processed. So, by the time that I know which of the buttons was pressed, the validation had already happened.The most promising solution was to use pageDef level validation and disable or enable the ADF Model validation by using a router and 2 method calls (like I saw in one ofi Frank Nimphius' examples with a train taskflow). However, validation at the pageDef level has limited capabilities. For example, I can only compare a field with a literal value. In my case (validating a date is less than today), it doesn't work.Another solution that I'm thinking to explore right now would be to use immediate="true" on the Save button and somehow simulate the Update Model Values step when processing the button's actionListener. But I don't know if that's feasible.I'm also thinking about using I SavePoints. I never used them in my projects so far. Do you think I can achieve something like this using a SavePoint? Or are the validations triggered as well when creating a savePoint? I also know that a savePoint has a limited validity time (24h by default, if I'm not mistaken). I would need the information to be stored indefinetly because in this project, the BPM process can take months or years to finish and we also need to be able to access that temporary information at any given time as read only.Do you have any suggestions or leads that I can explore in order to do this?Has anyone faced this kind of challenge before?Thank you very much!--
You received this message because you are subscribed to the ADF Enterprise Methodology Group (http://groups.google.com/group/adf-methodology). To unsubscribe send email to adf-methodolo...@googlegroups.com
All content to the ADF EMG lies under the Creative Commons Attribution 3.0 Unported License (http://creativecommons.org/licenses/by/3.0/). Any content sourced must be attributed back to the ADF EMG with a link to the Google Group (http://groups.google.com/group/adf-methodology).
Hi,@Steve: I echo with your thinking, but in this case the data needs to be saved without validation when clicking on 'Save'. Now if the data is saved and the user next time presses "Save and Continue" the validations will fire to validate the data. I don't see a problem here.However i liked the other approach of having an attribute at EO level and flag it for checking when to validate. Looks a clean approach.Regards,Saif Kamaal.