You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by va...@apache.org on 2013/08/30 00:17:22 UTC
[1/8] git commit: closing ODE-454,
kudos to Shammy Chen for the detailed report.
Updated Branches:
refs/heads/master 08ab8a5ec -> b09ea8ad7
closing ODE-454, kudos to Shammy Chen for the detailed report.
Conflicts:
bpel-compiler/src/test/java/org/apache/ode/bpel/compiler_2_0/GoodCompileTest.java
Project: http://git-wip-us.apache.org/repos/asf/ode/repo
Commit: http://git-wip-us.apache.org/repos/asf/ode/commit/b7a70252
Tree: http://git-wip-us.apache.org/repos/asf/ode/tree/b7a70252
Diff: http://git-wip-us.apache.org/repos/asf/ode/diff/b7a70252
Branch: refs/heads/master
Commit: b7a70252b5604221c5f2d0f8d3c3be563393ace2
Parents: 08ab8a5
Author: Tammo van Lessen <tv...@gmail.com>
Authored: Tue Aug 27 18:47:55 2013 +0200
Committer: Tammo van Lessen <tv...@gmail.com>
Committed: Thu Aug 29 23:43:25 2013 +0200
----------------------------------------------------------------------
.../ode/bpel/compiler/ForEachGenerator.java | 4 +-
.../bpel/compiler/bom/BpelObjectFactory.java | 4 ++
.../apache/ode/bpel/compiler/bom/Branches.java | 44 ++++++++++++++++++++
.../bpel/compiler/bom/CompletionCondition.java | 4 ++
.../ode/bpel/compiler_2_0/GoodCompileTest.java | 3 ++
.../2.0/good/foreach/ForEach3-2.0.bpel | 2 +-
6 files changed, 58 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ode/blob/b7a70252/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/ForEachGenerator.java
----------------------------------------------------------------------
diff --git a/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/ForEachGenerator.java b/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/ForEachGenerator.java
index d661940..d672899 100644
--- a/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/ForEachGenerator.java
+++ b/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/ForEachGenerator.java
@@ -58,8 +58,8 @@ public class ForEachGenerator extends DefaultActivityGenerator {
oforEach.completionCondition =
new OForEach.CompletionCondition(_context.getOProcess());
oforEach.completionCondition.successfulBranchesOnly
- = forEach.getCompletionCondition().isSuccessfulBranchesOnly();
- oforEach.completionCondition.branchCount = _context.compileExpr(forEach.getCompletionCondition());
+ = forEach.getCompletionCondition().getBranch().isSuccessfulBranchesOnly();
+ oforEach.completionCondition.branchCount = _context.compileExpr(forEach.getCompletionCondition().getBranch());
}
// ForEach 'adds' a counter variable in inner scope
http://git-wip-us.apache.org/repos/asf/ode/blob/b7a70252/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/BpelObjectFactory.java
----------------------------------------------------------------------
diff --git a/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/BpelObjectFactory.java b/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/BpelObjectFactory.java
index 7b81744..02cde22 100644
--- a/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/BpelObjectFactory.java
+++ b/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/BpelObjectFactory.java
@@ -79,6 +79,8 @@ public class BpelObjectFactory {
_mappings.put(Bpel20QNames.FINAL_PICK, PickActivity.class);
_mappings.put(Bpel20QNames.FINAL_SCOPE, ScopeActivity.class);
_mappings.put(Bpel20QNames.FINAL_FOREACH, ForEachActivity.class);
+ _mappings.put(Bpel20QNames.FINAL_COMPLETION_CONDITION, CompletionCondition.class);
+ _mappings.put(Bpel20QNames.FINAL_BRANCHES, Branches.class);
_mappings.put(Bpel20QNames.FINAL_COPY, Copy.class);
_mappings.put(Bpel20QNames.FINAL_CATCH, Catch.class);
_mappings.put(Bpel20QNames.FINAL_CATCHALL, Catch.class);
@@ -160,6 +162,8 @@ public class BpelObjectFactory {
_mappings.put(Bpel20QNames.FROM, From.class);
_mappings.put(Bpel20QNames.START_COUNTER_VALUE, Expression.class);
_mappings.put(Bpel20QNames.FINAL_COUNTER_VALUE, Expression.class);
+ _mappings.put(Bpel20QNames.COMPLETION_CONDITION, CompletionCondition.class);
+ _mappings.put(Bpel20QNames.BRANCHES, Branches.class);
_mappings.put(Bpel20QNames.CORRELATION, Correlation.class);
_mappings.put(Bpel20QNames.CORRELATIONSET, CorrelationSet.class);
_mappings.put(Bpel20QNames.COMPENSATE, CompensateScopeActivity.class);
http://git-wip-us.apache.org/repos/asf/ode/blob/b7a70252/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/Branches.java
----------------------------------------------------------------------
diff --git a/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/Branches.java b/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/Branches.java
new file mode 100644
index 0000000..7e175ad
--- /dev/null
+++ b/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/Branches.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+
+package org.apache.ode.bpel.compiler.bom;
+
+import org.w3c.dom.Element;
+
+/**
+ * Interface for a <code><branches></code> as used in a
+ * forEach activity.
+ */
+public class Branches extends Expression {
+
+ public Branches(Element el) {
+ super(el);
+ }
+
+ /**
+ * Gets whether the completion count should include all terminated children
+ * or only successfully completed ones.
+ *
+ * @return counts completed
+ */
+ public boolean isSuccessfulBranchesOnly() {
+ return getAttribute("successfulBranchesOnly", "no").equals("yes");
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/ode/blob/b7a70252/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/CompletionCondition.java
----------------------------------------------------------------------
diff --git a/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/CompletionCondition.java b/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/CompletionCondition.java
index 48b01ab..7ba96ea 100644
--- a/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/CompletionCondition.java
+++ b/bpel-compiler/src/main/java/org/apache/ode/bpel/compiler/bom/CompletionCondition.java
@@ -40,4 +40,8 @@ public class CompletionCondition extends Expression {
public boolean isSuccessfulBranchesOnly() {
return getAttribute("successfulBranchesOnly", "no").equals("yes");
}
+
+ public Branches getBranch() {
+ return (Branches) getFirstChild(Branches.class);
+ }
}
http://git-wip-us.apache.org/repos/asf/ode/blob/b7a70252/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler_2_0/GoodCompileTest.java
----------------------------------------------------------------------
diff --git a/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler_2_0/GoodCompileTest.java b/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler_2_0/GoodCompileTest.java
index 2e7f31f..8dd49b1 100644
--- a/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler_2_0/GoodCompileTest.java
+++ b/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler_2_0/GoodCompileTest.java
@@ -27,6 +27,9 @@ import org.apache.ode.bpel.compiler.api.CompileListener;
import org.junit.Assert;
import org.junit.Test;
+ suite.addTest(new GoodCompileTCase("/2.0/good/foreach/ForEach1-2.0.bpel"));
+ suite.addTest(new GoodCompileTCase("/2.0/good/foreach/ForEach2-2.0.bpel"));
+ suite.addTest(new GoodCompileTCase("/2.0/good/foreach/ForEach3-2.0.bpel"));
public class GoodCompileTest extends AbstractCompileTestCase implements CompileListener {
http://git-wip-us.apache.org/repos/asf/ode/blob/b7a70252/bpel-scripts/src/main/resources/2.0/good/foreach/ForEach3-2.0.bpel
----------------------------------------------------------------------
diff --git a/bpel-scripts/src/main/resources/2.0/good/foreach/ForEach3-2.0.bpel b/bpel-scripts/src/main/resources/2.0/good/foreach/ForEach3-2.0.bpel
index 2ff63d5..4f84b46 100644
--- a/bpel-scripts/src/main/resources/2.0/good/foreach/ForEach3-2.0.bpel
+++ b/bpel-scripts/src/main/resources/2.0/good/foreach/ForEach3-2.0.bpel
@@ -50,7 +50,7 @@
<startCounterValue>0</startCounterValue>
<finalCounterValue>10</finalCounterValue>
<completionCondition>
- <branches>5</branches>
+ <branches successfulBranchesOnly="yes">5</branches>
</completionCondition>
<scope name="sc1">
[8/8] git commit: adjusting a testcase to properly work with ODE-570
fixed.
Posted by va...@apache.org.
adjusting a testcase to properly work with ODE-570 fixed.
Project: http://git-wip-us.apache.org/repos/asf/ode/repo
Commit: http://git-wip-us.apache.org/repos/asf/ode/commit/b09ea8ad
Tree: http://git-wip-us.apache.org/repos/asf/ode/tree/b09ea8ad
Diff: http://git-wip-us.apache.org/repos/asf/ode/diff/b09ea8ad
Branch: refs/heads/master
Commit: b09ea8ad789648949275165f92df1ced5682feb2
Parents: da1d6f9
Author: Tammo van Lessen <tv...@gmail.com>
Authored: Fri Aug 30 00:16:41 2013 +0200
Committer: Tammo van Lessen <tv...@gmail.com>
Committed: Fri Aug 30 00:16:41 2013 +0200
----------------------------------------------------------------------
.../bpel/2.0/TestIsolatedScopes1/test.properties | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ode/blob/b09ea8ad/bpel-test/src/test/resources/bpel/2.0/TestIsolatedScopes1/test.properties
----------------------------------------------------------------------
diff --git a/bpel-test/src/test/resources/bpel/2.0/TestIsolatedScopes1/test.properties b/bpel-test/src/test/resources/bpel/2.0/TestIsolatedScopes1/test.properties
index 20b0079..edc54c5 100644
--- a/bpel-test/src/test/resources/bpel/2.0/TestIsolatedScopes1/test.properties
+++ b/bpel-test/src/test/resources/bpel/2.0/TestIsolatedScopes1/test.properties
@@ -19,14 +19,14 @@ namespace=http://ode/bpel/unit-test/testFlowActivity2.wsdl
service=TestFlowActivityService
operation=request
request1=<message><requestMessageData><requestID>Start Test1.1</requestID><requestText>Event Start Test1.1</requestText><flowIndicators><indicatorOne>yes</indicatorOne><indicatorTwo>yes</indicatorTwo></flowIndicators><loopIndicator>min</loopIndicator></requestMessageData></message>
-response1=.*processes A and B merge on process C -> merge into root process -> test switch statement -> case min: set loop iterations = 5 -> test loop iterations -> 2\.0 -> 3\.0 -> 4\.0 -> 5\.0 -> 6\.0 -> test1Process complete.*
+response1=.*processes A and B merge on process C -> merge into root process -> test switch statement -> case min: set loop iterations = 5 -> test loop iterations -> 2 -> 3 -> 4 -> 5 -> 6 -> test1Process complete.*
request2=<message><requestMessageData><requestID>Start Test1.2</requestID><requestText>Event Start Test1.2</requestText><flowIndicators><indicatorOne>yes</indicatorOne><indicatorTwo>no</indicatorTwo></flowIndicators><loopIndicator>min</loopIndicator></requestMessageData></message>
-response2=.*merge into root process -> test switch statement -> case min: set loop iterations = 5 -> test loop iterations -> 2\.0 -> 3\.0 -> 4\.0 -> 5\.0 -> 6\.0 -> test1Process complete.*
+response2=.*merge into root process -> test switch statement -> case min: set loop iterations = 5 -> test loop iterations -> 2 -> 3 -> 4 -> 5 -> 6 -> test1Process complete.*
request3=<message><requestMessageData><requestID>Start Test1.3</requestID><requestText>Event Start Test1.3</requestText><flowIndicators><indicatorOne>no</indicatorOne><indicatorTwo>yes</indicatorTwo></flowIndicators><loopIndicator>min</loopIndicator></requestMessageData></message>
-response3=.*merge into root process -> test switch statement -> case min: set loop iterations = 5 -> test loop iterations -> 2\.0 -> 3\.0 -> 4\.0 -> 5\.0 -> 6\.0 -> test1Process complete.*
+response3=.*merge into root process -> test switch statement -> case min: set loop iterations = 5 -> test loop iterations -> 2 -> 3 -> 4 -> 5 -> 6 -> test1Process complete.*
request4=<message><requestMessageData><requestID>Start Test1.4</requestID><requestText>Event Start Test1.4</requestText><flowIndicators><indicatorOne>no</indicatorOne><indicatorTwo>no</indicatorTwo></flowIndicators><loopIndicator>min</loopIndicator></requestMessageData></message>
-response4=.*merge into root process -> test switch statement -> case min: set loop iterations = 5 -> test loop iterations -> 2\.0 -> 3\.0 -> 4\.0 -> 5\.0 -> 6\.0 -> test1Process complete.*
+response4=.*merge into root process -> test switch statement -> case min: set loop iterations = 5 -> test loop iterations -> 2 -> 3 -> 4 -> 5 -> 6 -> test1Process complete.*
request5=<message><requestMessageData><requestID>Start Test1.5</requestID><requestText>Event Start Test1.5</requestText><flowIndicators><indicatorOne>yes</indicatorOne><indicatorTwo>yes</indicatorTwo></flowIndicators><loopIndicator>max</loopIndicator></requestMessageData></message>
-response5=.*processes A and B merge on process C -> merge into root process -> test switch statement -> case max: set loop iterations = 10 -> test loop iterations -> 2\.0 -> 3\.0 -> 4\.0 -> 5\.0 -> 6\.0 -> 7\.0 -> 8\.0 -> 9\.0 -> 10\.0 -> 11\.0 -> test1Process complete.*
+response5=.*processes A and B merge on process C -> merge into root process -> test switch statement -> case max: set loop iterations = 10 -> test loop iterations -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8 -> 9 -> 10 -> 11 -> test1Process complete.*
request6=<message><requestMessageData><requestID>Start Test1.6</requestID><requestText>Event Start Test1.6</requestText><flowIndicators><indicatorOne>yes</indicatorOne><indicatorTwo>yes</indicatorTwo></flowIndicators><loopIndicator>default</loopIndicator></requestMessageData></message>
response6=.*processes A and B merge on process C -> merge into root process -> test switch statement -> otherwise: set loop iterations = 0 -> test loop iterations -> test1Process complete.*
[4/8] git commit: build fix, ODE-1000
Posted by va...@apache.org.
build fix, ODE-1000
Project: http://git-wip-us.apache.org/repos/asf/ode/repo
Commit: http://git-wip-us.apache.org/repos/asf/ode/commit/fa12c4a5
Tree: http://git-wip-us.apache.org/repos/asf/ode/tree/fa12c4a5
Diff: http://git-wip-us.apache.org/repos/asf/ode/diff/fa12c4a5
Branch: refs/heads/master
Commit: fa12c4a58734f55284f53e7c2b276a22be51ab32
Parents: 9b075ad
Author: Tammo van Lessen <tv...@gmail.com>
Authored: Wed Aug 28 09:25:06 2013 +0200
Committer: Tammo van Lessen <tv...@gmail.com>
Committed: Thu Aug 29 23:50:24 2013 +0200
----------------------------------------------------------------------
Rakefile | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ode/blob/fa12c4a5/Rakefile
----------------------------------------------------------------------
diff --git a/Rakefile b/Rakefile
index 10eb055..f96d1a0 100644
--- a/Rakefile
+++ b/Rakefile
@@ -198,6 +198,7 @@ define "ode" do
compile.with projects("utils", "bpel-dao", "bpel-api"),
AXIOM, COMMONS.lang, COMMONS.beanutils, DERBY, JAVAX.connector, JAVAX.stream, JAVAX.transaction,
GERONIMO.transaction, GERONIMO.connector, TRANQL, XMLBEANS, SLF4J, LOG4J
+ test.with XERCES
package :jar
end
[6/8] git commit: ODE-1002: orEach: When counters are negative or too
large an InvalidExpressionValue fault must be thrown
Posted by va...@apache.org.
ODE-1002: orEach: When counters are negative or too large an InvalidExpressionValue fault must be thrown
Project: http://git-wip-us.apache.org/repos/asf/ode/repo
Commit: http://git-wip-us.apache.org/repos/asf/ode/commit/f901c37e
Tree: http://git-wip-us.apache.org/repos/asf/ode/tree/f901c37e
Diff: http://git-wip-us.apache.org/repos/asf/ode/diff/f901c37e
Branch: refs/heads/master
Commit: f901c37ecdce2a5578e29cc9413e1e65bc5539e3
Parents: 6ac86ca
Author: Tammo van Lessen <tv...@gmail.com>
Authored: Thu Aug 29 00:58:39 2013 +0200
Committer: Tammo van Lessen <tv...@gmail.com>
Committed: Thu Aug 29 23:52:30 2013 +0200
----------------------------------------------------------------------
.../org/apache/ode/bpel/runtime/FOREACH.java | 26 +++++++++++++++++---
1 file changed, 22 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ode/blob/f901c37e/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/FOREACH.java
----------------------------------------------------------------------
diff --git a/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/FOREACH.java b/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/FOREACH.java
index 2d99054..2627a1c 100644
--- a/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/FOREACH.java
+++ b/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/FOREACH.java
@@ -183,13 +183,31 @@ public class FOREACH extends ACTIVITY {
private int evaluateCondition(OExpression condition)
throws FaultException {
try {
- return getBpelRuntimeContext().getExpLangRuntime().
+ int cond = getBpelRuntimeContext().getExpLangRuntime().
evaluateAsNumber(condition, getEvaluationContext()).intValue();
+
+ if (cond < 0) {
+ String msg = "ForEach counter was negative.";
+ __log.error(msg);
+ throw new FaultException(_oforEach.getOwner().constants.qnInvalidExpressionValue,msg);
+ }
+
+ if (cond > Integer.MAX_VALUE) {
+ // FIXME: this is not entirely correct. ODE uses an signed integer but the
+ // value range for the counters are xs:unsignedInt, which do not fit in
+ // an integer. To keep byte code compatibility, we can't easily change the type
+ // of the fields. But we can probably live with the limitation to only
+ // support Integer.MAX_VALUE as a maximum instead of Integer.MAX_VALUE * 2 - 1.
+ String msg = "ForEach counter was too large.";
+ __log.error(msg);
+ throw new FaultException(_oforEach.getOwner().constants.qnInvalidExpressionValue,msg);
+ }
+
+ return cond;
} catch (EvaluationException e) {
- String msg;
- msg = "ForEach counter value couldn't be evaluated as xs:unsignedInt.";
+ String msg = "ForEach counter value couldn't be evaluated as xs:unsignedInt.";
__log.error(msg, e);
- throw new FaultException(_oforEach.getOwner().constants.qnForEachCounterError,msg);
+ throw new FaultException(_oforEach.getOwner().constants.qnInvalidExpressionValue,msg);
}
}
[5/8] git commit: fixing a test case, refs ODE-570
Posted by va...@apache.org.
fixing a test case, refs ODE-570
Project: http://git-wip-us.apache.org/repos/asf/ode/repo
Commit: http://git-wip-us.apache.org/repos/asf/ode/commit/6ac86caf
Tree: http://git-wip-us.apache.org/repos/asf/ode/tree/6ac86caf
Diff: http://git-wip-us.apache.org/repos/asf/ode/diff/6ac86caf
Branch: refs/heads/master
Commit: 6ac86caf6a6fea541ebcee6d059f90b175f0a2d0
Parents: fa12c4a
Author: Tammo van Lessen <tv...@gmail.com>
Authored: Wed Aug 28 12:09:09 2013 +0200
Committer: Tammo van Lessen <tv...@gmail.com>
Committed: Thu Aug 29 23:50:57 2013 +0200
----------------------------------------------------------------------
.../resources/bpel/2.0/TestFlowActivity2/test.properties | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ode/blob/6ac86caf/bpel-test/src/test/resources/bpel/2.0/TestFlowActivity2/test.properties
----------------------------------------------------------------------
diff --git a/bpel-test/src/test/resources/bpel/2.0/TestFlowActivity2/test.properties b/bpel-test/src/test/resources/bpel/2.0/TestFlowActivity2/test.properties
index 20b0079..edc54c5 100644
--- a/bpel-test/src/test/resources/bpel/2.0/TestFlowActivity2/test.properties
+++ b/bpel-test/src/test/resources/bpel/2.0/TestFlowActivity2/test.properties
@@ -19,14 +19,14 @@ namespace=http://ode/bpel/unit-test/testFlowActivity2.wsdl
service=TestFlowActivityService
operation=request
request1=<message><requestMessageData><requestID>Start Test1.1</requestID><requestText>Event Start Test1.1</requestText><flowIndicators><indicatorOne>yes</indicatorOne><indicatorTwo>yes</indicatorTwo></flowIndicators><loopIndicator>min</loopIndicator></requestMessageData></message>
-response1=.*processes A and B merge on process C -> merge into root process -> test switch statement -> case min: set loop iterations = 5 -> test loop iterations -> 2\.0 -> 3\.0 -> 4\.0 -> 5\.0 -> 6\.0 -> test1Process complete.*
+response1=.*processes A and B merge on process C -> merge into root process -> test switch statement -> case min: set loop iterations = 5 -> test loop iterations -> 2 -> 3 -> 4 -> 5 -> 6 -> test1Process complete.*
request2=<message><requestMessageData><requestID>Start Test1.2</requestID><requestText>Event Start Test1.2</requestText><flowIndicators><indicatorOne>yes</indicatorOne><indicatorTwo>no</indicatorTwo></flowIndicators><loopIndicator>min</loopIndicator></requestMessageData></message>
-response2=.*merge into root process -> test switch statement -> case min: set loop iterations = 5 -> test loop iterations -> 2\.0 -> 3\.0 -> 4\.0 -> 5\.0 -> 6\.0 -> test1Process complete.*
+response2=.*merge into root process -> test switch statement -> case min: set loop iterations = 5 -> test loop iterations -> 2 -> 3 -> 4 -> 5 -> 6 -> test1Process complete.*
request3=<message><requestMessageData><requestID>Start Test1.3</requestID><requestText>Event Start Test1.3</requestText><flowIndicators><indicatorOne>no</indicatorOne><indicatorTwo>yes</indicatorTwo></flowIndicators><loopIndicator>min</loopIndicator></requestMessageData></message>
-response3=.*merge into root process -> test switch statement -> case min: set loop iterations = 5 -> test loop iterations -> 2\.0 -> 3\.0 -> 4\.0 -> 5\.0 -> 6\.0 -> test1Process complete.*
+response3=.*merge into root process -> test switch statement -> case min: set loop iterations = 5 -> test loop iterations -> 2 -> 3 -> 4 -> 5 -> 6 -> test1Process complete.*
request4=<message><requestMessageData><requestID>Start Test1.4</requestID><requestText>Event Start Test1.4</requestText><flowIndicators><indicatorOne>no</indicatorOne><indicatorTwo>no</indicatorTwo></flowIndicators><loopIndicator>min</loopIndicator></requestMessageData></message>
-response4=.*merge into root process -> test switch statement -> case min: set loop iterations = 5 -> test loop iterations -> 2\.0 -> 3\.0 -> 4\.0 -> 5\.0 -> 6\.0 -> test1Process complete.*
+response4=.*merge into root process -> test switch statement -> case min: set loop iterations = 5 -> test loop iterations -> 2 -> 3 -> 4 -> 5 -> 6 -> test1Process complete.*
request5=<message><requestMessageData><requestID>Start Test1.5</requestID><requestText>Event Start Test1.5</requestText><flowIndicators><indicatorOne>yes</indicatorOne><indicatorTwo>yes</indicatorTwo></flowIndicators><loopIndicator>max</loopIndicator></requestMessageData></message>
-response5=.*processes A and B merge on process C -> merge into root process -> test switch statement -> case max: set loop iterations = 10 -> test loop iterations -> 2\.0 -> 3\.0 -> 4\.0 -> 5\.0 -> 6\.0 -> 7\.0 -> 8\.0 -> 9\.0 -> 10\.0 -> 11\.0 -> test1Process complete.*
+response5=.*processes A and B merge on process C -> merge into root process -> test switch statement -> case max: set loop iterations = 10 -> test loop iterations -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8 -> 9 -> 10 -> 11 -> test1Process complete.*
request6=<message><requestMessageData><requestID>Start Test1.6</requestID><requestText>Event Start Test1.6</requestText><flowIndicators><indicatorOne>yes</indicatorOne><indicatorTwo>yes</indicatorTwo></flowIndicators><loopIndicator>default</loopIndicator></requestMessageData></message>
response6=.*processes A and B merge on process C -> merge into root process -> test switch statement -> otherwise: set loop iterations = 0 -> test loop iterations -> test1Process complete.*
[7/8] git commit: merge fix.
Posted by va...@apache.org.
merge fix.
Project: http://git-wip-us.apache.org/repos/asf/ode/repo
Commit: http://git-wip-us.apache.org/repos/asf/ode/commit/da1d6f9e
Tree: http://git-wip-us.apache.org/repos/asf/ode/tree/da1d6f9e
Diff: http://git-wip-us.apache.org/repos/asf/ode/diff/da1d6f9e
Branch: refs/heads/master
Commit: da1d6f9ede4a0ce263f62f7e935c478cb87d0d40
Parents: f901c37
Author: Tammo van Lessen <tv...@gmail.com>
Authored: Fri Aug 30 00:15:58 2013 +0200
Committer: Tammo van Lessen <tv...@gmail.com>
Committed: Fri Aug 30 00:15:58 2013 +0200
----------------------------------------------------------------------
.../ode/bpel/compiler_2_0/GoodCompileTest.java | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ode/blob/da1d6f9e/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler_2_0/GoodCompileTest.java
----------------------------------------------------------------------
diff --git a/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler_2_0/GoodCompileTest.java b/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler_2_0/GoodCompileTest.java
index 8dd49b1..1327105 100644
--- a/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler_2_0/GoodCompileTest.java
+++ b/bpel-compiler/src/test/java/org/apache/ode/bpel/compiler_2_0/GoodCompileTest.java
@@ -27,10 +27,6 @@ import org.apache.ode.bpel.compiler.api.CompileListener;
import org.junit.Assert;
import org.junit.Test;
- suite.addTest(new GoodCompileTCase("/2.0/good/foreach/ForEach1-2.0.bpel"));
- suite.addTest(new GoodCompileTCase("/2.0/good/foreach/ForEach2-2.0.bpel"));
- suite.addTest(new GoodCompileTCase("/2.0/good/foreach/ForEach3-2.0.bpel"));
-
public class GoodCompileTest extends AbstractCompileTestCase implements CompileListener {
public void runTest(String bpel) throws Exception {
@@ -133,6 +129,21 @@ public class GoodCompileTest extends AbstractCompileTestCase implements CompileL
}
@Test
+ public void testForEach1() throws Exception {
+ runTest("/2.0/good/foreach/ForEach1-2.0.bpel");
+ }
+
+ @Test
+ public void testForEach2() throws Exception {
+ runTest("/2.0/good/foreach/ForEach2-2.0.bpel");
+ }
+
+ @Test
+ public void testForEach3() throws Exception {
+ runTest("/2.0/good/foreach/ForEach3-2.0.bpel");
+ }
+
+ @Test
public void testIf1() throws Exception {
runTest("/2.0/good/if/If1-2.0.bpel");
}
[3/8] git commit: fixing a filename case typo. refs ODE-454.
Posted by va...@apache.org.
fixing a filename case typo. refs ODE-454.
Project: http://git-wip-us.apache.org/repos/asf/ode/repo
Commit: http://git-wip-us.apache.org/repos/asf/ode/commit/9b075ad1
Tree: http://git-wip-us.apache.org/repos/asf/ode/tree/9b075ad1
Diff: http://git-wip-us.apache.org/repos/asf/ode/diff/9b075ad1
Branch: refs/heads/master
Commit: 9b075ad1357d8d61fce99164cdac8bfa17c1a33f
Parents: 609bfcf
Author: Tammo van Lessen <tv...@gmail.com>
Authored: Wed Aug 28 00:36:07 2013 +0200
Committer: Tammo van Lessen <tv...@gmail.com>
Committed: Thu Aug 29 23:49:11 2013 +0200
----------------------------------------------------------------------
.../org/apache/ode/bpel/epr/WSAEndpoint.java | 2 +-
.../org/apache/ode/bpel/epr/WSDL11Endpoint.java | 2 +-
.../apache/ode/bpel/epr/WSDL11EndpointTest.java | 71 --------------------
.../apache/ode/bpel/epr/WSDL11EndpointTest.java | 71 ++++++++++++++++++++
4 files changed, 73 insertions(+), 73 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ode/blob/9b075ad1/bpel-epr/src/main/java/org/apache/ode/bpel/epr/WSAEndpoint.java
----------------------------------------------------------------------
diff --git a/bpel-epr/src/main/java/org/apache/ode/bpel/epr/WSAEndpoint.java b/bpel-epr/src/main/java/org/apache/ode/bpel/epr/WSAEndpoint.java
index 81ba125..7d8d6da 100644
--- a/bpel-epr/src/main/java/org/apache/ode/bpel/epr/WSAEndpoint.java
+++ b/bpel-epr/src/main/java/org/apache/ode/bpel/epr/WSAEndpoint.java
@@ -165,7 +165,7 @@ public class WSAEndpoint implements MutableEndpoint {
Element serviceRef = doc.createElementNS(SERVICE_REF_QNAME.getNamespaceURI(), SERVICE_REF_QNAME.getLocalPart());
doc.appendChild(serviceRef);
serviceRef.appendChild(doc.importNode(_eprElmt, true));
- return _eprElmt.getOwnerDocument();
+ return doc;
}
public Map toMap() {
http://git-wip-us.apache.org/repos/asf/ode/blob/9b075ad1/bpel-epr/src/main/java/org/apache/ode/bpel/epr/WSDL11Endpoint.java
----------------------------------------------------------------------
diff --git a/bpel-epr/src/main/java/org/apache/ode/bpel/epr/WSDL11Endpoint.java b/bpel-epr/src/main/java/org/apache/ode/bpel/epr/WSDL11Endpoint.java
index 4f38e9f..d978bb0 100644
--- a/bpel-epr/src/main/java/org/apache/ode/bpel/epr/WSDL11Endpoint.java
+++ b/bpel-epr/src/main/java/org/apache/ode/bpel/epr/WSDL11Endpoint.java
@@ -110,7 +110,7 @@ public class WSDL11Endpoint implements MutableEndpoint {
Element serviceRef = doc.createElementNS(Namespaces.WSBPEL2_0_FINAL_SERVREF, "service-ref");
doc.appendChild(serviceRef);
serviceRef.appendChild(doc.importNode(_serviceElmt, true));
- return _serviceElmt.getOwnerDocument();
+ return doc;
}
public Map toMap() {
http://git-wip-us.apache.org/repos/asf/ode/blob/9b075ad1/bpel-epr/src/main/test/org/apache/ode/bpel/epr/WSDL11EndpointTest.java
----------------------------------------------------------------------
diff --git a/bpel-epr/src/main/test/org/apache/ode/bpel/epr/WSDL11EndpointTest.java b/bpel-epr/src/main/test/org/apache/ode/bpel/epr/WSDL11EndpointTest.java
deleted file mode 100644
index 5550905..0000000
--- a/bpel-epr/src/main/test/org/apache/ode/bpel/epr/WSDL11EndpointTest.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you 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.
- */
-
-package org.apache.ode.bpel.epr;
-
-import junit.framework.TestCase;
-
-import org.apache.ode.utils.DOMUtils;
-import org.apache.ode.utils.Namespaces;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-/**
- * A test for the WSDL11Endpoint class, to define how it works.
- *
- *
- * @author <a href="mailto:atoulme@intalio.com">Antoine Toulme</a>
- */
-public class WSDL11EndpointTest extends TestCase {
-
- public void testAcceptServiceElement() {
- WSDL11Endpoint endpoint = new WSDL11Endpoint();
- Document doc = DOMUtils.newDocument();
- Node node = doc.createElementNS(Namespaces.WSDL_11, "service");
- node.appendChild(doc.createTextNode("http://example.com/hello"));
- assertTrue(endpoint.accept(node));
- }
-
-
- public void testAcceptServiceRefElement() {
- WSDL11Endpoint endpoint = new WSDL11Endpoint();
- Document doc = DOMUtils.newDocument();
- Node node = doc.createElementNS(Namespaces.WS_BPEL_20_NS, "service-ref");
- Node child = doc.createElementNS(Namespaces.WSDL_11, "service");
- node.appendChild(child);
- child.appendChild(doc.createTextNode("http://example.com/hello"));
- assertTrue(endpoint.accept(node));
- }
-
-
- public void testAcceptServiceWithRandomElement() {
- WSDL11Endpoint endpoint = new WSDL11Endpoint();
- Document doc = DOMUtils.newDocument();
- Node child = doc.createElementNS("http://example.com/someNM", "helloHeloo");
- child.appendChild(doc.createTextNode("http://example.com/hello"));
- assertFalse("The endpoint should accept a random element", endpoint.accept(child));
- }
-
- public void testAcceptServiceWithTextNode() {
- WSDL11Endpoint endpoint = new WSDL11Endpoint();
- Document doc = DOMUtils.newDocument();
- assertFalse("The endpoint should accept a text node",
- endpoint.accept(doc.createTextNode("http://example.com/hello")));
- }
-}
http://git-wip-us.apache.org/repos/asf/ode/blob/9b075ad1/bpel-epr/src/test/java/org/apache/ode/bpel/epr/WSDL11EndpointTest.java
----------------------------------------------------------------------
diff --git a/bpel-epr/src/test/java/org/apache/ode/bpel/epr/WSDL11EndpointTest.java b/bpel-epr/src/test/java/org/apache/ode/bpel/epr/WSDL11EndpointTest.java
new file mode 100644
index 0000000..5550905
--- /dev/null
+++ b/bpel-epr/src/test/java/org/apache/ode/bpel/epr/WSDL11EndpointTest.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+
+package org.apache.ode.bpel.epr;
+
+import junit.framework.TestCase;
+
+import org.apache.ode.utils.DOMUtils;
+import org.apache.ode.utils.Namespaces;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+
+/**
+ * A test for the WSDL11Endpoint class, to define how it works.
+ *
+ *
+ * @author <a href="mailto:atoulme@intalio.com">Antoine Toulme</a>
+ */
+public class WSDL11EndpointTest extends TestCase {
+
+ public void testAcceptServiceElement() {
+ WSDL11Endpoint endpoint = new WSDL11Endpoint();
+ Document doc = DOMUtils.newDocument();
+ Node node = doc.createElementNS(Namespaces.WSDL_11, "service");
+ node.appendChild(doc.createTextNode("http://example.com/hello"));
+ assertTrue(endpoint.accept(node));
+ }
+
+
+ public void testAcceptServiceRefElement() {
+ WSDL11Endpoint endpoint = new WSDL11Endpoint();
+ Document doc = DOMUtils.newDocument();
+ Node node = doc.createElementNS(Namespaces.WS_BPEL_20_NS, "service-ref");
+ Node child = doc.createElementNS(Namespaces.WSDL_11, "service");
+ node.appendChild(child);
+ child.appendChild(doc.createTextNode("http://example.com/hello"));
+ assertTrue(endpoint.accept(node));
+ }
+
+
+ public void testAcceptServiceWithRandomElement() {
+ WSDL11Endpoint endpoint = new WSDL11Endpoint();
+ Document doc = DOMUtils.newDocument();
+ Node child = doc.createElementNS("http://example.com/someNM", "helloHeloo");
+ child.appendChild(doc.createTextNode("http://example.com/hello"));
+ assertFalse("The endpoint should accept a random element", endpoint.accept(child));
+ }
+
+ public void testAcceptServiceWithTextNode() {
+ WSDL11Endpoint endpoint = new WSDL11Endpoint();
+ Document doc = DOMUtils.newDocument();
+ assertFalse("The endpoint should accept a text node",
+ endpoint.accept(doc.createTextNode("http://example.com/hello")));
+ }
+}
[2/8] git commit: fixes ODE-570: Integer to string conversion does
not work as expected.
Posted by va...@apache.org.
fixes ODE-570: Integer to string conversion does not work as expected.
Project: http://git-wip-us.apache.org/repos/asf/ode/repo
Commit: http://git-wip-us.apache.org/repos/asf/ode/commit/609bfcf9
Tree: http://git-wip-us.apache.org/repos/asf/ode/tree/609bfcf9
Diff: http://git-wip-us.apache.org/repos/asf/ode/diff/609bfcf9
Branch: refs/heads/master
Commit: 609bfcf9b4919def46de3d350faefe921465d7ec
Parents: b7a7025
Author: Tammo van Lessen <tv...@gmail.com>
Authored: Tue Aug 27 22:44:36 2013 +0200
Committer: Tammo van Lessen <tv...@gmail.com>
Committed: Thu Aug 29 23:44:43 2013 +0200
----------------------------------------------------------------------
.../elang/xpath10/runtime/XPath10ExpressionRuntime.java | 12 +++++++++++-
dependencies.rb | 2 +-
2 files changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ode/blob/609bfcf9/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath10/runtime/XPath10ExpressionRuntime.java
----------------------------------------------------------------------
diff --git a/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath10/runtime/XPath10ExpressionRuntime.java b/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath10/runtime/XPath10ExpressionRuntime.java
index 49e327c..d8986f1 100644
--- a/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath10/runtime/XPath10ExpressionRuntime.java
+++ b/bpel-runtime/src/main/java/org/apache/ode/bpel/elang/xpath10/runtime/XPath10ExpressionRuntime.java
@@ -107,7 +107,17 @@ public class XPath10ExpressionRuntime implements ExpressionLanguageRuntime {
// Giving our node a parent just in case it's an LValue
// expression
Element wrapper = d.createElement("wrapper");
- Text text = d.createTextNode(retVal.get(0).toString());
+ Object ret = retVal.get(0);
+
+ if (ret instanceof Double) {
+ // safely convert a double into a long if they are numerically equal. This
+ // makes 1 from 1.0, which is more reliable when calling web services.
+ if (Double.compare((Double)ret, Math.ceil((Double)ret)) == 0) {
+ // the double is actually an int/long
+ ret = ((Double)ret).longValue();
+ }
+ }
+ Text text = d.createTextNode(ret.toString());
wrapper.appendChild(text);
d.appendChild(wrapper);
retVal = Collections.singletonList(text);
http://git-wip-us.apache.org/repos/asf/ode/blob/609bfcf9/dependencies.rb
----------------------------------------------------------------------
diff --git a/dependencies.rb b/dependencies.rb
index 5709e31..baa7cf3 100644
--- a/dependencies.rb
+++ b/dependencies.rb
@@ -88,7 +88,7 @@ JAVAX = struct(
:transaction =>"org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar:1.1",
:resource =>"org.apache.geronimo.specs:geronimo-j2ee-connector_1.5_spec:jar:1.0"
)
-JAXEN = "jaxen:jaxen:jar:1.1.3"
+JAXEN = "jaxen:jaxen:jar:1.1.4"
JBI = group("org.apache.servicemix.specs.jbi-api-1.0", :under=>"org.apache.servicemix.specs", :version=>"1.1.0")
JENCKS = "org.jencks:jencks:jar:all:1.3"
JIBX = "org.jibx:jibx-run:jar:1.2.1"