Page 1 of 1

Automation Execute script

PostPosted:Mon Mar 24, 2014 5:10 am
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

Re: Automation Execute script

PostPosted:Wed Mar 26, 2014 10:51 am
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.

Re: Automation Execute script

PostPosted:Wed Mar 26, 2014 10:13 pm
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.

Re: Automation Execute script

PostPosted:Sat Mar 29, 2014 7:36 am
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.