You are viewing a plain text version of this content. The canonical link for it is here.
Posted to agila-commits@incubator.apache.org by cl...@apache.org on 2005/07/14 10:21:09 UTC
svn commit: r219028 - in /incubator/agila/trunk/modules/bpm/src:
test-resources/ test/org/apache/agila/ test/org/apache/agila/impl/dao/
test/org/apache/agila/util/
Author: clim
Date: Thu Jul 14 03:21:06 2005
New Revision: 219028
URL: http://svn.apache.org/viewcvs?rev=219028&view=rev
Log:
Moving LeaveApplication.xml to test-resources directory and updated updated affected classes.
Added:
incubator/agila/trunk/modules/bpm/src/test-resources/
incubator/agila/trunk/modules/bpm/src/test-resources/LeaveApplication.xml
Removed:
incubator/agila/trunk/modules/bpm/src/test/org/apache/agila/LeaveApplication.xml
Modified:
incubator/agila/trunk/modules/bpm/src/test/org/apache/agila/LeaveApplicationTestCase.java
incubator/agila/trunk/modules/bpm/src/test/org/apache/agila/impl/dao/DAOTestCaseSupport.java
incubator/agila/trunk/modules/bpm/src/test/org/apache/agila/util/XMLUtilTestCase.java
Added: incubator/agila/trunk/modules/bpm/src/test-resources/LeaveApplication.xml
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpm/src/test-resources/LeaveApplication.xml?rev=219028&view=auto
==============================================================================
--- incubator/agila/trunk/modules/bpm/src/test-resources/LeaveApplication.xml (added)
+++ incubator/agila/trunk/modules/bpm/src/test-resources/LeaveApplication.xml Thu Jul 14 03:21:06 2005
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License")
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+
+ -->
+
+
+<process-model name="Leave Application Workflow">
+ <variables>
+ <variable name="numdays" desc="Number of Days" type="Number" default_value="" required="true"/>
+ <variable name="reason" desc="Reason" type="String" default_value="" required="false"/>
+ </variables>
+
+ <graph>
+ <nodes>
+ <node id="1" type="start" class="org.apache.agila.model.node.StartNode" display_name="Start">
+ <actors/>
+ <bindings/>
+ </node>
+
+ <node id="3" type="activity" class="org.apache.agila.example.LeaveApplicationTask" display_name="Leave Application">
+ <!-- some example task properties to test out the XML marshalling -->
+ <property name="foo" value="hello"/>
+ <property name="bar">123</property>
+
+ <actors>
+ <actor name="Self"/>
+ </actors>
+ <bindings>
+ <binding name="numdays" type="el" datatype="Number" value="numdays" input="true" output="true"/>
+ <binding name="reason" type="el" datatype="String" value="reason" input="true" output="true"/>
+ </bindings>
+ </node>
+
+ <!-- TODO Should have two outgoing transitions for approve/deny -->
+ <node id="5" type="activity" class="org.apache.agila.example.LeaveApprovalTask" display_name="Leave Approval">
+ <actors>
+ <actor name="Self"/>
+ </actors>
+ <bindings>
+ <binding name="numdays" type="el" datatype="Number" value="numdays" input="true" output="false"/>
+ <binding name="reason" type="el" datatype="String" value="reason" input="true" output="false"/>
+ </bindings>
+ </node>
+
+ <node id="2" type="stop" class="org.apache.agila.model.node.StopNode" display_name="Stop">
+ <actors/>
+ <bindings/>
+ </node>
+ </nodes>
+ <connections>
+ <connection startid="1" endid="3" display_name="Apply for Leave"/>
+ <connection startid="3" endid="5" display_name="Send Application"/>
+ <connection startid="5" endid="2" display_name="End"/>
+ </connections>
+ <guiinfo>
+ <gui id="2">
+ <location x="540" y="60" w="31" h="40"/>
+ </gui>
+ <gui id="5">
+ <location x="450" y="258" w="100" h="100"/>
+ </gui>
+ <gui id="1">
+ <location x="180" y="70" w="31" h="40"/>
+ </gui>
+ <gui id="3">
+ <location x="193" y="255" w="100" h="100"/>
+ </gui>
+ </guiinfo>
+ </graph>
+</process-model>
Modified: incubator/agila/trunk/modules/bpm/src/test/org/apache/agila/LeaveApplicationTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpm/src/test/org/apache/agila/LeaveApplicationTestCase.java?rev=219028&r1=219027&r2=219028&view=diff
==============================================================================
--- incubator/agila/trunk/modules/bpm/src/test/org/apache/agila/LeaveApplicationTestCase.java (original)
+++ incubator/agila/trunk/modules/bpm/src/test/org/apache/agila/LeaveApplicationTestCase.java Thu Jul 14 03:21:06 2005
@@ -293,7 +293,7 @@
engine = new Engine( tokenService, instanceService, businessProcessService, queueService );
- Reader reader = new InputStreamReader( getClass().getClassLoader().getResourceAsStream( "org/apache/agila/LeaveApplication.xml" ) );
+ Reader reader = new InputStreamReader( getClass().getClassLoader().getResourceAsStream( "LeaveApplication.xml" ) );
engine.addBusinessProcess( reader );
}
Modified: incubator/agila/trunk/modules/bpm/src/test/org/apache/agila/impl/dao/DAOTestCaseSupport.java
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpm/src/test/org/apache/agila/impl/dao/DAOTestCaseSupport.java?rev=219028&r1=219027&r2=219028&view=diff
==============================================================================
--- incubator/agila/trunk/modules/bpm/src/test/org/apache/agila/impl/dao/DAOTestCaseSupport.java (original)
+++ incubator/agila/trunk/modules/bpm/src/test/org/apache/agila/impl/dao/DAOTestCaseSupport.java Thu Jul 14 03:21:06 2005
@@ -57,8 +57,7 @@
public void testAddGraph() {
BufferedReader reader = new BufferedReader( new InputStreamReader(
- getClass().getClassLoader().getResourceAsStream(
- "org/apache/agila/LeaveApplication.xml" ) ) );
+ getClass().getClassLoader().getResourceAsStream( "LeaveApplication.xml" ) ) );
BusinessProcess businessProcess = XMLUtil.deserializeXML( reader );
BusinessProcessID businessProcessID = dao.addGraph(
@@ -73,8 +72,7 @@
cleanUpBusinessProcess();
BufferedReader reader = new BufferedReader( new InputStreamReader(
- getClass().getClassLoader().getResourceAsStream(
- "org/apache/agila/LeaveApplication.xml" ) ) );
+ getClass().getClassLoader().getResourceAsStream( "LeaveApplication.xml" ) ) );
BusinessProcess businessProcess = XMLUtil.deserializeXML( reader );
BusinessProcessID businessProcessID = dao.addGraph(
@@ -86,8 +84,7 @@
public void testGetGraphByID() {
BufferedReader reader = new BufferedReader( new InputStreamReader(
- getClass().getClassLoader().getResourceAsStream(
- "org/apache/agila/LeaveApplication.xml" ) ) );
+ getClass().getClassLoader().getResourceAsStream( "LeaveApplication.xml" ) ) );
BusinessProcess businessProcess = XMLUtil.deserializeXML( reader );
BusinessProcessID businessProcessID = dao.addGraph(
@@ -105,8 +102,7 @@
// Populate the bpm_businessprocess table just in case it is empty
for( int i = 0; i < 10; i++ ) {
BufferedReader reader = new BufferedReader( new InputStreamReader(
- getClass().getClassLoader().getResourceAsStream(
- "org/apache/agila/LeaveApplication.xml" ) ) );
+ getClass().getClassLoader().getResourceAsStream( "LeaveApplication.xml" ) ) );
BusinessProcess businessProcess = XMLUtil.deserializeXML( reader );
BusinessProcessID businessProcessID = dao.addGraph(
@@ -119,8 +115,7 @@
public void testNewInstance() {
BufferedReader reader = new BufferedReader( new InputStreamReader(
- getClass().getClassLoader().getResourceAsStream(
- "org/apache/agila/LeaveApplication.xml" ) ) );
+ getClass().getClassLoader().getResourceAsStream( "LeaveApplication.xml" ) ) );
BusinessProcess businessProcess = XMLUtil.deserializeXML( reader );
BusinessProcessID businessProcessID = dao.addGraph(
@@ -141,8 +136,7 @@
public void testSaveInstance() {
BufferedReader reader = new BufferedReader( new InputStreamReader(
- getClass().getClassLoader().getResourceAsStream(
- "org/apache/agila/LeaveApplication.xml" ) ) );
+ getClass().getClassLoader().getResourceAsStream( "LeaveApplication.xml" ) ) );
BusinessProcess businessProcess = XMLUtil.deserializeXML( reader );
BusinessProcessID businessProcessID = dao.addGraph(
@@ -411,8 +405,7 @@
public void testInstanceStatusUpdate() {
BufferedReader reader = new BufferedReader( new InputStreamReader(
- getClass().getClassLoader().getResourceAsStream(
- "org/apache/agila/LeaveApplication.xml" ) ) );
+ getClass().getClassLoader().getResourceAsStream( "LeaveApplication.xml" ) ) );
BusinessProcess businessProcess = XMLUtil.deserializeXML( reader );
Modified: incubator/agila/trunk/modules/bpm/src/test/org/apache/agila/util/XMLUtilTestCase.java
URL: http://svn.apache.org/viewcvs/incubator/agila/trunk/modules/bpm/src/test/org/apache/agila/util/XMLUtilTestCase.java?rev=219028&r1=219027&r2=219028&view=diff
==============================================================================
--- incubator/agila/trunk/modules/bpm/src/test/org/apache/agila/util/XMLUtilTestCase.java (original)
+++ incubator/agila/trunk/modules/bpm/src/test/org/apache/agila/util/XMLUtilTestCase.java Thu Jul 14 03:21:06 2005
@@ -40,7 +40,7 @@
// NOTE: If additional features are added to the xml, this file should also be updated
// and more test cases should be added for those features
- private String workflowXML = "org/apache/agila/LeaveApplication.xml";
+ private String workflowXML = "LeaveApplication.xml";
private BusinessProcess businessProcess;