public class PossibleExceptionFromMetadata extends ExceptionFromMetadataImpl
ExceptionGenerator
implementation that generates the exception from metadata.
Use this class with ThrowExceptionService
to throw an exception as part of a workflow. The exception message (i.e.
Throwable.getMessage()
) is derived from the configured metadata key. If the metadata key does not exist (or returns no
value) then no exception will be thrown. This behaviour differs from ExceptionFromMetadata
In the adapter configuration file this class is aliased as possible-exception-from-metadata which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
PossibleExceptionFromMetadata() |
PossibleExceptionFromMetadata(java.lang.String metadataKey) |
Modifier and Type | Method and Description |
---|---|
ServiceException |
create(AdaptrisMessage msg)
Generate a service exception from the AdaptrisMessage.
|
getExceptionMessageMetadataKey, setExceptionMessageMetadataKey
public PossibleExceptionFromMetadata()
public PossibleExceptionFromMetadata(java.lang.String metadataKey)
public ServiceException create(AdaptrisMessage msg)
ExceptionGenerator
msg
- the message