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

  • He we will discuss about how to make customization and improvement to the OpenKM source code.
He we will discuss about how to make customization and improvement to the OpenKM source code.
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.
 #26331  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.

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.