cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

We are happy to announce the new Windchill Customization board! Learn more.

Deploy external Java libraries to use in Windchill workflow

JagerBomb
4-Participant

Deploy external Java libraries to use in Windchill workflow

Hello,
I am relatively new to Windchill, so this might be very basic to you, but I have finished the Customize Windchill tutorial and still struggling with this.

We would like to deploy external Java libraries to the Windchill server and use them in custom Workflows, in the transition part (where we can write custom Java code).

 

I have tried compiling a simple HelloWorld class to .jar, drop it under /codebase/WEB-INF/lib/ and it is recognized by the server, since it passes the "Check syntax" test. However when the workflow runs, it fails to execute the code.

 

So my questions are:

  • How do we deploy our libraries to the Windchill server, i.e., to which folder do we copy them and in which format? (.jar, .java, .class?). Do they need to be compiled on Windchill shell or can I compile them with javac in my machine and just copy the generated file to the server?
  • Is there any way to see the detailed logs from the workflows? (i.e. when the Java code fails during execution, read the exception message or the stack trace)

Thank you very much

2 REPLIES 2
RandyJones
19-Tanzanite
(To:JagerBomb)


wrote:

Hello,
I am relatively new to Windchill, so this might be very basic to you, but I have finished the Customize Windchill tutorial and still struggling with this.

We would like to deploy external Java libraries to the Windchill server and use them in custom Workflows, in the transition part (where we can write custom Java code).

 

I have tried compiling a simple HelloWorld class to .jar, drop it under /codebase/WEB-INF/lib/ and it is recognized by the server, since it passes the "Check syntax" test. However when the workflow runs, it fails to execute the code.

 

So my questions are:

  • How do we deploy our libraries to the Windchill server, i.e., to which folder do we copy them and in which format? (.jar, .java, .class?). Do they need to be compiled on Windchill shell or can I compile them with javac in my machine and just copy the generated file to the server?

See this post here:

https://community.ptc.com/t5/Windchill-Questions/How-to-add-a-new-folder-to-the-class-path-read-by-Windchill/m-p/132080

 

  • Is there any way to see the detailed logs from the workflows? (i.e. when the Java code fails during execution, read the exception message or the stack trace)

By default the messages go to the methodserver or backgroundmethodserver logs.

JagerBomb
4-Participant
(To:RandyJones)

Sorry for the delay confirmation, ptc community forums were not working for me in the last couple of weeks.


I managed to deploy external Java libraries by copying the JAR files directly under <Windchill>\codebase\WEB-INF\lib\. No subfolder structure of any kind.

I still cannot get any exception message from the code in methodserver or backgroundmethodserver, but I can see if for example there is some problem loading the libraries.

Top Tags