when i do transition from one initiator to other user(group) then transition is done now again after task comming from that user to intiator. now i want to reassign that task to other user in same group then transition is takes place but task is going to 1st user again intend of selected user?
Here is my processdefination.xml here when we reassign the process to headnoter then the transition goes to first user not the selected user (headnoter) in task editReview. plz rply fast!!!!!
and also where swimlane actor is defined????? which file i don't remeber now??? <?xml version="1.0" encoding="UTF-8"?>
</script> </action> </event> </task> <!– if Approved–> <transition name="approve" to="approved"> <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript"> <script> var doc = bpm_package.children[0]; doc.properties['cch:contentState']= "Editing In Process"; doc.save(); </script> </action> <!– send mail –> <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript"> <script> logger.log("workflow mail start") ; try{ var mail = actions.create("mail"); var userid = peopleExt.getPersonByProduct(bpm_package.children[0].displayPath) ; logger.log("user::"+userid); var userNodeId = people.getPerson(userid); logger.log("user node id::"+userNodeId); mail.parameters.from =userNodeId.properties.email; logger.log("mail from ::::"+userNodeId.properties.email); mail.parameters.subject = "You have been assigned task for " +bpm_workflowDescription; mail.parameters.to = cwf_headnoter.properties.email; logger.log("mail to ::::"+ cwf_headnoter.properties.email); mail.parameters.template = companyhome.childByNamePath("Data Dictionary/Email Templates/Workflow Notification/wf-email.html.ftl"); mail.parameters.text = "Kindly edit and approve the document: " + bpm_workflowDescription; mail.execute(bpm_package); } catch(exception){
logger.log("exception in mail ::"+exception); } logger.log("workflow mail sent ") ; </script> </action> </transition> <!– if Rejected –> <transition name="reject" to="format"> <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript"> <script> var doc = bpm_package.children[0]; doc.properties['cch:contentState']= "Editing In Process"; doc.save(); </script> </action> <!– send mail –> <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript"> <script> logger.log("workflow mail start") ; try{ var mail = actions.create("mail"); var userid = peopleExt.getPersonByProduct(bpm_package.children[0].displayPath) ; logger.log("user::"+userid); var userNodeId = people.getPerson(userid); logger.log("user node id::"+userNodeId); mail.parameters.from =userNodeId.properties.email; logger.log("mail from ::::"+userNodeId.properties.email); mail.parameters.subject = "You have been assigned task for " + bpm_workflowDescription; mail.parameters.to = initiator.properties.email; logger.log("mail to ::::"+ initiator.properties.email); mail.parameters.template = companyhome.childByNamePath("Data Dictionary/Email Templates/Workflow Notification/wf-email.html.ftl"); mail.parameters.text = "Kindly edit and approve the document: " +bpm_workflowDescription; mail.execute(bpm_package); } catch(exception){
logger.log("exception in mail ::"+exception); } logger.log("workflow mail sent ") ; </script> </action> </transition> </task-node> <task-node name="approved"> <!– <task name="wf:approvedTask" swimlane="headnoter" /> –> <transition name="" to="headnote" /> </task-node> <!– Headnoter Task –> <task-node name="headnote"> <task name="cwf:headnoterTask" swimlane="headnoter"> <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> taskInstance.description =bpm_package.children[0].properties['cm:name'];
</script> </action> </event> <timer duedate="#{cwf_headNoterTAT}" transition="for edit review" > <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript"> <script> logger.log("HeadNoter Submission to be completed by " + cwf_headNoterTAT); </script> </action> </timer> </task> <transition name="for edit review" to="editReview"> <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript"> <script> var doc = bpm_package.children[0]; doc.properties['cch:contentState']= "Editing In Process"; doc.save(); </script> </action> <!– send mail –> <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript"> <script> logger.log("workflow mail start") ; try{ var mail = actions.create("mail"); var userid = peopleExt.getPersonByProduct(bpm_package.children[0].displayPath) ; logger.log("user::"+userid); var userNodeId = people.getPerson(userid); logger.log("user node id::"+userNodeId); mail.parameters.to =userNodeId.properties.email; logger.log("mail to ::::"+userNodeId.properties.email); mail.parameters.subject = "You have been assigned task for " + bpm_workflowDescription; mail.parameters.from = cwf_headnoter.properties.email; logger.log("mail from ::::"+ cwf_headnoter.properties.email); mail.parameters.template = companyhome.childByNamePath("Data Dictionary/Email Templates/Workflow Notification/wf-email.html.ftl"); mail.parameters.text = "Kindly edit and approve the document: " + bpm_workflowDescription; mail.execute(bpm_package); } catch(exception){
logger.log("exception in mail ::"+exception); } logger.log("workflow mail sent ") ; </script> </action> </transition> </task-node> <task-node name="editReview"> <task name="cwf:editHReassignTask" swimlane="editor"> <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> taskInstance.description =bpm_package.children[0].properties['cm:name'];
</script> </action> </event> </task> <!– if want to Reassign–> <transition name="Reassign" to="Reassign"> <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript"> <script> var doc = bpm_package.children[0]; doc.properties['cch:contentState']= "Editing In Process"; doc.save(); </script> </action> <!– send mail –> <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript"> <script> logger.log("workflow mail start inside Reassign1") ; try{ var mail = actions.create("mail"); var userid = peopleExt.getPersonByProduct(bpm_package.children[0].displayPath) ; logger.log("user::"+userid); var userNodeId = people.getPerson(userid); logger.log("user node id::"+userNodeId); mail.parameters.from =userNodeId.properties.email; logger.log("mail from ::::"+userNodeId.properties.email); mail.parameters.subject = "You have been assigned task for " +bpm_workflowDescription; mail.parameters.to = cwf_headnoter.properties.email; logger.log("mail to ::::"+cwf_headnoter.properties.email); logger.log("mail to new ::::"+cwf_headnoter1.properties["cm:email"]); mail.parameters.template = companyhome.childByNamePath("Data Dictionary/Email Templates/Workflow Notification/wf-email.html.ftl"); mail.parameters.text = "Kindly edit and approve the document: " + bpm_workflowDescription; mail.execute(bpm_package); } catch(exception){
logger.log("exception in mail ::"+exception); } logger.log("workflow mail sent from editor inside Reassign1 ") ; </script> </action> </transition> <!– if Ok –> <transition name="OK" to="OK"> </transition> </task-node> <task-node name="Reassign"> <transition name="" to="headnote" /> </task-node>