AnsweredAssumed Answered

Workflow based on content type or property value

Question asked by katarinahallberg on Apr 30, 2013
Latest reply on May 2, 2013 by katarinahallberg
Hi, I am investigating a way to implement a requirement where different workflows should be available based on document content type or property in document. Hope someone can help me with the best way to solve this.

<!–break–>

More detailed description of the current situation and the additional requirement is following here. I am relatively new to Alfresco development, so I might not use the correct terminology but I hope you understand what I mean.

Today we have a custom content type and two different "review and publish workflows", one with a one step approval process, and one with a two step approval process. Those two workflows are displayed in the menu at the Workflow page after user has invoked the "Start workflow" action. So the user starting the workflow is the one choosing which workflow to start.

The requirement is that it should not be up to the user starting the workflow to select which workflow to start, it should rather be decided by the document that is being "put through" the workflow. The document should by default belong to the "two-step-process", but some users (probably based on which group they belong to) should be able to "mark" the document to belong to the "one-step-process" instead. Based on this only the appropriate "review and publish workflow" should be available when starting a workflow.


My current plan is to:
<ol>
<li> Add an UI-action that is available for some users (probably based on which group they belong to) that can override the default "setting" of document belonging to the "two-step-process". Not sure if I should use different content types, an aspect or a value of an "invisible" property to mark the documents "process-belonging". Any suggestion on this is welcomed.</li>

<li>Replace the two existing "review and publish workflows" with one workflow that takes different "roads" (one-step- or two-step-process) based on document content type, aspect or value of a property (see above).</li>
</ol>

Questions:

<ol>
<li>Is this a correct/good way of solving it?</li>

<li>What is the best way of "marking" which process a document belongs to? Content type, aspect, property value? It needs to be done in a way that I can "read" in the workflow when selecting which "road" to follow.</li>

<li>Is it an alternative solution to make changes in the js that finds workflows to list, so only appropriate workflow is shown, based on content type, aspect or property value of document. Is this even doable?</li>
</ol>

I use Alfresco 4.0.e, Share.

Please let me know if there is any other information needed to be able to understand the situation or requirement.

Outcomes