ode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mszef...@apache.org
Subject svn commit: r587521 - in /ode/branches/APACHE_ODE_1.1: bpel-api/src/main/java/org/apache/ode/bpel/evt/ bpel-runtime/src/main/java/org/apache/ode/bpel/engine/ bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/
Date Tue, 23 Oct 2007 14:37:48 GMT
Author: mszefler
Date: Tue Oct 23 07:37:47 2007
New Revision: 587521

URL: http://svn.apache.org/viewvc?rev=587521&view=rev
Log:
send variableread events

Modified:
    ode/branches/APACHE_ODE_1.1/bpel-api/src/main/java/org/apache/ode/bpel/evt/VariableReadEvent.java
    ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelRuntimeContextImpl.java
    ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ACTIVITY.java
    ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ASSIGN.java
    ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ExprEvaluationContextImpl.java
    ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/INVOKE.java
    ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/REPLY.java
    ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/THROW.java

Modified: ode/branches/APACHE_ODE_1.1/bpel-api/src/main/java/org/apache/ode/bpel/evt/VariableReadEvent.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-api/src/main/java/org/apache/ode/bpel/evt/VariableReadEvent.java?rev=587521&r1=587520&r2=587521&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-api/src/main/java/org/apache/ode/bpel/evt/VariableReadEvent.java
(original)
+++ ode/branches/APACHE_ODE_1.1/bpel-api/src/main/java/org/apache/ode/bpel/evt/VariableReadEvent.java
Tue Oct 23 07:37:47 2007
@@ -21,6 +21,6 @@
 /**
  * Signals that a variable has been accessed.
  */
