Closed PSHREYASHOLLA closed 6 years ago
Confirm to us if the issue corresponses with the next description: When executing the script:
import com.openkm.api,*;
OKMPropertyGroup.getInstance().setPropertySimple(null, "/okm:root/fld1", "okg:test","okp:test.name", "value");
It fails in case the node does not have okg:test group, meanwhile in previous version if the node does not have the group, was added by default as part of the process of setting the properties.
Yes thats what I was talking about. As you mentioned "if the node does not have the group, was added by default as part of the process of setting the properties". From which version of OpenKM is this fuctionality changed?
I'm not sure but we will review it and we'll try to get it running again.
@gnujavasergio talk with me about this issue and I will explain what you should be looking in previous code and what should be corrected.
We had installed OpenKM 6.3.4 Community Edition from the openKM official website https://www.openkm.com/en/download.html sometime back. Please find the attached Installer jar, named OKMInstaller_Old.jar.
We are using Java SDK 1.1 APIs. We used to upload the document using, com.openkm.sdk4j.OKMWebservices.createDocumentSimple(String docPath, InputStream is)
And then we are associating document properties by calling, com.openkm.sdk4j.OKMWebservices.setPropertyGroupPropertiesSimple(String nodeId, String grpName, Map<String, String> properties).
The above functionality was working fine and we had certified our Application with OpenKM 6.3.4 Community Edition.
But today when I try to install OpenKM 6.3.4 Community Edition from the openKM official website https://www.openkm.com/en/download.html, I get the Installer jar, named OKMInstaller_New.jar. And we are installing OpenKm using the same.
But now the behaviour is different i.e com.openkm.sdk4j.OKMWebservices.createDocumentSimple(String docPath, InputStream is) Is working fine but,
com.openkm.sdk4j.OKMWebservices.setPropertyGroupPropertiesSimple(String nodeId, String grpName, Map<String, String> properties)
Is failing with the error,
com.openkm.rest.GenericException: com.openkm.core.RepositoryException: Property group not assigned to this node
So basically it is expecting com.openkm.sdk4j.OKMWebservices.addGroup(String grpName) to be called before com.openkm.sdk4j.OKMWebservices.setPropertyGroupPropertiesSimple
Please refer discussion here, https://forum.openkm.com/viewtopic.php?f=5&t=21699