Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Testing AutoWO

Highlighted
Colleen Talbert
Collector

Testing AutoWO

I have just upgraded to a version that has autowo as a function. I'm trying to set up the test environment exactly as they describe in the documentation for autowo. I have...
1. set up the script on the appropriate directory (e: drive for us)
2. set up two work order templates - one called autowo1 and the other autowo2
3. set up a database rule that uses the following script:
-cp e:\autowo\web-api.jar;e:\autowo\bin com.hp.itsm.autowo.createWO localhost ctalbertadm CH [ID], which, according to the logs, does execute the rule
4. created a new Change ticket without Approval information, but with autowo1;autowo2 in the Change Text 25 field.

As I said the database rule does execute, but the work orders don't show up in the Change ticket - no new work orders are created at all. Can anyone point me to a log that shows what is (or isn't) happening with this function? Is anyone else successfully using autowo?

Thanks,
Colleen
7 REPLIES
Carlos_211
Collector

Re: Testing AutoWO

Just an Idea..

Try to run it in a command window. In this way you can check if the java is executing sucessfully or not.

I mean..

$> java -cp e:\autowo\web-api.jar;e:\autowo\bin com.hp.itsm.autowo.createWO localhost ctalbertadm CH [ID]

tell me what has happened, please.

Hope it helps,

Carlos

Colleen Talbert
Collector

Re: Testing AutoWO

From the command window (thanks for that suggestion, don't know why I didn't think of it), I get the following after running the script.

Exception in thread "main" java.lang.NoClassDefFoundError: com/hp/itsm/autowo/createWO

Any idea what that means? Did I extract the files wrong and it's not finding the createWO file?

Thanks,
Colleen
Colleen Talbert
Collector

Re: Testing AutoWO

If autoCreateWO is supposed to be a file in that directory, they forgot to include it in the SP17 api directory! I've extracted it and search for it and it's not anywhere on any of my systems, development or production. That could be my problem, don't you think? Can someone send me that file or post it somewhere?

Thanks!
Colleen
Carlos_211
Collector

Re: Testing AutoWO

In the api folder, there are some files:
- web-api.jar
- autowo.zip (with the files we need inside)
- a folder with examples
- a manual-autowo.pdf

1.- First of all you have to unzip the files in autowo.zip
2.- compile the .java files to get a .class file (for this you need the Javac application
3.- run the java aplicattion as shown in the other treath

Note: Keep in mind inlude the web-api.jar for compiling ang running the java application

Hope it helps !!

If you need an easier example, just ask for it

Carlos
Colleen Talbert
Collector

Re: Testing AutoWO

I used Eclipse to compile the .java files, adding web-api.jar to the library and then moved all the files to their final location on the test server. I ran the code again in cmd and now I get:

Exception in thread "main" java.lang.NullPointerException at com.hp.itsm.autowo.createWO.main(createWO.java:84)

Most likely I compiled it wrong, so if you have some sure fire ways to compile the files, I'd be happy to try that instead! :)

Thanks,
Colleen
Colleen Talbert
Collector

Re: Testing AutoWO

Can anyone help me get this started? I am not a java expert and not sure I compiled the scripts correctly. I appreciate any help getting this going for a solution I need!

Thanks,
Colleen
Frederik Wiers
Super Collector

Re: Testing AutoWO

A bit late, but maybe you can still use it:

I extracted the autowo.zip-file to F:\, this will create a directory f:\autowo
I copied web-api.jar to this directory.
I then compiled the sources:

F:\autowo>javac -d .\bin -cp web-api.jar;.\bin .\src\com\hp\itsm\autowo\*.java

This gives me 2 notes, but no errors.
I can now use the test-bat files to manually trigger an update (you have to edit these bat-files first).

good luck.
//Add this to "OnDomLoad" event