Errors – Show Immediately and On Navigate
I often come across issues with Errors in Oracle Policy Automation interviews. When working with errors, it’s useful to know the sequence and processing order of the different types. Furthermore, you need to have a good handle on errors when working with Input Extensions. Let’s take a quick look first of all at a simple, out of the box scenario involving two attributes (the First Name and the Second Name). The First Name has a Regular Expression and the Second Name is targeted in an error Rule:
Let’s imagine that these two are both on the same Screen, and that Screen is set to “Immediate Errors” :
Then Error Rules (with Error()) will fire and display the error before the Input Validation message is displayed. So when you start the interview you will see the Error() rule message display at the top of the Screen, and a red triangle on the other attribute because it is mandatory:
If the First Name attribute is not mandatory then you will still see the triangle because of the RegEx error, but you will not see the red error banner displaying the Error text. Instead it will be in the tooltip. The second name will get the same treatment, as the mandatory check produces an error immediately.
It’s only when you click the Next button, that you get the full display of all the messages:
And that can be quite confusing for the Interview designer.
It changes, furthermore, when you switch the Screen to On Navigate for Error handling. When arriving on the Screen, the error display will show nothing, until you put your mouse into the First Name – then you will see the mandatory icon:
Let’s assume you enter a value in the First Name, but ignore the Second Name. You click the Next button:
You get the RegEx Input Validation error, and the mandatory error. But the Error() rule in this case does not fire, since the mandatory error is blocking it from executing so to speak – an error has occurred before the Error() rule gets a chance to fire.
Now, enter a valid value in First Name, and an invalid value in the Second Name, and you get this:
The Error() rule has had a chance to execute as the mandatory flag has been resolved – you entered something into the Second Name, even if it was not valid according to the Error() rule.
This sort of sequencing and display logic is important when designing Interviews, especially when combining Error and Warning rules with attribute-level input validations. There’s more about Input Validation in the Help of course.
In the next post in this series, we will look at Error handling in Input Extensions.