• print function in script

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #46408  by mamad
 
hi guys,
when i write
Code: Select all
 print("some thing"); 
in a script and run it using automation, where it print the text entered? i cant find any message box or console inside openkm to see the output
And one more question:
when i use
Code: Select all
 Window.alert("alert"); 
in a script and run it with an automation, nothing happens. why ?
 #46413  by jllort
 
Automation script is executed in the core into another thread that's why you will not see the output in the catalina.log file ( where usually is shown ). I do not suggest using scripting in automation , I suggest working with JAVA classes where you will get full control and you will be able to debug them https://docs.openkm.com/kcenter/view/ok ... ction.html

About Window.alert("alert"); only have sense from GWT classes.

I suggest debug the automation classes with eclipse, if you are not using the development environment also is good idea playing your code first there before working with production, in our download section you have explanation how getting the development environment working https://www.openkm.com/en/download.html
 #46444  by mamad
 
Hi again,
Guys is there any way to print something from non-Gwt classes ? i want it for some debug action.
I mean if i want to print some thing like what we do in java programming by using System.out.println() what i should do ?
For example i create a public class with a constructor inside com.openkm.frontend.client package that has Window.alert("***") code inside its constructor.so inside my java class i create a object from that class (i thought this will create a alert box) but this caused a lot of exceptions when i try to compile project.
is there any way for printing something for some debug purposes ??

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.