cancel
Showing results for 
Search instead for 
Did you mean: 

Complete CheckOut/CheckIn Cycle in an advanced Workflow

gl
Champ in-the-making
Champ in-the-making
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 cmSmiley Tongueerson.
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…
3 REPLIES 3

gl
Champ in-the-making
Champ in-the-making
I'll provide any information if you need it, if it helps, I can post my definitions or models.

mdickson
Champ in-the-making
Champ in-the-making
gl,

How did you go getting example files? I would be interested in seeing what you ended up with.

gl
Champ in-the-making
Champ in-the-making
Sorry that the answer took some time, my company gave me another project to work on in the meantime,
the look-for-document-management project is still frozen.

Getting  example files:
You can get the example files in the Alfresco tree.
If you have the community version take a look at
Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\workflow\

What I ended up with:
I had 2 weeks to get a picture of alfresco, but I didn’t solve this problem and I won’t try it again without help