An ESB Test Container is a standard ESB Containers running in a TEST_CONTAINER_MODE. This mode is enabled by setting the ESB Container's deployment parameter 'TEST_CONTAINER_MODE' to true. This enables ESB Run Framework Reqeust Processing Locations in the components deployed to these containers. This in turn enables the execution of framework requests in these deployed components.
The ESB Run Service facilitates communication between a Run Handler and ESB Test Containers and coordinates execution of the deployed ESB components.
A Run Handler connects the client runtime to the Run Service and facilitates the creation of run Executions in the ESB Test Framework
A Run represents a single execution within the ESB Run
Framework. It maintains and provides access to the state of that execution.
ESB Run Framework Clients control the execution of a Run by
submitting EventRequests. The Run contains an
EventRequestManager which maintains a sequence of
EventRequests associated with the Run. Clients
create EventRequests for subsequent processing by the
Run through this EventRequestManager. These
EventRequests are processed when the thread of execution of
the Run reaches the Locations associated with
each request. At each location, EventRequests are executed in
the order they occur in the EventRequestManager. The
EventRequestMananger maintains EventRequests in
the order that they are created.
ESB Run Framework Clients monitor the state of a Run's
execution by consuming Events. The Run
contains an EventQueue which maintains the sequence of
Events received by the Run. An
Event is generated and placed on the EventQueue
each time the Run processes an EventRequest.
The execution of a Run is initiated by invoking its
start method. A RunContext is created in the
ESB Run Framework to track the Run's thread of execution and
any SendRunMessageRequest is processed.
The execution of a Run can be suspended by invoking its
suspend method. When invoked, the execution will suspend at
the next location(s) encounted by the RunContext(s) of the
run. The execution of the Run can be resumed by invoking its
resume method.
An EventRequest may be configured to suspend the execution of
a Run by setting the request's suspend property
to true. When the request is processed, it will generate its
Event and suspend execution of the Run at the
Location the request was processed.The execution of the
Run will remain suspended until resume is
called on the event generated by the request. In general it is best practice
for clients to always invoke resume on the events they consume
when done processing them.
ESB Run Framework Clients access the state of the framework during the
execution of a run through the RemoteValues returned in the
data property of Events. The type of data
returned is determined by the Location associated with the
event. Each Location type has a corresponding
RemoteValue type that represents the remote data exposed by
that locations of that type.
A RemoteValue is only valid while the Run is
suspended at the Location of that remote value. In particular,
RemoteValues from Events of
EventRequests that do not suspend execution of a
Run are never valid and RemoteValues become
invalid once resume is invoked on thier Events.
A Run is terminated by invoking its close
method. This terminates any threads of execution and removes any
RunContexts in the ESB Run Framework associated with
Run.