• Custom Property Group values not being set

  • 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.
 #14221  by Krishna Shiva
 
(159.19 KiB) Downloaded 867 times
Hello,

I am using OpenKM 5.1.9 for document management system. I am facing problems while we are adding values to the custom group properties from client code.

1. I am able to create folders and documents in the OpenKM using exposed webserivce methods.
2. I am able to register the custom groups to OpenKM.
3. I am able to pull these properties using the accessor methods of PropertyGroup.
4. When I try to set the values using mutator method of PropertyGroup, I get the following error:
Code: Select all
18:25:03,810 ERROR [SOAPFaultHelperJAXWS] SOAP request exception
        com.openkm.core.ParseException: Unknown property definition: okp:folder.owner
        at com.openkm.module.base.BasePropertyGroupModule.setPropertyValue(BasePropertyGroupModule.java:95)
        at com.openkm.module.direct.DirectPropertyGroupModule.setProperties(DirectPropertyGroupModule.java:389
        at com.openkm.ws.endpoint.OKMPropertyGroup.setProperties(OKMPropertyGroup.java:143)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Would be great if somone could help me out in resolving the issue of setting the custom property group values to the folders, documents etc.,

Please find the code snippets, captured error screenshots, config files that I have used as an attachment.

Thanks in advance. Looking forward for earliest response as I need to meet the deadline.

Regards,
Krishna
 #14255  by Krishna Shiva
 
Resolved... Able to set the property values.

Debugged the openkm source code. (Thanks for the detailed documentation of setting the openkm source code as a project).

I had to add the type of class that a property holds in PropertyGroups.xml.
e.g If the property is of type input, i have to pass "com.openkm.bean.form.Input" as a string in FormElementComplex.setObjClass method.
Code: Select all
OKMPropertyGroupServiceStub.FormElementComplex complexObj = new OKMPropertyGroupServiceStub.FormElementComplex();
		complexObj.setName(key);
		complexObj.setValue(data);
		complexObj.setObjClass("com.openkm.bean.form.Input");
Similarly, com.openkm.bean.form.TextArea for textarea, com.openkm.bean.form.CheckBox for checkbox.....

Regards,
Krishna

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.