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:
65
source/test-resources/jbpmresources/test_script.xml
Normal file
65
source/test-resources/jbpmresources/test_script.xml
Normal file
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="test_script">
|
||||
<swimlane name="initiator"></swimlane>
|
||||
|
||||
<start-state name="start">
|
||||
<task name="submit" swimlane="initiator">
|
||||
<event type="task-assign">
|
||||
<script>
|
||||
System.out.println("taskInstance.create: " + taskInstance.create);
|
||||
System.out.println("taskInstance.description: " + taskInstance.description);
|
||||
</script>
|
||||
</event>
|
||||
<controller>
|
||||
<variable name="testNode" access="write,required" />
|
||||
<variable name="bpm_workflowDescription" access="write" />
|
||||
</controller>
|
||||
</task>
|
||||
<transition name="" to="doit" />
|
||||
</start-state>
|
||||
|
||||
<node name="doit">
|
||||
<event type="node-enter">
|
||||
<script>
|
||||
<expression>
|
||||
System.out.println("testNode.created: " + testNode.properties{"cm:created"});
|
||||
System.out.println("test node " + testNode.name + " contains " + testNode.children.length + " children");
|
||||
</expression>
|
||||
<variable name="testNode" access="read" />
|
||||
</script>
|
||||
</event>
|
||||
<event type="node-enter">
|
||||
<action
|
||||
class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
|
||||
<script>
|
||||
<!-- following line fails as it attempts to convert properties of children to javascript objects -->
|
||||
<!-- except the beanshell line above has already pre-created the children without the javascript scope -->
|
||||
<!-- object -->
|
||||
<!-- var result = "testNode.created: " + testNode.properties["cm:created"] + ", testNode.children.length: " + testNode.children[0].properties["cm:name"]; -->
|
||||
<expression>
|
||||
var result = "testNode.created: " + theTestNode.properties["cm:created"] + ", theTestNode.children.length: " + theTestNode.children.length;
|
||||
if (logger.isLoggingEnabled())
|
||||
{
|
||||
logger.log(result);
|
||||
}
|
||||
result;
|
||||
</expression>
|
||||
<variable name="testNode" access="read" mapped-name="theTestNode" />
|
||||
<variable name="alfrescoScriptResult" access="write" />
|
||||
</script>
|
||||
</action>
|
||||
</event>
|
||||
<transition name="" to="end" />
|
||||
</node>
|
||||
|
||||
<end-state name="end">
|
||||
<event type="node-enter">
|
||||
<script>
|
||||
System.out.println("javascript: " + alfrescoScriptResult);
|
||||
System.out.println("bpm_workflowDescription: " + bpm_workflowDescription);
|
||||
</script>
|
||||
</event>
|
||||
</end-state>
|
||||
|
||||
</process-definition>
|
Reference in New Issue
Block a user