• Custom properties using DotCmis

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
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.
 #40807  by anca.antonie
 
I have installed OpenKM server and I am using DotCMIS library for documents upload/download, which it works nice(I succeeded in making this work). But I am trying to set custom properties on documents. I have created groups and set properties such as:
Code: Select all
Dictionary<string, object> properties = new Dictionary<string, object>();
properties[PropertyIds.Name] = documentName;
properties[PropertyIds.ObjectTypeId] = "cmis:document";
properties[PropertyIds.ContentStreamId] = 1;
properties["okp:contract.cups"] = "property_name";

contentStream.Stream = myStream;

IDocument doc = resourceFolder.CreateDocument(properties, contentStream, null);
and I receive the error: Property +'okp:contract.cups' is not valid for this type!

I saw an example with Alfresco custom properties, but I can make this with OpenKM and DotCMIS??
 #41354  by RomanA
 
Are there any news on this issue? I'm struggling with the same problem, I need to add custom metadata to my documents, but find no way to do this through CMIS. Is there no way at all? I already took a look at how a document object looks like that was fetched from a server and already had a custom property group assigned to it, but I cant find any trace whatsoever of those custom properties.
Any help would be greatly appreciated.
 #41376  by pavila
 
I think this feature is not implemented. If anyone send me a patch with this improvement, I'll add to the source code.

Regards.
 #48280  by fabiobenedetti
 
Hi to all,
i'm having the same issue uploading content from a scan software that support cmis.
I can't upload "okp:property_name" and can't read any of this property using cmis workbench
I added properties in openkm "metadata group" section.

There is a solution for this at now??
Attachments
openkm_group.JPG
openkm_group.JPG (53.73 KiB) Viewed 3628 times
Openkm_metadata.JPG
Openkm_metadata.JPG (36.94 KiB) Viewed 3629 times
CMIS Workbench.JPG
CMIS Workbench.JPG (139.27 KiB) Viewed 3629 times
 #48307  by jllort
 
Is not implemented. My personal suggestion is not using CMIS. Particularly I'm not a "fan" of this API. In the past, we were excited about it, but when we played in deep with it we observed some mess. Basically, In my opinion I think the persons - DMS software - involved in this API introduced a lot of things what goes right in their product scenario but what in other does not have a sense ( for example, folder versioning is something quite strange in almost DMS ).

My suggestion is to use our REST API ( ours or if you decide to go with other DMS theirs ). Usually CMIS is sold as portability etc..., if in future you migrate to another DMS the connection to your current application will still working etc... sound fine, but sincerely if in future you migrate between DMS your problem is not the API, your problem is how to migrate data ( and CMIS is not the right way for doing it ).
 #48311  by fabiobenedetti
 
Thank's for your reply;
it's just because my scan software use cmis to upload properties to dms.
Maybe it's time to learn how to use the Rest api.
Many thanks again.
 #48345  by jllort
 
This feature currently only is working for professional edition. However you can create and small java application to upload using the SDK for JAVA or .NET ( it is quite easy ).
Take a look at ( in this order ):
https://docs.openkm.com/kcenter/view/sd ... lient.html
https://docs.openkm.com/kcenter/view/sd ... mentSimple
https://docs.openkm.com/kcenter/view/sd ... tiesSimple

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.