• Automation Execute script

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
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.
 #28177  by matt81
 
Hello,
I am trying to use the Automation tool on Openkm Pro trial version 6.2.26. I am trying to use the document creation event where after the document is created I want to convert it to pdf to a directory on my system.
For the ExecuteScripting action i am using the following code:
Code: Select all
import com.openkm.api.*;
import com.openkm.automation.*;
import com.openkm.util.DocConverter; 
 
String input = OKMRepository.getInstance().getNodePath(null, uuid);
String output = "/home/workdesk/test/new/";
String mimetype = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";

DocConverter doc = new DocConverter(); 
doc.doc2pdf ( input,  mimetype,  output );
I get the following error in my log file:
Code: Select all
2014-03-24 04:50:45,965 [http-bio-0.0.0.0-8080-exec-7] INFO  com.openkm.dao.NodeBaseDAO - addPropertyGroup(74c61d8e-9893-4456-bb11-933d40b8b746, okg:technology)
2014-03-24 04:50:46,020 [http-bio-0.0.0.0-8080-exec-7] ERROR com.openkm.automation.action.ExecuteScripting - Sourced file: inline evaluation of: ``import java.io.BufferedReader;     import java.io.File;     import java.io.FileN . . . '' : Typed variable declaration : Class: DocConverter not found in namespace
Sourced file: inline evaluation of: ``import java.io.BufferedReader;     import java.io.File;     import java.io.FileN . . . '' : Typed variable declaration : Class: DocConverter not found in namespace : at Line: 51 : in file: inline evaluation of: ``import java.io.BufferedReader;     import java.io.File;     import java.io.FileN . . . '' : DocConverter
 #28193  by jllort
 
You will not be able to test it on trial, because some code is obfuscated there and I think this is the problem while you're testing it. Should contact with our sales team managers ( I suggest use openkm website form http://www.openkm.com/en/contact.html) in order they provide you one of our online demo or some installation without this restrictions. Sorry for the inconvenience.
 #28202  by matt81
 
Thanks for your reply, what about the latest community version, can I test it there.
I need to know if this works properly prior to contacting the sales team.
 #28215  by jllort
 
Community version is quite different than professional one. You can download a trial if you want to test yourself ( in openkm.com download section you got links for community and for professional trial ).
Obviously the automation feature goes right. If you contact with sales & marketing team they can help you on any test etc... we got some online demo that can be shared for testing 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.