Commits

Anonymous committed ac0aead

Updated IDEA files

Comments (0)

Files changed (5)

 <?xml version="1.0" encoding="UTF-8"?>
-<module version="4" relativePaths="false" type="JAVA_MODULE">
+<module version="4" relativePaths="true" type="JAVA_MODULE">
   <component name="LvcsConfiguration">
     <option name="LOCAL_VCS_ENABLED" value="true" />
     <option name="LOCAL_VCS_PURGING_PERIOD" value="259200000" />
     <orderEntry type="module-library">
       <library>
         <CLASSES>
-          <root url="jar://$MODULE_DIR$/lib/optional/spring-1.0.jar!/" />
-        </CLASSES>
-        <JAVADOC />
-        <SOURCES />
-      </library>
-    </orderEntry>
-    <orderEntry type="module-library">
-      <library>
-        <CLASSES>
           <root url="jar://$MODULE_DIR$/lib/optional/velocity-dep-1.4.jar!/" />
         </CLASSES>
         <JAVADOC />
         <SOURCES />
       </library>
     </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/lib/optional/spring-1.2.5.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/lib/optional/hibernate3.0.5.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
     <orderEntryProperties />
   </component>
   <component name="RetroweaverPlugin">
   </component>
   <component name="VcsManagerConfiguration">
     <option name="ACTIVE_VCS_NAME" value="CVS" />
-    <option name="USE_PROJECT_VCS" value="true" />
+    <option name="USE_PROJECT_VCS" value="false" />
   </component>
 </module>
 
   </component>
   <component name="CompilerConfiguration">
     <option name="DEFAULT_COMPILER" value="Javac" />
-    <option name="CLEAR_OUTPUT_DIRECTORY" value="false" />
+    <option name="CLEAR_OUTPUT_DIRECTORY" value="true" />
     <option name="DEPLOY_AFTER_MAKE" value="0" />
     <resourceExtensions>
       <entry name=".+\.(properties|xml|html)" />

src/designer/designer.iml

 <?xml version="1.0" encoding="UTF-8"?>
-<module version="4" relativePaths="false" type="JAVA_MODULE">
+<module version="4" relativePaths="true" type="JAVA_MODULE">
   <component name="ModuleRootManager" />
   <component name="NewModuleRootManager">
-    <output url="file:///Users/hani/projects/osworkflow/build/designer" />
+    <output url="file://$MODULE_DIR$/../../build/designer" />
     <exclude-output />
     <content url="file://$MODULE_DIR$">
       <sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
     <orderEntry type="module-library">
       <library>
         <CLASSES>
-          <root url="jar:///Users/hani/projects/osworkflow/lib/designer/jgraph.jar!/" />
+          <root url="jar://$MODULE_DIR$/../../lib/designer/jgraph.jar!/" />
         </CLASSES>
         <JAVADOC />
         <SOURCES />
     <orderEntry type="module-library">
       <library>
         <CLASSES>
-          <root url="jar:///Users/hani/projects/osworkflow/lib/designer/looks.jar!/" />
+          <root url="jar://$MODULE_DIR$/../../lib/designer/looks.jar!/" />
         </CLASSES>
         <JAVADOC />
         <SOURCES>
-          <root url="file:///Users/hani/projects/looks/src/windows" />
-          <root url="file:///Users/hani/projects/looks/src/plastic" />
-          <root url="file:///Users/hani/projects/looks/src/share" />
+          <root url="file://$MODULE_DIR$/../../../looks/src/windows" />
+          <root url="file://$MODULE_DIR$/../../../looks/src/plastic" />
+          <root url="file://$MODULE_DIR$/../../../looks/src/share" />
         </SOURCES>
       </library>
     </orderEntry>
     <orderEntry type="module-library">
       <library>
         <CLASSES>
-          <root url="jar:///Users/hani/projects/osworkflow/lib/designer/foxtrot.jar!/" />
+          <root url="jar://$MODULE_DIR$/../../lib/designer/foxtrot.jar!/" />
         </CLASSES>
         <JAVADOC />
         <SOURCES />
     <orderEntry type="module-library">
       <library>
         <CLASSES>
-          <root url="jar:///Users/hani/projects/osworkflow/lib/designer/forms.jar!/" />
+          <root url="jar://$MODULE_DIR$/../../lib/designer/forms.jar!/" />
         </CLASSES>
         <JAVADOC />
         <SOURCES>