-public class VariableReadEvent extends ScopeEvent {
+public class VariableReadEvent extends VariableEvent  {
   private static final long serialVersionUID = 1L;
 }

Modified: ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelRuntimeContextImpl.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelRuntimeContextImpl.java?rev=587521&r1=587520&r2=587521&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelRuntimeContextImpl.java
(original)
+++ ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelRuntimeContextImpl.java
Tue Oct 23 07:37:47 2007
@@ -389,7 +389,8 @@
     }
 
     public Node fetchVariableData(VariableInstance variable, boolean forWriting) throws FaultException
{
-        // Special case of messageType variables with no part
+    	
+    	// Special case of messageType variables with no part
         if (variable.declaration.type instanceof OMessageVarType) {
             OMessageVarType msgType = (OMessageVarType) variable.declaration.type;
             if (msgType.parts.size() == 0) {

Modified: ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ACTIVITY.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ACTIVITY.java?rev=587521&r1=587520&r2=587521&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ACTIVITY.java
(original)
+++ ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ACTIVITY.java
Tue Oct 23 07:37:47 2007
@@ -21,6 +21,7 @@
 import org.apache.ode.bpel.evt.ActivityEvent;
 import org.apache.ode.bpel.evt.EventContext;
 import org.apache.ode.bpel.evt.ScopeEvent;
+import org.apache.ode.bpel.evt.VariableReadEvent;
 import org.apache.ode.bpel.explang.EvaluationContext;
 import org.apache.ode.bpel.o.OActivity;
 import org.apache.ode.bpel.o.OLink;
@@ -60,6 +61,12 @@
         return new Key(_self.o,_self.aId);
     }
 
+    protected void sendVariableReadEvent(VariableInstance var) {
+    	VariableReadEvent vre = new VariableReadEvent();
+    	vre.setVarName(var.declaration.name);
+    	sendEvent(vre);
+    }
+    
     protected void sendEvent(ActivityEvent event) {
         event.setActivityName(_self.o.name);
         event.setActivityType(_self.o.getType());

Modified: ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ASSIGN.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ASSIGN.java?rev=587521&r1=587520&r2=587521&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ASSIGN.java
(original)
+++ ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ASSIGN.java
Tue Oct 23 07:37:47 2007
@@ -157,17 +157,20 @@
         Node retVal;
         if (from instanceof DirectRef) {
             OAssign.DirectRef dref = (OAssign.DirectRef) from;
+            sendVariableReadEvent(_scopeFrame.resolve(dref.variable));
             Node data = getBpelRuntimeContext().fetchVariableData(
                     _scopeFrame.resolve(dref.variable), false);
             retVal = DOMUtils.findChildByName((Element)data, dref.elName);
         } else if (from instanceof OAssign.VariableRef) {
             OAssign.VariableRef varRef = (OAssign.VariableRef) from;
+            sendVariableReadEvent(_scopeFrame.resolve(varRef.variable));
             Node data = getBpelRuntimeContext().fetchVariableData(
                     _scopeFrame.resolve(varRef.variable), false);
             retVal = evalQuery(data, varRef.part, varRef.location,
                     getEvaluationContext());
         } else if (from instanceof OAssign.PropertyRef) {
             OAssign.PropertyRef propRef = (OAssign.PropertyRef) from;
+            sendVariableReadEvent(_scopeFrame.resolve(propRef.variable));
             Node data = getBpelRuntimeContext().fetchVariableData(
                     _scopeFrame.resolve(propRef.variable), false);
 

Modified: ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ExprEvaluationContextImpl.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ExprEvaluationContextImpl.java?rev=587521&r1=587520&r2=587521&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ExprEvaluationContextImpl.java
(original)
+++ ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ExprEvaluationContextImpl.java
Tue Oct 23 07:37:47 2007
@@ -21,6 +21,9 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.ode.bpel.common.FaultException;
+import org.apache.ode.bpel.evt.ProcessEvent;
+import org.apache.ode.bpel.evt.ScopeEvent;
+import org.apache.ode.bpel.evt.VariableReadEvent;
 import org.apache.ode.bpel.explang.EvaluationContext;
 import org.apache.ode.bpel.o.OConstantVarType;
 import org.apache.ode.bpel.o.OExpression;
@@ -82,12 +85,16 @@
         } else {
             VariableInstance varInstance = _scopeInstance.resolve(variable);
             if (varInstance == null) return null;
+            VariableReadEvent vre = new VariableReadEvent();
+            vre.setVarName(varInstance.declaration.name);
+            sendEvent(vre);
             ret = _native.fetchVariableData(varInstance, part, false);
         }
         return ret;
     }
 
-    public Node evaluateQuery(Node root, OExpression expr) throws FaultException {
+
+	public Node evaluateQuery(Node root, OExpression expr) throws FaultException {
         try {
             return _native.getExpLangRuntime().evaluateNode(expr,
                     new ExprEvaluationContextImpl(_scopeInstance, _native, root));
@@ -126,5 +133,10 @@
     public boolean narrowTypes() {
         return true;
     }
+
+    private void sendEvent(ScopeEvent se) {
+    	_scopeInstance.fillEventInfo(se);
+    	_native.sendEvent(se);
+	}
 
 }

Modified: ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/INVOKE.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/INVOKE.java?rev=587521&r1=587520&r2=587521&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/INVOKE.java
(original)
+++ ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/INVOKE.java
Tue Oct 23 07:37:47 2007
@@ -189,6 +189,7 @@
         }
 
         if (oinvoke.operation.getInput().getMessage().getParts().size() > 0) {
+            sendVariableReadEvent(_scopeFrame.resolve(oinvoke.inputVar));
             Node outboundMsg = getBpelRuntimeContext().fetchVariableData(
                 _scopeFrame.resolve(oinvoke.inputVar), false);
             // TODO outbound message should be updated with non-initiate correlation sets

Modified: ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/REPLY.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/REPLY.java?rev=587521&r1=587520&r2=587521&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/REPLY.java
(original)
+++ ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/REPLY.java
Tue Oct 23 07:37:47 2007
@@ -49,6 +49,7 @@
         // TODO: Check for fault without message.
 
         try {
+            sendVariableReadEvent(_scopeFrame.resolve(oreply.variable));
             Node msg = getBpelRuntimeContext()
                     .fetchVariableData(_scopeFrame.resolve(oreply.variable), false);
 

Modified: ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/THROW.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/THROW.java?rev=587521&r1=587520&r2=587521&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/THROW.java
(original)
+++ ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/THROW.java
Tue Oct 23 07:37:47 2007
@@ -46,6 +46,7 @@
         FaultData fault = null;
         if(_othrow.faultVariable != null){
             try {
+                sendVariableReadEvent(_scopeFrame.resolve(_othrow.faultVariable));
                 Node faultVariable = getBpelRuntimeContext().fetchVariableData(_scopeFrame.resolve(_othrow.faultVariable),
false);
                 fault = createFault(_othrow.faultName, (Element)faultVariable,_othrow.faultVariable.type,_othrow);
             } catch (FaultException e) {



Mime
View raw message