Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.ode.bpel.rtrep.common.extension
Interface ExtensionContext

All Known Implementing Classes:
  ExtensionContextImpl, MockExtensionContext

    public interface ExtensionContext

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(...)`.

Method Summary
`void` | `complete()` Marks the currently executed activity as successfully completed.
`void` | `completeWithFault(FaultException fault)` Marks the currently executed activity as faulted.
`void` | `completeWithFault(java.lang.Throwable t)` Marks the currently executed activity as faulted.
`java.lang.String` | `getActivityName()` Returns the name of the invoking activity.
`java.net.URI` | `getDUDir()` Returns the location of the deployment bundle of the executed process.
`OdeInternalInstance` | `getInternalInstance()` Returns ODE's internal runtime instance.
`OActivity` | `getOActivity()` Returns the OActivity object.
`java.lang.Long` | `getProcessId()` Reads the current process instance id.
`java.util.Map<java.lang.String,OScope.Variable>` | `getVisibleVariables()` Returns a list of variables visible in the current scope.
`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` | `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`

### 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.
  Throws:
    `FaultException`

### 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`

### 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`

### 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`
    `ExternalVariableModuleException`

### writeVariable

    void writeVariable(java.lang.String variableName,
                       org.w3c.dom.Node value)
                       throws FaultException,
                              ExternalVariableModuleException

  Write the value into a BPEL variable.

  Parameters:
    `variableName` - variable to write
    `value` - the value to be stored into the variable
  Throws:
    `FaultException`
    `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`

### 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.

### complete

    void complete()

  Marks the currently executed activity as successfully completed.

### completeWithFault

    void completeWithFault(java.lang.Throwable t)

  Marks the currently executed activity as faulted.

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

### completeWithFault

    void completeWithFault(FaultException fault)

  Marks the currently executed activity as faulted.

  Parameters:
    `fault` - a fault.

### getOActivity

    OActivity getOActivity()

  Returns the OActivity object.

### getInternalInstance

    OdeInternalInstance getInternalInstance()

  Returns ODE's internal runtime instance.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD