Page 1 of 1

Does "Automation" feature send arguments to my Script code??

PostPosted:Fri Nov 22, 2013 3:21 pm
by eandrex
Hello, first off, congrats on your great project..since yesterday i have been playing around with it and i am in love with it.

Second, i would like to know if Automation can send arguments to my script code.. let me explain myself:

i wrote a script code which is fired every "Document created" event in the "Administration/Automation tab", what this code does is create a ticket to my service deskp when that event fires, but i would like to know if somehow i can extract the named of this document..

something like:
Code: Select all
import com.openkm.bean.Document;

Document doc = args[0];

print("document "+doc.getTitle()+" was created in "+doc.getPath());

OpenKM Version: 6.2.5 (build: 8109)
SO: Windows

thank you for reading.

Re: Does "Automation" feature send arguments to my Script co

PostPosted:Sat Nov 23, 2013 5:33 pm
by jllort
Basically automation sends a var called uuid you can use directly into Scripting. For complete information take a look in class http://sourceforge.net/p/openkm/code/HE ... pting.java

Re: Does "Automation" feature send arguments to my Script co

PostPosted:Mon Nov 25, 2013 2:18 pm
by eandrex
yeh, this code http://wiki.openkm.com/index.php/OMR_scripting helped too
thank you