public interface Workflow extends AdaptrisMessageListener, StateManagedComponent, EventHandlerAware, ComponentLifecycleExtension, ConfigComment
Workflows link an AdaptrisMessageConsumer, a
ServceCollection and an AdaptrisMessageProducer.
They also provide error handling functionality.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PREVIOUS_GUID_KEY
Metadata key for the unique ID of the message as it is being processed.
|
static java.lang.String |
WORKFLOW_ID_KEY
Metadata key used to store the ID of the workflow for processing bad
messages.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
disableMessageCount()
Whether or not message-counts should be disabled on this workflow.
|
void |
doProduce(AdaptrisMessage msg)
Produce the message.
|
AdaptrisMessageConsumer |
getConsumer()
Returns this
Workflow's AdaptrisMessageConsumer. |
java.util.List<WorkflowInterceptor> |
getInterceptors()
Return all the configured interceptors.
|
ProcessingExceptionHandler |
getMessageErrorHandler()
Returns the
ProcessingExceptionHandler to use. |
AdaptrisMessageProducer |
getProducer()
Returns this
Workflow's AdaptrisMessageProducer. |
java.lang.String |
getUniqueId()
Returns any configured unique-id.
|
void |
handleBadMessage(AdaptrisMessage msg)
Handle a 'bad' message.
|
void |
handleProduceException()
Handle an
Exception encountered producing a message. |
java.util.Date |
lastStartTime()
Get the last time this workflow was started
|
java.util.Date |
lastStopTime()
Get the last time this workflow was stopped.
|
Channel |
obtainChannel()
Returns a reference to this
Workflow's Channel. |
java.lang.String |
obtainWorkflowId()
Returns what the workflow considers to be it's unique ID of the workflow.
|
void |
registerActiveMsgErrorHandler(ProcessingExceptionHandler meh)
Sets the
ProcessingExceptionHandler to use. |
void |
registerChannel(Channel ch)
Sets a reference to this
Workflow's Channel. |
friendlyName, onAdaptrisMessagechangeState, requestClose, requestInit, requestStart, requestStop, retrieveComponentStateclose, init, start, stopprepareregisterEventHandlergetComments, setCommentsstatic final java.lang.String WORKFLOW_ID_KEY
Metadata key used to store the ID of the workflow for processing bad messages.
static final java.lang.String PREVIOUS_GUID_KEY
Metadata key for the unique ID of the message as it is being processed. When it is retried it will have a new UUID, this metadata is used to link the two messages.
void doProduce(AdaptrisMessage msg) throws ServiceException, ProduceException
Produce the message.
msg - the AdaptrisMessage to produceProduceException - if one is encountered producing either the request
or the replyServiceException - if one is encountered applying Services to a replyvoid handleBadMessage(AdaptrisMessage msg) throws CoreException
Handle a 'bad' message. A bad message is one which has caused an
Exception in the ServceCollection or
AdaptrisMessageProducer.
msg - the original version of the 'bad' messageCoreException - wrapping any Exception that might occurvoid handleProduceException()
Handle an Exception encountered producing a message.
AdaptrisMessageConsumer getConsumer()
Returns this Workflow's AdaptrisMessageConsumer.
Workflow's AdaptrisMessageConsumerAdaptrisMessageProducer getProducer()
Returns this Workflow's AdaptrisMessageProducer.
Workflow's AdaptrisMessageProducerjava.lang.String obtainWorkflowId()
Returns what the workflow considers to be it's unique ID of the workflow.
This may differ from any 'unique-id' element that has been set.
java.lang.String getUniqueId()
Returns any configured unique-id.
getUniqueId in interface AdaptrisComponentProcessingExceptionHandler getMessageErrorHandler()
Returns the ProcessingExceptionHandler to use.
void registerActiveMsgErrorHandler(ProcessingExceptionHandler meh)
Sets the ProcessingExceptionHandler to use.
meh - the ProcessingExceptionHandler to useChannel obtainChannel()
Returns a reference to this Workflow's Channel.
Workflow's Channelvoid registerChannel(Channel ch) throws CoreException
Sets a reference to this Workflow's Channel.
ch - this Workflow's ChannelCoreExceptionjava.util.Date lastStartTime()
java.util.Date lastStopTime()
java.util.List<WorkflowInterceptor> getInterceptors()
boolean disableMessageCount()