• Reading OpenKM metadata property

  • 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.
 #18587  by DMSUser
 
Hi,

I have created metadata property which is shown for every document. Whenever user adds a document, user will also add a workflow to that document. I want to read that property in the workflow to do further processing.

I am adding image which explains what I would like to receive in workflow. I would like to receive the "Comment" properties information in the workflow.

I believe that below code snippet can be used but I am not sure how to get the values of properties defined by us.
Code: Select all
MetadataExtractormdExtractor = new MetadataExtractor(Config.KEA_AUTOMATIC_KEYWORD_EXTRACTION_NUMBER);
MetadataDTO mdDTO = mdExtractor.extract(is, tmpKea);
log.info("Creator: "+mdDTO.getCreator());
Let me know if anybody has any suggestions

Regards,
Ashish
Attachments
openKM.png
openKM.png (7.48 KiB) Viewed 2421 times
 #18600  by jllort
 
You want to reading document notes from workflow ? is that ?
In workflow you got uuid. Using OKMNote you got the method get which returns all notes
http://doxygen.openkm.com/5.1.x/d2/da8/ ... _note.html

If you want accessing some property group value then you should use OKMPropertyGroup
http://doxygen.openkm.com/5.1.x/d0/d35/ ... group.html

If it's other case, explain with more detail.
 #18603  by DMSUser
 
Hi jllort,

Your are correct. We also looked into the same documentation and were able to read the property by using the example provided. This we are able to do it from external java program and now we want to do it from action handler class of a workflow which is attached to a document.

I am supposed to generate new token by using below code in this case as well ?
Code: Select all
OKMAuth okmAuth = new OKMAuth_Service().getOKMAuthPort();
OKMPropertyGroup okmPg = new OKMPropertyGroup_Service().getOKMPropertyGroupPort();

// login
String token = okmAuth.login("okmAdmin", "admin")
Also we are not able to get openKM 6.0 core jars for compiling the action handler class in eclipse plugin. We are using below code snippet.
Code: Select all
String path = OKMRepository.getInstance().getNodePath(null, "b99f7973-4b90-457a-a2d0-cf2090ba995d");
 #18608  by jllort
 
OpenKM 6 is not yet reased you're working on a trial ?

You can not login into worflow, only get sysToken ( tasks are not internally executed by user which acts in openkm ui)

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.