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 2007/11/21 18:05:24 UTC
svn commit: r597148 - 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/runtime/
Author: mriou
Date: Wed Nov 21 09:05:23 2007
New Revision: 597148
URL: http://svn.apache.org/viewvc?rev=597148&view=rev
Log:
Adding new variable value to variable modification event and deprecating the EventContext interface.
Modified:
ode/branches/APACHE_ODE_1.1/bpel-api/src/main/java/org/apache/ode/bpel/evt/EventContext.java
ode/branches/APACHE_ODE_1.1/bpel-api/src/main/java/org/apache/ode/bpel/evt/VariableModificationEvent.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/EH_EVENT.java
ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/FOREACH.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/PICK.java
ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/SCOPE.java
Modified: ode/branches/APACHE_ODE_1.1/bpel-api/src/main/java/org/apache/ode/bpel/evt/EventContext.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-api/src/main/java/org/apache/ode/bpel/evt/EventContext.java?rev=597148&r1=597147&r2=597148&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-api/src/main/java/org/apache/ode/bpel/evt/EventContext.java (original)
+++ ode/branches/APACHE_ODE_1.1/bpel-api/src/main/java/org/apache/ode/bpel/evt/EventContext.java Wed Nov 21 09:05:23 2007
@@ -20,23 +20,27 @@
/**
* Used in Event Listeners to get Activity Variables and its data.
+ * @deprecated
* @author Raja Balasubramanian
*/
public interface EventContext {
/**
* Get ScopeInstanceId
+ * @deprecated
* @return scopeInstanceId
*/
Long getScopeInstanceId();
/**
* Get All variable names used in this scope Instance
+ * @deprecated
* @return Array of Variable Names. If no variable(s) exists, null will be returned.
*/
String[] getVariableNames();
/**
* Get Variable data for the given variable name, for this scope instance
+ * @deprecated
* @param varName Variable Name
* @return DOM Node as XML String. If no value exists or variable not initialized, NULL will be returnrd.
*/
Modified: ode/branches/APACHE_ODE_1.1/bpel-api/src/main/java/org/apache/ode/bpel/evt/VariableModificationEvent.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-api/src/main/java/org/apache/ode/bpel/evt/VariableModificationEvent.java?rev=597148&r1=597147&r2=597148&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-api/src/main/java/org/apache/ode/bpel/evt/VariableModificationEvent.java (original)
+++ ode/branches/APACHE_ODE_1.1/bpel-api/src/main/java/org/apache/ode/bpel/evt/VariableModificationEvent.java Wed Nov 21 09:05:23 2007
@@ -18,13 +18,27 @@
*/
package org.apache.ode.bpel.evt;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
public class VariableModificationEvent extends VariableEvent {
- private static final long serialVersionUID = 1L;
- public VariableModificationEvent() {
- super();
- }
-
- public VariableModificationEvent(String varName) {
- super(varName);
- }
+ private static final long serialVersionUID = 1L;
+
+ private Node newValue;
+
+ public VariableModificationEvent() {
+ super();
+ }
+
+ public VariableModificationEvent(String varName) {
+ super(varName);
+ }
+
+ public Node getNewValue() {
+ return newValue;
+ }
+
+ public void setNewValue(Node newValue) {
+ this.newValue = newValue;
+ }
}
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=597148&r1=597147&r2=597148&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 Wed Nov 21 09:05:23 2007
@@ -326,6 +326,7 @@
__log.debug("Assign.copy(" + ocopy + ")");
final BpelRuntimeContext napi = getBpelRuntimeContext();
+ ScopeEvent se;
// Check for message to message - copy, we can do this efficiently in
// the database.
@@ -345,6 +346,8 @@
.resolve(((VariableRef) ocopy.from).getVariable());
Element lvalue = (Element) napi.fetchVariableData(rval, false);
napi.initializeVariable(lval, lvalue);
+ se = new VariableModificationEvent(lval.declaration.name);
+ ((VariableModificationEvent)se).setNewValue(lvalue);
} else {
// This really should have been cought by the compiler.
__log
@@ -401,6 +404,7 @@
PartnerLinkInstance plval = _scopeFrame
.resolve(pLinkRef.partnerLink);
replaceEndpointRefence(plval, rvalue);
+ se = new PartnerLinkModificationEvent(((OAssign.PartnerLinkRef) ocopy.to).partnerLink.getName());
} else {
// Sneakily converting the EPR if it's not the format expected by the lvalue
if (ocopy.from instanceof OAssign.PartnerLinkRef) {
@@ -417,25 +421,16 @@
lvalue = replaceContent(lvalue, lvaluePtr, rvalue
.getTextContent());
}
- final VariableInstance lval = _scopeFrame.resolve(ocopy.to
- .getVariable());
+ final VariableInstance lval = _scopeFrame.resolve(ocopy.to.getVariable());
if (__log.isDebugEnabled())
__log.debug("ASSIGN Writing variable '" + lval.declaration.name +
"' value '" + DOMUtils.domToString(lvalue) +"'");
napi.commitChanges(lval, lvalue);
+ se = new VariableModificationEvent(lval.declaration.name);
+ ((VariableModificationEvent)se).setNewValue(lvalue);
}
}
- ScopeEvent se;
- if (ocopy.to instanceof OAssign.PartnerLinkRef) {
- // myRole can't be updated, only a partnerRole is updated.
- se = new PartnerLinkModificationEvent(
- ((OAssign.PartnerLinkRef) ocopy.to).partnerLink.getName());
- } else {
- final VariableInstance lval = _scopeFrame.resolve(ocopy.to
- .getVariable());
- se = new VariableModificationEvent(lval.declaration.name);
- }
if (ocopy.debugInfo != null)
se.setLineNo(ocopy.debugInfo.startLine);
sendEvent(se);
Modified: ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/EH_EVENT.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/EH_EVENT.java?rev=597148&r1=597147&r2=597148&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/EH_EVENT.java (original)
+++ ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/EH_EVENT.java Wed Nov 21 09:05:23 2007
@@ -233,7 +233,8 @@
VariableInstance vinst = ehScopeFrame.resolve(_oevent.variable);
getBpelRuntimeContext().initializeVariable(vinst, msgEl);
- ScopeEvent se = new VariableModificationEvent(vinst.declaration.name);
+ VariableModificationEvent se = new VariableModificationEvent(vinst.declaration.name);
+ se.setNewValue(msgEl);
_scopeFrame.fillEventInfo(se);
if (_oevent.debugInfo != null)
se.setLineNo(_oevent.debugInfo.startLine);
Modified: ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/FOREACH.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/FOREACH.java?rev=597148&r1=597147&r2=597148&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/FOREACH.java (original)
+++ ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/FOREACH.java Wed Nov 21 09:05:23 2007
@@ -214,7 +214,8 @@
getBpelRuntimeContext().initializeVariable(vinst, counterNode);
// Generating event
- ScopeEvent se = new VariableModificationEvent(vinst.declaration.name);
+ VariableModificationEvent se = new VariableModificationEvent(vinst.declaration.name);
+ se.setNewValue(counterNode);
if (_oforEach.debugInfo != null)
se.setLineNo(_oforEach.debugInfo.startLine);
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=597148&r1=597147&r2=597148&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 Wed Nov 21 09:05:23 2007
@@ -116,7 +116,8 @@
getBpelRuntimeContext().initializeVariable(outputVar, response);
// Generating event
- ScopeEvent se = new VariableModificationEvent(outputVar.declaration.name);
+ VariableModificationEvent se = new VariableModificationEvent(outputVar.declaration.name);
+ se.setNewValue(response);
if (_oinvoke.debugInfo != null)
se.setLineNo(_oinvoke.debugInfo.startLine);
sendEvent(se);
Modified: ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/PICK.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/PICK.java?rev=597148&r1=597147&r2=597148&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/PICK.java (original)
+++ ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/PICK.java Wed Nov 21 09:05:23 2007
@@ -212,7 +212,8 @@
VariableInstance vinst = _scopeFrame.resolve(onMessage.variable);
getBpelRuntimeContext().initializeVariable(vinst, msgEl);
// Generating event
- ScopeEvent se = new VariableModificationEvent(vinst.declaration.name);
+ VariableModificationEvent se = new VariableModificationEvent(vinst.declaration.name);
+ se.setNewValue(msgEl);
if (_opick.debugInfo != null)
se.setLineNo(_opick.debugInfo.startLine);
sendEvent(se);
Modified: ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/SCOPE.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/SCOPE.java?rev=597148&r1=597147&r2=597148&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/SCOPE.java (original)
+++ ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/SCOPE.java Wed Nov 21 09:05:23 2007
@@ -329,7 +329,8 @@
ntive.initializeVariable(vinst, _fault.getFaultMessage());
// Generating event
- ScopeEvent se = new VariableModificationEvent(vinst.declaration.name);
+ VariableModificationEvent se = new VariableModificationEvent(vinst.declaration.name);
+ se.setNewValue(_fault.getFaultMessage());
if (_oscope.debugInfo != null)
se.setLineNo(_oscope.debugInfo.startLine);
sendEvent(se);