org.apache.ode.bpel.runtime.extension
Interface ExtensionContext

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
ExtensionContextImpl

public interface ExtensionContext
extends java.io.Serializable

Context for executing extension activities or extension assign operations. Implementations of the ExtensionOperation class use this interface to access BPEL variables, property sets and link status. All ExtensionOperation implementations must complete with complete(), completeWithFault(...).

Author:
Tammo van Lessen (University of Stuttgart)

Method Summary
 void complete(java.lang.String cid)
          Marks the currently executed activity as successfully completed.
 void completeWithFault(java.lang.String cid, FaultException fault)
          Marks the currently executed activity as faulted.
 void completeWithFault(java.lang.String cid, java.lang.Throwable t)
          Marks the currently executed activity as faulted.
 java.lang.String getActivityName()
          Returns the name of the invoking activity.
 java.lang.String[] getCorrelationValues()
           
 java.lang.String getCorrelatorId()
           
 java.net.URI getDUDir()
          Returns the location of the deployment bundle of the executed process.
 BpelRuntimeContext getInternalInstance()
          Returns ODE's internal runtime instance.
 OActivity getOActivity()
          Returns the OActivity object.
 ParentScopeChannel getParentScopeChannel()
           
 org.w3c.dom.Node getPartData(org.w3c.dom.Element element, java.lang.String variable)
           
 PartnerLinkInstance getPartnerLinkInstance(OPartnerLink partnerLink)
          Get the partner link
 PartnerLinkInstance getPartnerLinkInstance(java.lang.String partnerLinkName)
          Get the partner link
 java.lang.Long getProcessId()
          Reads the current process instance id.
 OProcess getProcessModel()
          Get the Process Model
 TerminationChannel getTerminationChannel()
           
 java.util.Map<java.lang.String,OScope.Variable> getVisibleVariables()
          Returns a list of variables visible in the current scope.
 boolean isPartnerLinkVisible(java.lang.String partnerLinkName)
          Check whether the partner link is visible in the current scope or not
 boolean isVariableVisible(java.lang.String variableName)
          Returns whether a variable is visible in the current scope or not.
 void printToConsole(java.lang.String msg)
          Allows printing debug output to the console.
 java.lang.String readMessageProperty(OScope.Variable variable, OProcess.OProperty property)
          Read the value of a BPEL property.
 org.w3c.dom.Node readVariable(OScope.Variable variable)
          Read the value of a BPEL variable.
 org.w3c.dom.Node readVariable(java.lang.String variableName)
          Read the value of a BPEL variable.
 void setCorrelationValues(java.lang.String[] values)
          Set correlation values in order to find a route This should be set in LongRunning extensions in-order to receive the response
 void setCorrelatorId(java.lang.String correlatorId)
          Set Correlator value This should be set in LongRunning extensions in-order to receive the response
 void writeVariable(OScope.Variable variable, org.w3c.dom.Node value)
          Write the value into a BPEL variable.
 void writeVariable(java.lang.String variableName, org.w3c.dom.Node value)
          Write the value into a BPEL variable.
 

Method Detail

getVisibleVariables

java.util.Map<java.lang.String,OScope.Variable> getVisibleVariables()
                                                                    throws FaultException
Returns a list of variables visible in the current scope.

Returns:
an unmodifiable list of visible variables.
Throws:
FaultException - FaultException

isVariableVisible

boolean isVariableVisible(java.lang.String variableName)
Returns whether a variable is visible in the current scope or not.

Parameters:
variableName - name of the variable.
Returns:
true if the variable is visible.

readVariable

org.w3c.dom.Node readVariable(OScope.Variable variable)
                              throws FaultException
Read the value of a BPEL variable.

Parameters:
variable - variable to read
Returns:
the value of the variable, wrapped in a Node
Throws:
FaultException - FaultException

readVariable

org.w3c.dom.Node readVariable(java.lang.String variableName)
                              throws FaultException
Read the value of a BPEL variable.

Parameters:
variableName - variable to read
Returns:
the value of the variable, wrapped in a Node
Throws:
FaultException - FaultException

