07-16-2008 11:20 PM
<?xml version="1.0" encoding="UTF-8"?>
<process-definition xmlns="urn:jbpm.org:jpdl-3.1"
name="ccswfcredential:credential">
<swimlane name="initiator" />
<swimlane name="reviewer">
<assignment
class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
<actor>#{bpm_assignee}</actor>
</assignment>
</swimlane>
<swimlane name="filler">
<assignment
class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
<actor>
#{people.getPerson("tsmith").properties["cm:userName"]}
</actor>
</assignment>
</swimlane>
<start-state name="start">
<task name="ccswfcredential:startTask" swimlane="initiator" />
<transition name="Initiate" to="Initiate" />
</start-state>
<task-node name="Initiate">
<event type="node-leave">
<script>
System.out.println("———- Node Leave of LicenseTask
————");
</script>
</event>
<task name="ccswfcredential:licenseTask" swimlane="initiator">
<event type="task-create">
<script>
System.out.println("———-in Task Create of
LicenseTask———");
</script>
<action
class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
taskInstance.setVariable("ccswfcredential_firstname","WFDefault");
taskInstance.setVariable("ccswfcredential_lastname","WFDefault");
taskInstance.setVariable("ccswfcredential_info","WFDefault");
taskInstance.setVariable("ccswfcredential_st","WFDefault");
bpm_package.children[0].properties["ccs:fname"]
= "WFDefault";
bpm_package.children[0].properties["ccs:lname"]
= "WFDefault";
bpm_package.children[0].properties["ccs:st"] =
"WFDefault";
bpm_package.children[0].properties["ccs:info"] =
"WFDefault";
</script>
</action>
</event>
<event type="task-end">
<script>
System.out.println("———-in Task End of
LicenseTask ———–");
</script>
</event>
<timer name='AutoPreFill' duedate='3 minute'
transition='Pre-Fill'>
<action
class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>var temp2 = "dummy";</script>
</action>
</timer>
</task>
<transition name="Evaluate" to="Evaluate" />
<transition name="Pre-Fill" to="Prefill" />
</task-node>
<task-node name="Prefill">
<task name="ccswfcredential:prefillTask" swimlane="filler" />
<event type="task-create">
<script>
System.out.println("———-in Task Create of PreFill
Task———");
</script>
<action
class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
var temp =
bpm_package.children[0].properties["ccs:fname"];
taskInstance.setVariable("ccswfcredential_firstname",temp);
temp =
bpm_package.children[0].properties["ccs:lname"];
taskInstance.setVariable("ccswfcredential_lastname",temp);
temp =
bpm_package.children[0].properties["ccs:info"];
taskInstance.setVariable("ccswfcredential_info",temp);
temp = bpm_package.children[0].properties["ccs:st"];
taskInstance.setVariable("ccswfcredential_st",temp);
</script>
</action>
</event>
<transition name="Evaluate" to="Evaluate" />
</task-node>
<task-node name="Evaluate">
<task name="ccswfcredential:evaluateTask" swimlane="reviewer" />
<transition name="moreInfoNeeded" to="moreInfoNeeded" />
<transition name="Complete" to="complete" />
</task-node>
<task-node name="moreInfoNeeded">
<task name="ccswfcredential:moreInfoNeededTask"
swimlane="initiator" />
<transition name="Re-Evaluate" to="Evaluate">
<action
class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
var mail = actions.create("mail");
mail.parameters.to = "ani@possible.com";
mail.parameters.subject = "ReEvaluate " +
ccswfcredential_firstname + " " +
ccswfcredential_lastname +"'s Credentials";
mail.parameters.text = "Please Re-Evaluate the
additional Information \n "+ "License Number : " +
ccswfcredential_info + "\n"+ "State : " +
ccswfcredential_st + "\n" ;
mail.execute(bpm_package);
</script>
</action>
</transition>
</task-node>
<task-node name="complete">
<task name="ccswfcredential:completeTask" swimlane="initiator" />
<transition name="Complete" to="end">
<action
class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
var scriptnode_mycontent = bpm_package.children[0];
var documentfolder = bpm_package.children[0].parent;
var destinationFolder =
documentfolder.childByNamePath("Evaluated
Licenses");
bpm_package.children[0].copy(destinationFolder);
</script>
</action>
</transition>
</task-node>
<end-state name="end" />
</process-definition>
07-17-2008 03:50 AM
<show-association name="bpm:assignee" />
07-17-2008 09:48 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.