Fun with Aliases and Strings #3
In the previous parts of this article (1, 2) we’ve taken the time to look at an amusing string-based manipulation technique which has helped us create a long string from lots of strings. Of course, the main reason for the example was to showcase two of Oracle Policy Automation’s language features, namely logical loops and aliases.
In this final part we will look at some of the downsides and potential challenges relating to strings and logical loops, and a few other things besides.
- Inferring instances of an entity to impress your friends
This can go wrong of course. In the current example you must enter the instances manually either in the Debugger or in the Interview itself. But what if you decided to infer them, for example from an Excel spreadsheet. Regular readers will know that we’ve hacked and worked with Excel many times in the past, and it comes as no surprise to us that on a single instance of Oracle Policy Automation, with the instances inferred from an Excel spreadsheet, the following will occur regularly as soon as you get into the 150,200 instance range:
Closely followed (of course) by the following in the Interview:
Obviously there are lots of configuration changes we can make on WebLogic (if you have access to it) to ensure we are running the JVM with appropriate memory, in Production mode and so on. But hopefully the point is clear. Inferring instances (large volumes) can be costly in terms of performance / memory.
2) Entering lots of instances manually to impress your friends.
It is worthwhile remembering that logic loops have a 1000 iteration limit – if they cannot be stabilized by then, an error occurs. So assuming you add 1001 instances of the ticker tape manually using the Interview or the Debug, you would expect to hit the logical loop ceiling. Oracle Policy Automation gets out of the loop, just in case it goes on for ever and ever. The easiest way to test this is to use the Test Case format and try out your logical loop with zero to many iterations in order to verify that you are never going to have the scenario where there are more iterations than the limit.
For the same reason, the warning about logical loops on the Rules Tab : if you do decide to hide it, will you remember it in 6 months time? Have you documented your tests somewhere?