IP IVR Custom Java Class Calling

Unanswered Question
Jan 24th, 2008

All,


I wrote a java class that work well. TEST.class no package. I placed it in C:\Program Files\wfaavid\, and added this to my classpath. I restarted CRA Editor and CRS Editor Engine. can someone give me an example sytax of how to invoke this with Set Cra Expression Editor. I have seen some thread son her about it but nothign specific enough to help me.


Thanks,

Chad Stachowicz

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
geoff@hp.com Tue, 12/09/2008 - 22:07

It's not obvious, but if you double-click on the Java class and you can type in the name of your Java class; and it will load it and you will see the methods of the class pop up.


This is documented in the Expression Editor manual.


Regards,

Geoff

voiceops@sscinc... Wed, 12/10/2008 - 06:22

How do I get it to show in the script editor?

I've loaded the class to the specified location (as stated in the CRS admin guide) and I've restarted the engines but it does NOT show.

Do I have to modify any additional files such as the customengine.xml??

Can the class be named whatever.class or do I have to follow certain naming convention? maybe it has to be a whatever.jar??!!


Where is it supposed to show?

Do I first have to add a "Create java Object" object and enter my class name in the variable type?

or

Do I just use the "Execute Java Method" object??


All these questions are not answered buy the guides and if they're talked about they only have half the answer.


thanks



geoff@hp.com Wed, 12/10/2008 - 22:26

I have not tried to upload just one Java class into the Document Management tool. I added the class to a JAR, uploaded the JAR through Document Management, and then adjusted the classpath.


Regards,

Geoff

voiceops@sscinc... Mon, 12/15/2008 - 20:08

Got it to work!

Thanks for your help.

Our version of CRS 3.5 (IP IVR Queue Manager) doesn't (didn't) have database read write access but now it does!!!! YEAH!!!


It turns out I was using the wrong JDK version, for CRS 3.5 only 1.1.8 works.

Once you build your class you have to create a JAR file and copy it to c:\program files\wfavvid. You also need to update the classpath for the CRS and the editor by referencing the JAR in two files located also in c:\program files\wfavvid (customeditor.xml and customengine.xml) adding yourjar.JAR inside the tag and then restart the engines.


You access you class by creating a variable of java type and using your class' name for type, then you can execute its methods by adding a Java execute object and poiting it to the variable you created.


Kicks b*tt!!




geoff@hp.com Mon, 12/15/2008 - 22:37

Yep, that's the old way.


When you get to 4.0 you will see that things have changed quite seriously. You will need to use the Document Management UI to upload your JAR, you will need to set the CLASSPATH through the Web interface, and you will need to use the Expression Editor (Execute Java Method no longer exists).


But for now, congratulations.


Regards,

Geoff


Actions

This Discussion