• Can I run an automation from workflow's submit button?

  • Do you want to create a native client or integrate with third party applications: webservices are the solution.
Do you want to create a native client or integrate with third party applications: webservices are the solution.
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.
 #46748  by vrecalde
 
Hello to all. I've been searching for a solution in docs and forums but I didn't find it. I would like to run an automation (move a directory and its files) from a work-flow submit button. Do I have to make code for this? Is there a predefined script that helps me with it? It is very important because I have to approve some process making click in a submit button, the process is an automation that moves the directory under another Dir. Now this process is activating after insert meta-data in a directory, but, people here don't approved that, because they have to go to the workflow screen and they have to make click, again ,in a submit button, so workflow can go on. If I can run this proccess (move the directory to another dir) making click on workflow's button, this would be perfect. If someone knows something about it, I will appreciate it very much if share the knowledge. Thank you very much.
 #46752  by jllort
 
Automation works based in listening events. For doing it the easiest way for doing it is:
1- Add metadata ( property group ) with status field.

2- Create and automation listening set metadata ( set property group ) -> check if the node have the property group and in case you have it, evaluate the field
https://docs.openkm.com/kcenter/view/ok ... ition.html
https://docs.openkm.com/kcenter/view/ok ... tiesSimple
https://docs.openkm.com/kcenter/view/ok ... ation.html
https://docs.openkm.com/kcenter/view/ok ... ction.html
https://docs.openkm.com/kcenter/view/ok ... ingFolders

3- From the workflow into ActionHandler set the metadata what will fire the action
 #46758  by vrecalde
 
Thanks for the answer. I tried to make a form to add metadata in forms.xml, but it doest not support the syntax, the following error is thrown:
ERROR com.openkm.util.FormUtils - Element type "property-group" must be declared.
Do I have to create traditional inputs and then catch them in the java class ActionHandler? If I do this way, how could I know what directory do I have to set metadata? Because that directory is a new one, I could not know the uuid of it.
The workflow is activated when I create a new directory under a specific directory name, and I have to set metadata to this new directory.

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.