writeVariable

void writeVariable(OScope.Variable variable,
                   org.w3c.dom.Node value)
                   throws FaultException,
                          ExternalVariableModuleException
Write the value into a BPEL variable.

Parameters:
variable - variable to write
value - the value to be stored into the variable
Throws:
FaultException - FaultException
ExternalVariableModuleException - ExternalVariableModuleException

writeVariable

void writeVariable(java.lang.String variableName,
                   org.w3c.dom.Node value)
                   throws FaultException
Write the value into a BPEL variable.

Parameters:
variableName - variable to write
value - the value to be stored into the variable
Throws:
FaultException - FaultException
ExternalVariableModuleException - ExternalVariableModuleException

readMessageProperty

java.lang.String readMessageProperty(OScope.Variable variable,
                                     OProcess.OProperty property)
                                     throws FaultException
Read the value of a BPEL property.

Parameters:
variable - variable containing property
property - property to read
Returns:
value of the property
Throws:
FaultException - FaultException

getProcessId

java.lang.Long getProcessId()
Reads the current process instance id.

Returns:
instance id

getActivityName

java.lang.String getActivityName()
Returns the name of the invoking activity.

Returns:
activity name

getDUDir

java.net.URI getDUDir()
Returns the location of the deployment bundle of the executed process.

Returns:
URI of the deployment bundle.

printToConsole

void printToConsole(java.lang.String msg)
Allows printing debug output to the console. Output will be redirected to the logger associated with org.apache.ode.extension.Console. The target log level is INFO.

Parameters:
msg - Message

complete

void complete(java.lang.String cid)
Marks the currently executed activity as successfully completed.

Parameters:
cid - id

completeWithFault

void completeWithFault(java.lang.String cid,
                       java.lang.Throwable t)
Marks the currently executed activity as faulted.

Parameters:
cid - id
t - an exception to be reported as the fault cause.

completeWithFault

void completeWithFault(java.lang.String cid,
                       FaultException fault)
Marks the currently executed activity as faulted.

Parameters:
cid - id
fault - a fault.

getOActivity

OActivity getOActivity()
Returns the OActivity object.

Returns:
OActivity

getInternalInstance

BpelRuntimeContext getInternalInstance()
Returns ODE's internal runtime instance.

Returns:
OdeInternalInstance

getPartnerLinkInstance

PartnerLinkInstance getPartnerLinkInstance(java.lang.String partnerLinkName)
                                           throws FaultException
Get the partner link

Parameters:
partnerLinkName - name of the partner link
Returns:
PartnerLinkInstance
Throws:
FaultException - FaultException

isPartnerLinkVisible

boolean isPartnerLinkVisible(java.lang.String partnerLinkName)
Check whether the partner link is visible in the current scope or not

Parameters:
partnerLinkName - name of the partner link
Returns:
true if the partner link is visible

getPartnerLinkInstance

PartnerLinkInstance getPartnerLinkInstance(OPartnerLink partnerLink)
                                           throws FaultException
Get the partner link

Parameters:
partnerLink - partnerLink
Returns:
PartnerLinkInstance
Throws:
FaultException - FaultException

getProcessModel

OProcess getProcessModel()
Get the Process Model

Returns:
ProcessModel

setCorrelationValues

void setCorrelationValues(java.lang.String[] values)
Set correlation values in order to find a route This should be set in LongRunning extensions in-order to receive the response

Parameters:
values - values

getCorrelationValues

java.lang.String[] getCorrelationValues()

setCorrelatorId

void setCorrelatorId(java.lang.String correlatorId)
Set Correlator value This should be set in LongRunning extensions in-order to receive the response

Parameters:
correlatorId - partnerlink.operation

getCorrelatorId

java.lang.String getCorrelatorId()

getPartData

org.w3c.dom.Node getPartData(org.w3c.dom.Element element,
                             java.lang.String variable)

getTerminationChannel

TerminationChannel getTerminationChannel()

getParentScopeChannel

ParentScopeChannel getParentScopeChannel()


Copyright © 2015 WSO2. All Rights Reserved.