12-05-2008 03:52 PM
<swimlane name="office_managers">
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
<pooledactors>#{people.getGroup('GROUP_office managers')}</pooledactors>
</assignment>
</swimlane>
<node name="Recieve Invoice">
<transition name="" to="Categorize">
<!– email office managers about the invoice –>
</transition>
</node>
12-07-2008 10:16 PM
<transition to="submitView">
<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 = "Memo Document Task " + bpm_workflowDescription;
mail.parameters.from = initiator.properties.email;
mail.parameters.text = "You have a new task from" + initiator;
mail.execute(bpm_package);
}
</script>
</action>
</transition>
12-08-2008 11:29 AM
ERROR [org.jbpm.graph.def.GraphElement] action threw exception: Failed to execute supplied script: Failed to execute supplied script: ReferenceError: "office_managers" is not defined. (AlfrescoScript#1)
<node name="Recieve Invoice">
<transition name="" to="Categorize">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
logger.log("here");
var group = office_managers;
</script>
</action>
</transition>
</node>
12-09-2008 04:59 PM
<?xml version="1.0" encoding="UTF-8"?>
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="helloWorld">
<start-state name="start">
<transition name="" to="Recieve Invoice"></transition>
</start-state>
<event type="node-enter">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<variable name="office_managers_group" access="write"/>
<expression>
office_managers_group = people.getGroup('GROUP_office managers');
</expression>
</script>
</action>
</event>
<swimlane name="office_managers">
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment" >
<pooledactors>#{office_managers_group}</pooledactors>
</assignment>
</swimlane>
<node name="Recieve Invoice">
<transition name="" to="Categorize">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<variable name="office_managers_group" access="read,write"/>
<expression>
logger.log(office_managers_group);
</expression>
</script>
</action>
</transition>
</node>
<task-node name="Categorize">
<task name="gwf:categorizeInvoice" swimlane="office_managers" />
<transition to="end1" name="">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<!– email person who completed task –>
</script>
</action>
</transition>
</task-node>
<end-state name="end1"></end-state>
</process-definition>
12-11-2008 01:42 PM
06-10-2009 03:51 AM
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<runas>admin</runas>
<script>
<expression>
if (afwf_sendEmail)
{
for each (user in people.getMembers(people.getGroup('GROUP_TheGroupYouWant'), false)){
var mail = actions.create("mail");
mail.parameters.to = user.properties["cm:email"];
mail.parameters.subject = "File involved " + bpm_package.children[0].properties["cm:title"];
mail.parameters.from = initiator.properties["cm:email"];
mail.parameters.text = "Your message";
mail.execute(bpm_package);
if (logger.isLoggingEnabled()) {
logger.log("\nEmail send to " + user.properties['cm:firstName'] + " " + user.properties['cm:lastName']);
}
}
}
</expression>
</script>
</action>
06-17-2009 04:55 AM
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.