• No field to enter script code in automation dialogue

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
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.
 #28889  by cojobevo
 
OpenKM seems to be a great platform for enhanced document management. I'm currently trying openKM community edition 6.3.0. There is one problem that even after several hours of crawling through the forum and the internet couldn't solve.
I have enabled automation as described in the Wiki and the validations and activities are available now. I'm trying to add an "ExeucteScripting" automation, which seems to work. But I can't enter the scripting code. in the "Create action" dialogue the following fields appear:
Name "ExecuteScripting"
Group "action"
ClassName "com.openkm.automation.action.ExecuteScripting"
Active <boolean box>
Parameter <without a field to enter one>
Order "0"
Script <without a field to enter something>

So there is actually no field into which I could enter the script code. What do I wrong? Is there something I'm missing? Many thanks in advance for your help. This automation is really a killer feature and I would love to use it. Take care.
 #28896  by jllort
 
I think can be a browser cache problem or browser bug. I suggest clean browser cache or refresh iframe contents ( right click to open automation link to new browser window and refresh ).
 #28911  by cojobevo
 
Many thanks for your reply. I tried your suggestion, but unfortunately there is still no field to enter the script code. I have tried different browsers (Firefox, IE11) on various PC and also from an iPad (Safari). None of them worked - all had the same error. So my conclusion would be that there is something with the server configuration not set properly or something on the server which might have a bug. Any idea where I could have a look at?
 #28944  by cojobevo
 
Hello jllort,

I'm using the standard, embedded "HSQLDB" database. I was not able to find a table called "OKM_METADATA_DATABASE" in the database. Did you mean the table "OKM_AUTO_METADATA" instead? Anyway, I deleted all rows from this OKM_AUTO_METADATA and tried the insert again as explained here for OpenKM community 6.3. All rows were inserted fine, except the last one which is for the action "SendMail". There are more columns (AMD_TYPE02, AMD_SRC02, AMD_DESC02) here, which could not be inserted in the table (but maybe a different problem).

I then recognized that for older versions of OpenKM, there are different values for the "ExecuteScripting" action. For "OpenKM community 6.3" it is:
Code: Select all
INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01) VALUES ('pre', 'com.openkm.automation.action.ExecuteScripting', 'ExecuteScripting', 'action', 'code', '', 'Script', '', '', '');
INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01) VALUES ('post', 'com.openkm.automation.action.ExecuteScripting', 'ExecuteScripting', 'action', 'code', '', 'Script', '', '', '');
And for the former version it is
Code: Select all
INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01 ) VALUES ('post','com.openkm.automation.action.ExecuteScripting', 'ExecuteScripting', 'action', 'textarea', '', 'Script', '', '', '');
The difference is in the value of AMD_TYPE00. For community edition 6.3 it is "code" and before it was "textarea". I then just changed the value in the 6.3 SQL statement to "textarea" and now the field to enter script code in the automation dialogue appears. So it looks as if the problem is solved :D .

Do you think this is really a solution or will I get other problems by having changed from "code" to "textarea". Could this be a problem that also other users might experience so that you might consider to change the documentation?

Many Thanks for help - you brought me to the right point where I had to look at. Take care.

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.