You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by mr...@apache.org on 2008/10/14 20:48:55 UTC

svn commit: r704610 - in /ode/sandbox/simpel/src: main/java/org/apache/ode/simpel/expr/E4XExprRuntime.java test/java/org/apache/ode/simpel/SimPELRuntimeTest.java test/resources/auction.simpel

Author: mriou
Date: Tue Oct 14 11:48:54 2008
New Revision: 704610

URL: http://svn.apache.org/viewvc?rev=704610&view=rev
Log:
Correlation property as readable variables.'

Modified:
    ode/sandbox/simpel/src/main/java/org/apache/ode/simpel/expr/E4XExprRuntime.java
    ode/sandbox/simpel/src/test/java/org/apache/ode/simpel/SimPELRuntimeTest.java
    ode/sandbox/simpel/src/test/resources/auction.simpel

Modified: ode/sandbox/simpel/src/main/java/org/apache/ode/simpel/expr/E4XExprRuntime.java
URL: http://svn.apache.org/viewvc/ode/sandbox/simpel/src/main/java/org/apache/ode/simpel/expr/E4XExprRuntime.java?rev=704610&r1=704609&r2=704610&view=diff
==============================================================================
--- ode/sandbox/simpel/src/main/java/org/apache/ode/simpel/expr/E4XExprRuntime.java (original)
+++ ode/sandbox/simpel/src/main/java/org/apache/ode/simpel/expr/E4XExprRuntime.java Tue Oct 14 11:48:54 2008
@@ -148,12 +148,8 @@
                 OScope.Variable v = _expr.getReferencedVariable(name);
                 if (v == null) return super.get(name, start);
 
-                // Handling of variables pointing to property values
-                if (v.type instanceof OPropertyVarType) {
-                    System.out.println("Property value access.");
-                }
-
                 if (_env.get(name) != null) return _env.get(name);
+
                 // TODO this assumes message type with a single part for all variables, valid?
                 Node node;
                 try {

Modified: ode/sandbox/simpel/src/test/java/org/apache/ode/simpel/SimPELRuntimeTest.java
URL: http://svn.apache.org/viewvc/ode/sandbox/simpel/src/test/java/org/apache/ode/simpel/SimPELRuntimeTest.java?rev=704610&r1=704609&r2=704610&view=diff
==============================================================================
--- ode/sandbox/simpel/src/test/java/org/apache/ode/simpel/SimPELRuntimeTest.java (original)
+++ ode/sandbox/simpel/src/test/java/org/apache/ode/simpel/SimPELRuntimeTest.java Tue Oct 14 11:48:54 2008
@@ -218,7 +218,7 @@
             "       text = msgIn.text; \n" +
             "   }\n" +
             "   receive(myPl, secondOp, {getExchangeId: cid}) { |secMsgIn| \n" +
-            "       text = text + secMsgIn.text; \n" +
+            "       text = text + secMsgIn.text + cid; \n" +
             "       reply(text); \n" +
             "   }\n" +
             "}";

Modified: ode/sandbox/simpel/src/test/resources/auction.simpel
URL: http://svn.apache.org/viewvc/ode/sandbox/simpel/src/test/resources/auction.simpel?rev=704610&r1=704609&r2=704610&view=diff
==============================================================================
--- ode/sandbox/simpel/src/test/resources/auction.simpel (original)
+++ ode/sandbox/simpel/src/test/resources/auction.simpel Tue Oct 14 11:48:54 2008
@@ -3,19 +3,19 @@
 
 // Correlation functions
 function auctionIdFromAnswer(answer) {
-  answer.auctionId;
+  return answer.auctionId;
 }
 function auctionIdFromBuyer(buyer) {
-  buyer.ID;
+  return buyer.ID;
 }
 function auctionIdFromSeller(seller) {
-  seller.auctionId;
+  return seller.auctionId;
 }
 
 // Auction as defined in chapter 15.4 of the BPEL 2.0 specification
 process Auction {
   partnerLink buyerOrSeller, auctionRegistrar, seller;
-  var auctionId unique, buyerData, sellerData;
+  var auctionId unique;
 
   // The original BPEL spec example for the auctions process uses a join pattern which
   // we chose to not support in SimPEL. This is equivalent.
@@ -38,7 +38,7 @@
                          <addr:ServiceName>as:RegistrationService</addr:ServiceName>
                        </addr:EndpointReference>
                      </sref:service-ref>;
-  auctionData.auctionHouseEPR = auctionRegistrar.myRole;
+  auctionData.auctionHouseEPR = auctionRegistrar;
   auctionData.auctionId = sellerData.auctionId;
   auctionData.amount = 1;