Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

Get Today's Date with IPCC 4.0 Standard

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?

Thanks.

John

11 REPLIES
New Member

Re: Get Today's Date with IPCC 4.0 Standard

John,

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:

http://www.cisco.com/application/pdf/en/us/guest/products/ps6488/c1626/ccmigration_09186a00804a2b0d.pdf

Please follow-up if this was the right way to go. Have you tried posting to the ipcc mailer?

--Jon

Gold

Re: Get Today's Date with IPCC 4.0 Standard

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.

Gold

Re: Get Today's Date with IPCC 4.0 Standard

Fixed a small bug with variable naming so it really is a drop-in replacement for holidayDoc.aef.

Gold

Re: Get Today's Date with IPCC 4.0 Standard

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.

Gold

Re: Get Today's Date with IPCC 4.0 Standard

Fixed attachment.

New Member

Re: Get Today's Date with IPCC 4.0 Standard

Hi Jasyoung,

FYI :

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 ?

Thanks you

Thierry

New Member

Re: Get Today's Date with IPCC 4.0 Standard

Pls repost the Script, it expired.

New Member

Re: Get Today's Date with IPCC 4.0 Standard

John,

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?

Carl

Ronco

New Member

Re: Get Today's Date with IPCC 4.0 Standard

I've been contacted recently by several people asking if I had found a solution, so I thought I would post it here. This is what I have been using on IPCC 4.x Standard.

New Member

Re: Get Today's Date with IPCC 4.0 Standard

Hi,

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 :(

thanks,

Vedran

New Member

Re: Get Today's Date with IPCC 4.0 Standard

Hi,

Can someone please repost this script..

We need it

Thanks a lot..

336
Views
5
Helpful
11
Replies
CreatePlease to create content