cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow Implementation

senthil_chinnai
Champ in-the-making
Champ in-the-making
Hi All:

I am new to Alfresco and would like to implement the following:

1. Users will upload documents into various spaces.
2. Others should not see the uploaded document (even read access also) unless it is approved by manager
3. Once it is approved, it should be published for all.

Please help me in implementing the tasks!

Thanks,
Senthil.
21 REPLIES 21

senthil_chinnai
Champ in-the-making
Champ in-the-making
David,

Thanks for your reply. Is there any workaround available on Alfresco 1.4 community?

Thanks,
Senthil.

davidc
Star Contributor
Star Contributor
- restrict your usernames
- patch your version of 1.4 (I can give details if you're willing to go this route)

senthil_chinnai
Champ in-the-making
Champ in-the-making
David,

We can not restrict user names. Basically user names are numbers in our organization.

Could you please provide me the patch details? I would like to do that.

Thanks,
Senthil.

davidc
Star Contributor
Star Contributor
You can also move to 2.0.  This will be released any time now.

To fix you need to remove ISO9075.encode from:

getTasksCompleted()
getTasksTodo()

in WorkflowBean.java.

senthil_chinnai
Champ in-the-making
Champ in-the-making
Thanks so much David, I will try the fix.

Senthil.

senthil_chinnai
Champ in-the-making
Champ in-the-making
David,

The fix works, thanks a lot for your help !

Thanks,
Senthil.

nh
Champ in-the-making
Champ in-the-making
Hi,

Would there be a way to move a content from a space to another , by using the advanced worklow, based on the actions available?

eg: in the advanced workflow, a content could be assigned to a reviewer [ Review and Approve or the Adhoc ]  After this the content appears in the reviewers my task list. here the review  "Manages Task" and sets the status to Completed and clicks on Approve and finishes the task.

At this point , can the approved content automatically be moved to anther space? Could a mail also be triggered at the same time?

Please help.

Thanks
Hari

davidc
Star Contributor
Star Contributor
Yes.

Within an advanced workflow definition, you can hook Alfresco javascript (or java) to events within the workflow.  Common events include "on transition", "on node enter", "on node leave" etc.

See http://wiki.alfresco.com/wiki/WorkflowAdministration#Actions_.26_Scripting

So, you can essentially perform any operation you like when a user completes a task.

nh
Champ in-the-making
Champ in-the-making
Hi,

We are custmizing the workflow in alfresco[ Advanced Workflow ]

As a part of this we need to send mail alerts to the initiator when the content is approved in the "Review & Approve" cycle of the advanced workflow.

I have made some changes to the review_processdefinition.xml and the workflowModel.xml as below


review_processdefinition.xml

<transition name="reject" to="rejected" >
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
var mail = actions.create("mail");
mail.parameters.to = initiator.properties["cm:email"];
mail.parameters.subject = "Review Task " + bpm_workflowDescription;
mail.parameters.from = reviewer.properties["cm:email"];
mail.parameters.text = "It's done";
mail.execute(bpm_package);
}
</script>
</action>
</transition>

<transition name="approve" to="approved" >
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
var mail = actions.create("mail");
mail.parameters.to = initiator.properties["cm:email"];
mail.parameters.subject = "Review Task " + bpm_workflowDescription;
mail.parameters.from = bpm_assignee.properties["cm:email"];
mail.parameters.text = "It's done";
mail.execute(bpm_package);
}
</script>
</action>
</transition>

workflowModel.xml

<type name="wf:completedReviewTask">
<parent>bpm:workflowTask</parent>
</type>

<type name="wf:rejectedReviewTask">
<parent>bpm:workflowTask</parent>
</type>


even after this there are no mails getting triggered.

Please let me know how could make this possible?


Thanks ,
Hari

PSmiley Frustrated. This feature is similar to the notify me option in the Adhoc workflow, but that we do not want the Notify Me check box

senthil_chinnai
Champ in-the-making
Champ in-the-making
Yes.

Within an advanced workflow definition, you can hook Alfresco javascript (or java) to events within the workflow.  Common events include "on transition", "on node enter", "on node leave" etc.

See http://wiki.alfresco.com/wiki/WorkflowAdministration#Actions_.26_Scripting

So, you can essentially perform any operation you like when a user completes a task.

David,

I tried changing subject & body of Adhoc email configuration, it doesn't take any changes. Please help !

I have changed the following line just to see the change, but it doesn't seem to be working. Is there any other place I need to change?

\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\workflow\adhoc_processdefinition.xml"(40,42):                 mail.parameters.text = "It's doneeeeeeeee"


Thanks,
Senthil.