Page 1 of 1

[solved] Search documents by workflow state

PostPosted:Thu Feb 05, 2015 9:38 am
by Catscratch
Hi,

I there a way to search for documents by a specific workflow state?

I need two ways:
- via Web Frontend (I thought maybe in Search->Advanced)
- via REST API (SDK4J)

My use case is, that I'm importing document into OpenKM via an external program using the SDK4J. And I have a workflow definied for this import use case. So I got different states. E.g. "Import Successful" (workflow complete), "Import Failed" (workflow not complete). And now I want to get all documents that are pending in state "Import Failed" to re-import them.

Thanks!

Re: Search documents by workflow state

PostPosted:Sat Feb 07, 2015 11:26 am
by jllort
I suppose you're talking about metadata ? when I document fails you mark with property group or not ? this a good practice and correct way to solve it.

Re: Search documents by workflow state

PostPosted:Mon Feb 09, 2015 6:48 am
by Catscratch
No, I'm talking about workflows and workflow states.

http://wiki.openkm.com/index.php/Workflow_Guide

There I declare several states with jBPM and thought about some kind of "give me all documents which hang in state X" (for example).

Re: Search documents by workflow state

PostPosted:Wed Feb 11, 2015 4:42 pm
by jllort
I do not know if it's possible, should investigate jbpm database for it, I've never done this. One solution could be store this information in metadata and each time you change state ( transition ) save it. Probably will be more easy than investigate JBPM tables