Page 1 of 1

Reading OpenKM metadata property

PostPosted:Tue Oct 02, 2012 11:34 am
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

Re: Reading OpenKM metadata property

PostPosted:Wed Oct 03, 2012 10:03 pm
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.

Re: Reading OpenKM metadata property

PostPosted:Thu Oct 04, 2012 4:39 am
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");

Re: Reading OpenKM metadata property

PostPosted:Thu Oct 04, 2012 5:11 pm
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)