cancel
Showing results for 
Search instead for 
Did you mean: 

Scenario: Thinking in set of documents(dossier)

dave984
Champ in-the-making
Champ in-the-making
Hi all, i'm not new to Alfresco having used webscript, actions and custom content model.
Now i'd like to understand better the workflow capabilities and i started from the J. Potts's tutorials (as usual!).
In my case study i've:
  - a single doc could be approved/rejected
  - a set of documents(a practice): if they are all approved the state of practice is approved else if only one document is rejected the practice itself is rejected.

Is this concept of set of documents, or practice or dossier, available in Alfresco(or through Activity)?
Someone have some references on that?
3 REPLIES 3

jpotts
World-Class Innovator
World-Class Innovator
Dave,

Thanks for reading the tutorials! There are probably many ways to do this. One way is to use a folder. In Alfresco, documents can reside in more than one folder. So your documents could reside where the user expects them to as their primary folder, and then if you need to group related documents in a "practice" folder, you could create the practice folder under somewhere like "practices" then add the documents related to that practice to the practice-specific folder.

If you need to track a status on the practice-specific folder, you can extend cm:folder with your own custom folder type that includes a status property.

One bit of complexity is how to handle the status of an individual document, particularly if the status of the document might be different for each practice in which it resides. I don't know enough about your requirements to know which direction to steer you on that, but suffice it to say you could either store the status on the document, on the practice folder, on some other object, or not at all.

Depending on where you track that status will tell you how to put the hook in that detects that and then sets the appropriate status on the practice folder. For example, if you put the status on the document, you could write a behavior that would see that property change, find the appropriate practice folder, and then go set its status on it.

Hope that helps give you some ideas as to how you might approach this.

Jeff

dave984
Champ in-the-making
Champ in-the-making
Hi Jeff, thanks for sharing this approach.
In my situation a single document is NOT part of more than one practice.
Maybe the right approach would be create a custom advanced workflow using Activity that would expect more documents(or Elements as in the attached image).
The issue would be approve/reject the single document and not the entire workflow.
Does it make sense?

jpotts
World-Class Innovator
World-Class Innovator
It sounds like you need to be able to individually reject documents in a workflow.

Here are some thoughts:

1. You can allow people who can manage the workflow to remove documents from the workflow package, essentially signifying their rejection. You could trap this by comparing the package before and after that workflow step if you need to set something on the documents that were removed.

2. You could customize the component that displays the contents of the workflow package to include approve/reject actions.

3. You could use a custom control to add an additional field to the task management form that would list the documents in the package and let the user select which ones to approve/reject.

4. You could modify your workflow to spawn an approve/reject task for every document in the workflow package.

Those are a few ideas.

Jeff