07-21-2008 06:52 AM
01-03-2011 10:46 AM
<?xml version="1.0" encoding="UTF-8"?>
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="wf:adhoc">
<swimlane name="initiator"/>
<start-state name="start">
<task name="wf:submitAdhocTask" swimlane="initiator"/>
<transition name="" to="adhoc"/>
</start-state>
<swimlane name="assignee">
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
<actor>#{bpm_assignee}</actor>
</assignment>
</swimlane>
<task-node name="adhoc">
<task name="wf:adhocTask" swimlane="assignee">
<event type="task-create">
<script>
if (bpm_workflowDueDate != void) taskInstance.dueDate = bpm_workflowDueDate;
if (bpm_workflowPriority != void) taskInstance.priority = bpm_workflowPriority;
</script>
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
{
var mail = actions.create("mail");
mail.parameters.to = bpm_assignee.properties.email;
mail.parameters.subject = "Adhoc Task: " + bpm_workflowDescription;
mail.parameters.from = initiator.properties.email;
mail.parameters.template = companyhome.childByNamePath("Data Dictionary/Email Templates/Notify Email Templates/notify_user_assigned_task_email.ftl");
mail.parameters.text = "A task was created.";
mail.execute(bpm_package);
}
</script>
</action>
</event>
</task>
<transition name="" to="completed">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
if (wf_notifyMe)
{
var mail = actions.create("mail");
mail.parameters.to = initiator.properties.email;
mail.parameters.subject = "Adhoc Task: " + bpm_workflowDescription;
mail.parameters.from = bpm_assignee.properties.email;
mail.parameters.template = companyhome.childByNamePath("Data Dictionary/Email Templates/Notify Email Templates/notify_initiator_completed_task_email.ftl");
mail.parameters.text = "This task is done.";
mail.execute(bpm_package);
}
</script>
</action>
</transition>
</task-node>
<task-node name="completed">
<task name="wf:completedAdhocTask" swimlane="initiator"/>
<transition name="" to="end"/>
</task-node>
<end-state name="end"/>
</process-definition>
NOTE: I am using Email templates for both the initial notification and the "Task Done" notification.03-04-2011 01:44 PM
NOTE: I am using Email templates for both the initial notification and the "Task Done" notification.
Also note that you need to use the http://wiki.alfresco.com/wiki/Workflow_Console to "deploy" any changes to the workflow definition.
03-11-2011 09:39 AM
If I remember correctly, I used the invite-email.ftl template (in Share: Repository> Data Dictionary> Email Templates> invite) as an example and created my own in a new folder (in Share: Repository> Data Dictionary> Email Templates> Notify Email Templates). Of course, make sure you use the correct path in the adhoc_processdefinition.xml file.NOTE: I am using Email templates for both the initial notification and the "Task Done" notification.
Also note that you need to use the http://wiki.alfresco.com/wiki/Workflow_Console to "deploy" any changes to the workflow definition.
Hi ekimnosneb,
could you please share your email notification template (if they contain various reference to the started workflow) or suggest me a good point of start?
I am trying to write a comprehensive notification email…
Thanks
A new task was assigned to you by ${person.properties.firstName}<#if person.properties.lastName?exists> ${person.properties.lastName}</#if>.
Check the My Tasks dashlet on your dashboard:
${url.serverPath}/share
Regards
Alfresco
A task you assigned to ${person.properties.firstName}<#if person.properties.lastName?exists> ${person.properties.lastName}</#if> is done.
Check the Workflows I've Started page on your dashboard:
${url.serverPath}/share/page/my-workflows
Regards
Alfresco
03-16-2011 08:04 AM
03-20-2011 09:17 PM
<?xml version="1.0" encoding="UTF-8"?>
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="wf:review">
<swimlane name="initiator" />
<start-state name="start">
<task name="wf:submitReviewTask" swimlane="initiator" />
<transition name="" to="review" />
</start-state>
<swimlane name="reviewer">
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
<actor>#{bpm_assignee}</actor>
</assignment>
</swimlane>
<task-node name="review">
<task name="wf:reviewTask" swimlane="reviewer">
<event type="task-create">
<script>
if (bpm_workflowDueDate != void) taskInstance.dueDate = bpm_workflowDueDate;
if (bpm_workflowPriority != void) taskInstance.priority = bpm_workflowPriority;
</script>
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
{
var mail = actions.create("mail");
mail.parameters.to = bpm_assignee.properties.email;
mail.parameters.subject = "Review and Approve: " + bpm_workflowDescription;
mail.parameters.from = initiator.properties.email;
mail.parameters.template = companyhome.childByNamePath("Data Dictionary/Email Templates/Notify Email Templates/notify_user_assigned_task_email.ftl");
mail.parameters.text = "A task was created.";
mail.execute(bpm_package);
}
</script>
</action>
</event>
</task>
<transition name="approve" to="approved" />
<transition name="reject" to="rejected" />
</task-node>
<task-node name="rejected">
<task name="wf:rejectedTask" swimlane="initiator" />
<transition name="" to="end" />
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
if (wf_notifyMe)
{
var mail = actions.create("mail");
mail.parameters.to = initiator.properties.email;
mail.parameters.subject = "Review Task: " + bpm_workflowDescription;
mail.parameters.from = bpm_assignee.properties.email;
mail.parameters.template = companyhome.childByNamePath("Data Dictionary/Email Templates/Notify Email Templates/notify_initiator_completed_task_email.ftl");
mail.parameters.text = "This task is done.";
mail.execute(bpm_package);
}
</script>
</action>
</transition>
</task-node>
<task-node name="approved">
<task name="wf:approvedTask" swimlane="initiator" />
<transition name="" to="end" />
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
if (wf_notifyMe)
{
var mail = actions.create("mail");
mail.parameters.to = initiator.properties.email;
mail.parameters.subject = "Review Task: " + bpm_workflowDescription;
mail.parameters.from = bpm_assignee.properties.email;
mail.parameters.template = companyhome.childByNamePath("Data Dictionary/Email Templates/Notify Email Templates/notify_initiator_completed_task_email.ftl");
mail.parameters.text = "This task is done.";
mail.execute(bpm_package);
}
</script>
</action>
</transition>
</task-node>
<end-state name="end" />
</process-definition>
03-22-2011 03:00 AM
03-25-2011 12:20 PM
09-21-2011 01:21 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.