-          <root url="file:///Users/hani/projects/forms/src/main" />
+          <root url="file://$MODULE_DIR$/../../../forms/src/main" />
         </SOURCES>
       </library>
     </orderEntry>
     <orderEntry type="module-library">
       <library>
         <CLASSES>
-          <root url="jar:///Users/hani/projects/osworkflow/lib/designer/syntax.jar!/" />
+          <root url="jar://$MODULE_DIR$/../../lib/designer/syntax.jar!/" />
         </CLASSES>
         <JAVADOC />
         <SOURCES />
   </component>
   <component name="VcsManagerConfiguration">
     <option name="ACTIVE_VCS_NAME" value="CVS" />
-    <option name="USE_PROJECT_VCS" value="true" />
+    <option name="USE_PROJECT_VCS" value="false" />
   </component>
 </module>
 

src/test/com/opensymphony/workflow/JoinTestCase.java

+/*
+ * Copyright (c) 2002-2003 by OpenSymphony
+ * All rights reserved.
+ */
+package com.opensymphony.workflow;
+
+import com.opensymphony.workflow.basic.BasicWorkflow;
+
+import junit.framework.TestCase;
+
+
+/**
+ * @author hani Date: Feb 17, 2005 Time: 4:24:20 PM
+ */
+public class JoinTestCase extends TestCase {
+    //~ Instance fields ////////////////////////////////////////////////////////
+
+    private Workflow workflow;
+
+    //~ Methods ////////////////////////////////////////////////////////////////
+
+    public void testWithReject() throws Exception {
+        checkRoute(new int[] {2, 3, 2, 4, 6, 7});
+    }
+
+    protected void setUp() throws Exception {
+        workflow = new BasicWorkflow("testuser");
+    }
+
+    private void checkRoute(int[] actions) throws Exception {
+        long workflowId = workflow.initialize(getClass().getResource("/samples/join.xml").toString(), 1, null);
+
+        for (int i = 0; i < actions.length; i++) {
+            workflow.doAction(workflowId, actions[i], null);
+        }
+    }
+}

src/test/samples/join.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE workflow PUBLIC "-//OpenSymphony Group//DTD OSWorkflow 2.7//EN" "http://www.opensymphony.com/osworkflow/workflow_2_7.dtd">
+<workflow>
+  <initial-actions>
+    <action id="1" name="Start Workflow">
+      <results>
+        <unconditional-result old-status="Finished" status="Queued" step="1"/>
+      </results>
+    </action>
+  </initial-actions>
+  <steps>
+    <step id="1" name="First Part">
+      <actions>
+        <action id="2" name="Finish First Part">
+          <results>
+            <unconditional-result old-status="Finished" status="Queued" split="1"/>
+          </results>
+        </action>
+      </actions>
+    </step>
+    <step id="2" name="Second Part">
+      <actions>
+        <action id="3" name="Back to First Part">
+          <results>
+            <unconditional-result old-status="Rejected" status="Queued" step="1"/>
+          </results>
+        </action>
+        <action id="4" name="Finish">
+          <results>
+            <unconditional-result old-status="Finished" status="Queued" join="1"/>
+          </results>
+        </action>
+      </actions>
+    </step>
+    <step id="3" name="Another Second Part">
+      <actions>
+        <action id="5" name="Back to First Part">
+          <results>
+            <unconditional-result old-status="Rejected" status="Queued" step="1"/>
+          </results>
+        </action>
+        <action id="6" name="Finish">
+          <results>
+            <unconditional-result old-status="Finished" status="Queued" join="1"/>
+          </results>
+        </action>
+      </actions>
+    </step>
+    <step id="4" name="End" />
+  </steps>
+
+  <splits>
+    <split id="1">
+      <unconditional-result old-status="Finished" status="Queued" step="2"/>
+      <unconditional-result old-status="Finished" status="Queued" step="3"/>
+    </split>
+  </splits>
+
+  <joins>
+    <join id="1">
+      <conditions type="AND">
+        <condition type="beanshell">
+          <arg name="script">"Finished".equals(jn.getStep(2).getStatus())</arg>
+        </condition>
+        <condition type="beanshell">
+          <arg name="script">"Finished".equals(jn.getStep(3).getStatus())</arg>
+        </condition>
+      </conditions>
+      <unconditional-result old-status="Finished" status="Finish" step="4"/>
+    </join>
+  </joins>
+</workflow>