Cache Failure
You can use the Cache Failure transform to handle exceptions that might occur if a Cache transform fails.
Overview
Include a Cache Failure transform in your Cache Put, Cache Get, or Cache Remove transform group
to specify a nested mapping that is called if the Cache transform fails. If
you include a Cache Failure transform,
exception errors are passed to the nested mapping instead of stopping
the message map.
Note: If the conditions
that are required to call a Cache transform
are not met, the map stops and generates a mapping exception that
cannot be handled by a Cache Failure transform.
A Cache Failure transform is an optional transform that can be added or removed as required
A Cache Failure transform does
not perform any transformation. The Cache Failure nested mapping
provides predefined input elements that provide data from an exception
that is encountered when the cache operation runs. You can also map
elements from the input tree to the Cache Failure transform, and
connect the Cache Failure transform
to one or more output elements. You can then use the nested map to
create or transform values and map them to the output elements that
you connected to the Cache Failure transform.
Note: If
you add a Cache Failure transform
but do not include any mapping in the nested map, the details of any
exceptions in the associated cache operation are not reported anywhere;
instead, the map displays a warning.
Predefined elements
The Cache Failure nested mapping
has the following predefined input elements:
Element | Description |
---|---|
ID | The identifying code of the exception. This is the "BIP" code of the MbException . |
Message | The message that is associated with the exception. For example: A duplicate key was encountered while interacting with map 'SYSTEM.BROKER.DEFAULTMAP'. A client attempted operation 'put' with map 'SYSTEM.BROKER.DEFAULTMAP' from grid 'WMB', using key 'MyKey'. This attempt failed because an entry already exists with the same key. This operation requires that a key of the same name does not already exist in the map. : Duplicate key exception |
Inserts | The details that are specific to the exception. For example,
in the previous message, the following entities are the inserts:
|
Run time behavior
The handling of Cache transform exceptions
is determined by the configuration of the corresponding Cache Failure transform:
- If the Cache Failure transform is present in the Cache transform group, and is connected to one or more output objects, the exception is caught and processed by the Cache Failure transform.
- If the Cache Failure transform is present in the Cache transform group but is not connected to any output objects, the exception is caught by the Cache Failure transform, and is ignored.
- If the Cache Failure transform is not present in the Cache transform group and the Cache transform generates an exception, the exception is handled by the Mapping node in your message flow in the same way as other message flow exceptions.