So here goes with the explanation of how to use substitution in error and warning rules: as a result of a conversation in the Forum, we are starting a series called “Our top ten uses for substitution in Oracle Intelligent Advisor”. Depending on your scenario and what language you are writing in, these features and tips can save you a lot of time and effort.
Will you be able to say that you know all ten of these when this series is finished? Join us to find out! We’re going to begin with an odd one, since it does not behave in the typical fashion – by that we mean that there is no magic drop-down list of choices when you type “%”. You just have to type the substitution text and hope that you didn’t make a spelling mistake.
Use Substitution in Error and Warning Rules
- Open your Word Document
We assume you already have a rule you need to write. Remember that Error and Warning Rules have their own scope, and are independent of Screen display. In this demo, we have an entity called the person and we are writing a rule referencing an attribute of the person, specifically their name, which has the attribute name “person”. Thus we can use the substitution text %person% to display a message that mentions the person’s name.
- Enter the substitution text manually in the rule
Entering the % sign will not display the names of attributes. You need to have that ready before you start. But trust us, the substitution will work just fine. Remember to update the Word document if, for whatever reason, you change the attribute name. You probably want to document it in the Word document so everyone knows what’s going on.
Also, perhaps change your Interview Show Error settings to “Immediately” (on the Interview tab of Oracle Policy Modelling) so you can see the result – immediately! So here is what the final setup for substitution in error and warning rules might look like:
- Test your new rule in the debugger
Enter a few people and sit back and enjoy your substitution in the error or warning message! Don’t forget the online documentation has some good basic advice for setting up substitution.
See you soon for another one! Drop a comment if you want the Zip file.