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/04/11 00:39:55 UTC
svn commit: r646995 -
/ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ScopeFrame.java
Author: mriou
Date: Thu Apr 10 15:39:46 2008
New Revision: 646995
URL: http://svn.apache.org/viewvc?rev=646995&view=rev
Log:
Prettyfication
Modified:
ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ScopeFrame.java
Modified: ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ScopeFrame.java
URL: http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ScopeFrame.java?rev=646995&r1=646994&r2=646995&view=diff
==============================================================================
--- ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ScopeFrame.java (original)
+++ ode/branches/APACHE_ODE_1.1/bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/ScopeFrame.java Thu Apr 10 15:39:46 2008
@@ -152,17 +152,17 @@
if (event.getLineNo() == -1 && oscope.debugInfo != null)
event.setLineNo(oscope.debugInfo.startLine);
}
-
+
//
// Move all the external variable stuff in here so that it can be used by the expr-lang evaluation
// context.
//
-
- Node fetchVariableData(BpelRuntimeContext brc, VariableInstance variable, boolean forWriting)
- throws FaultException
+
+ Node fetchVariableData(BpelRuntimeContext brc, 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) {
@@ -175,12 +175,12 @@
if (variable.declaration.extVar != null) {
// Note, that when using external variables, the database will not contain the value of the
- // variable, instead we need to go the external variable subsystems.
- Element reference = (Element) fetchVariableData(brc, resolve(variable.declaration.extVar.related), false);
+ // variable, instead we need to go the external variable subsystems.
+ Element reference = (Element) fetchVariableData(brc, resolve(variable.declaration.extVar.related), false);
try {
Node ret = brc.readExtVar(variable.declaration, reference );
if (ret == null) {
- throw new FaultException(oscope.getOwner().constants.qnUninitializedVariable,
+ throw new FaultException(oscope.getOwner().constants.qnUninitializedVariable,
"The external variable \"" + variable.declaration.name + "\" has not been initialized.");
}
return ret;
@@ -188,7 +188,7 @@
// This indicates that the external variable needed to be written do, put has not been.
__log.error("External variable could not be read due to incomplete key; the following key " +
"components were missing: " + ike.getMissing());
- throw new FaultException(oscope.getOwner().constants.qnUninitializedVariable,
+ throw new FaultException(oscope.getOwner().constants.qnUninitializedVariable,
"The extenral variable \"" + variable.declaration.name + "\" has not been properly initialized;" +
"the following key compoenents were missing:" + ike.getMissing());
} catch (ExternalVariableModuleException e) {
@@ -202,12 +202,11 @@
}
return data;
}
- }
-
+ }
+
Node fetchVariableData(BpelRuntimeContext brc, VariableInstance var, OMessageVarType.Part part, boolean forWriting)
- throws FaultException
- {
+ throws FaultException {
Node container = fetchVariableData(brc, var, forWriting);
// If we want a specific part, we will need to navigate through the
@@ -217,53 +216,38 @@
}
return container;
}
-
- Node initializeVariable(BpelRuntimeContext context, VariableInstance var, Node value)
- throws ExternalVariableModuleException
- {
+
+ Node initializeVariable(BpelRuntimeContext context, VariableInstance var, Node value)
+ throws ExternalVariableModuleException {
if (var.declaration.extVar != null) /* external variable */ {
if (__log.isDebugEnabled())
- __log.debug("Initialize external variable:"
- + " name="+var.declaration
- + " value="+DOMUtils.domToString(value));
+ __log.debug("Initialize external variable: name="+var.declaration + " value="+DOMUtils.domToString(value));
VariableInstance related = resolve(var.declaration.extVar.related);
- Node reference = null;
- try {
+ Node reference = null;
+ try {
reference = fetchVariableData(context, related, true);
- } catch (FaultException fe) {
- // In this context this is not necessarily a problem, since the assignment may re-init the related var
- }
-
- if (reference != null)
- value = context.readExtVar(var.declaration, reference);
-
+ } catch (FaultException fe) {
+ // In this context this is not necessarily a problem, since the assignment may re-init the related var
+ }
+ if (reference != null) value = context.readExtVar(var.declaration, reference);
+
return value;
} else /* normal variable */ {
- if (__log.isDebugEnabled())
- if (__log.isDebugEnabled())
- __log.debug("Initialize variable:"
- + " name="+var.declaration
- + " value="+DOMUtils.domToString(value));
+ if (__log.isDebugEnabled()) __log.debug("Initialize variable: name="+var.declaration + " value="+DOMUtils.domToString(value));
return context.writeVariable(var, value);
}
- }
-
+ }
- Node commitChanges(BpelRuntimeContext context, VariableInstance var, Node value)
- throws ExternalVariableModuleException
- {
+
+ Node commitChanges(BpelRuntimeContext context, VariableInstance var, Node value) throws ExternalVariableModuleException {
return writeVariable(context, var, value);
- }
+ }
-
- Node writeVariable(BpelRuntimeContext context, VariableInstance var, Node value)
- throws ExternalVariableModuleException
- {
+
+ Node writeVariable(BpelRuntimeContext context, VariableInstance var, Node value) throws ExternalVariableModuleException {
if (var.declaration.extVar != null) /* external variable */ {
- __log.debug("Write external variable:"
- + " name="+var.declaration
- + " value="+DOMUtils.domToString(value));
+ __log.debug("Write external variable: name="+var.declaration + " value="+DOMUtils.domToString(value));
VariableInstance related = resolve(var.declaration.extVar.related);
Node reference = null;
try {
@@ -276,23 +260,21 @@
writeVariable(context, related, vrp.reference);
return vrp.value;
} else /* normal variable */ {
- __log.debug("Write variable:"
- + " name="+var.declaration
- + " value="+DOMUtils.domToString(value));
+ __log.debug("Write variable: name="+var.declaration + " value="+DOMUtils.domToString(value));
return context.writeVariable(var, value);
}
- }
+ }
Node getPartData(Element message, Part part) {
- // borrowed from ASSIGN.evalQuery()
+ // borrowed from ASSIGN.evalQuery()
QName partName = new QName(null, part.name);
- Node ret = DOMUtils.findChildByName((Element) message, partName);
+ Node ret = DOMUtils.findChildByName(message, partName);
if (part.type instanceof OElementVarType) {
QName elName = ((OElementVarType) part.type).elementType;
ret = DOMUtils.findChildByName((Element) ret, elName);
}
return ret;
}
-
+
}