AnsweredAssumed Answered

Complete CheckOut/CheckIn Cycle in an advanced Workflow

Question asked by gl on May 24, 2007
Latest reply on Aug 20, 2007 by gl
Hi,
I need to set up an environment allowing users to CheckOut read-only documents,
without the permission of checking them in again until a second user reviewed the documents.

But the CheckOut/Lock permission requires write permission (right?),
so I thought about an advanced workflow which
-  ChecksOut the requested documents as admin user
-  allows the initiator to change the workingcopy
-  Submit an Reviewer-Task to an User pool if the initiator finished editing
- CheckIn the documents if the reviewer is happy (again as admin user)

While programming the workflow I met a problem:
The CheckIn function needs the workingCopy’s noderef as argument,
but the workflow package only contains the original document’s node.
So I need to save the return value from the CheckOut function for the CheckIn task.

I thought about changing the workflow package, but this seems not yet implemented in 2.0,
so I thought about sth like adding an aspect similar to bpm:assignees , which haves an
association to itself, to store multiple cm:content instead of cm:person.
But I don’t know how to do that in alfresco script.

Or is there a way to access the DocumentDetailsBean.workingCopyDocument
in alfresco script like in document-details.jsp?
(I don’t know how to access a custom action class from a workflow)


So my first question is whether the concept is good at all, or is there an easier way to allow users to
CheckOut ReadOnly documents and add a condition to the CheckIn mechanism?

Maybe somebody out there made already what I need, it’s after all not a very special thing…

Outcomes