In the past I've used the HolidayDoc script in the script repository on several IPCC 3.5 systems without a hitch. As a refresher this script uses java steps to obtain today's date. Furthermore it compares a list of dates in an xml file to todays date to see if it is a holiday. It then returns a boolean variable to the parent script.
My problem is that IPCC 4.0 Standard no longer supports Java steps and is enforced on the server at time of execution. Hence when I load the original Holiday script in the new 4.0 CRA Editor it validates fine but as soon as I upload it to the server it will not execute.
My first question is how do you get todays date in a script variable by not using Java?
According to the Step Refernence guide, those Java steps are still there. I guess that is what you are referring to. There is a note that the java functionality was replaced somewhat with the Expression Language functionality... Not sure if that helps, but here is the step guide:
Please follow-up if this was the right way to go. Have you tried posting to the ipcc mailer?
When we first got a look at the new IPCC Express 4.0 product, and I first saw the new CRA Editor, I was a little bit cranky about the Java steps being gone. I was not happy about the prospect of having to make custom steps for all the little things I was used to doing. Then I stumbled across the new expression editor and I was... enlightened would be a good term. The expanded expression parsing capabilities will help you do anything you were doing before and a lot more.
The engine will still run the old Java steps. I think the Java steps require, and always did require, IPCC Express Enhanced or Premium. I think that you could get away with this before since the steps simply wouldn't be in the Editor palette, but you could load this pre-made script and have it work. This requirement is now enforced in the engine at runtime instead of in the Editor. If you had more than Standard, the old script would probably run.
In the meantime, I've attached a quick port of the old holidayDoc script to the new hotness way of doing things. It should be a direct drop-in replacement for any scripts that were calling holidayDoc as a subflow. As a bonus, it's shorter and more robust at parsing dates. With IPCC Express 4.0, it would be better practice to have it read dates.xml out of the repository instead of from disk, so that updates are distributed around your cluster automatically and updates can be uploaded from appadmin. This is left as an exercise for the reader.
Last followup with a new script, hopefully. I was working on another project tonight and noticed the documentation says the engine also enforces limits on expressions. If you don't have IPCC Express Premium, the engine starts being real choosy about what expressions are accepted. I don't expect the script I posted before to work under Standard.
I'm attaching a script which I think will work under Standard. It works fine here, but my only playground 4.0 box is licensed for Premium. I actually like it better than the script I posted before, slightly shorter and cleaner. If someone could try this out on Standard, I'd be grateful to know if it works.
I tried to check a date with IPCC Express 4.x standard Ed.
and I received this error message :
1893: juil. 24 15:10:10.986 CEST %MIVR-SCRIPT_MGR-3-INVALID_SCRIPT:Invalid script: Script=bodymat_accueil_24-07-2006.aef,Exception=com.cisco.wfapi.WFPreprocessException: Java extensions are not licensed to support constructor invocations (line: 1, col: 1); nested exception is:
com.cisco.expression.ExpressionLicenseViolationException: Java extensions are not licensed to support constructor invocations (line: 1, col: 1)
because I used this expression : new Date().month
So the standard Ed don't support any java method or constructor...
Did you test the "ipccx4holiday-nojava.aef" script with a standard edition ?
The new 4.0 IPCC editor looks like it is a bit more powerful than the older version.
How did this newer modified version work?
Can someone please repost the script itself, I would really need it cos it seems to solve a couple of my current issues, but it expired :(