mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
- jBPM 3.1.2 to 3.2 upgrade
- Implementation of Workflow Timers (primarily for WCM content launch, but also useful in other scenarios) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5578 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
43
source/test-resources/jbpmresources/test_timers.xml
Normal file
43
source/test-resources/jbpmresources/test_timers.xml
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="wf:testtimers">
|
||||
|
||||
<swimlane name="initiator" />
|
||||
|
||||
<start-state name="start">
|
||||
<task name="bpm:startTask" swimlane="initiator" />
|
||||
<transition name="" to="launchpending">
|
||||
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
|
||||
<script>
|
||||
<expression>
|
||||
new Date(new Date().getTime() + 5000); // launch date = now + 1 minute
|
||||
</expression>
|
||||
<variable name="launchDate" access="write"/>
|
||||
</script>
|
||||
</action>
|
||||
</transition>
|
||||
</start-state>
|
||||
|
||||
<swimlane name="assignee">
|
||||
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
|
||||
<actor>#{bpm_assignee}</actor>
|
||||
</assignment>
|
||||
</swimlane>
|
||||
|
||||
<task-node name="launchpending">
|
||||
<task swimlane="assignee">
|
||||
<timer duedate="#{launchDate}" transition="launched">
|
||||
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
|
||||
<script>
|
||||
logger.log("Launched at " + launchDate + " by " + person.properties.userName);
|
||||
</script>
|
||||
</action>
|
||||
</timer>
|
||||
</task>
|
||||
<transition name="cancel" to="end" /> <!-- signalling this transition will cancel timer -->
|
||||
<transition name="launched" to="end" /> <!-- signalling this transition will cancel timer -->
|
||||
</task-node>
|
||||
|
||||
<end-state name="end" />
|
||||
|
||||
</process-definition>
|
Reference in New Issue
Block a user