Page 1 of 1

disable/enable acces to users with workflow 6.2.0

PostPosted:Fri Dec 14, 2012 4:41 pm
by Franck61
Hello,
we're looking to do a workflow on our documents in order to validate them before they can be used by others users. Is there a way to do this?
Example : 1. a user uploads a document in a folder and start the worflow (perhaps automatically?). No one except him and the users in the workflow can't access to the document.
2. the users in the workflow validate the document and then all the users authorized to access the folder can access to the document.

Re: disable/enable acces to users with workflow 6.2.0

PostPosted:Sat Dec 15, 2012 9:31 am
by jllort
Yes there're two options for doing it. When workflow starts first task could be:

1- Remove write grants and when finished restore ( more complicated ).

2- Simply add lock to diocument and when finished workflow unlock document.

Re: disable/enable acces to users with workflow 6.2.0

PostPosted:Wed Dec 19, 2012 10:22 am
by Franck61
Thanks for your answer, but how can we do this programmatically (i use jbpm 3 to do my workflow) ?
If we lock the document, could the users involve in the worklow, access to the document (read, edit, etc.).

Re: disable/enable acces to users with workflow 6.2.0

PostPosted:Wed Dec 19, 2012 7:03 pm
by jllort
You should read with paciente workflow guide http://wiki.openkm.com/index.php/Workflow_Guide and make some simple workflows in some development environment then you can working on real workflow.

In your case can be implemented as:
1- Get system token -> systemToken = DbSessionManager.getInstance().getSystemToken(); ( http://doxygen.openkm.com/6.2.x/d4/dab/ ... nager.html )
2- Change grants OKMAuth ( http://doxygen.openkm.com/6.2.x/d7/d54/ ... _auth.html )

Point to could same grants to database to recover later, but before talking about it I suggest you doing a workflow that make it. After it we can working on the rest.