Name

On Completion — Route to be executed when normal route processing completes

Usage

The On Completion pattern defines a set of steps that are executed when normal route processing is completed. It can either be scoped local to a specific route or globally for all routes defined in the context.

[Important]Important

Locally scoped On Completion patterns take precedent over globally scoped ones. Therefore, the globally scoped pattern will not be executed when a locally scoped On Completion pattern exists.

When specifying a locally scoped On Completion pattern, the pattern directly follows the from endpoint in the route.

When specifying a globally scoped On Completion pattern, the pattern starts a new route.

Properties

Table 39 describes the properties you can specify using the properties editor.

Table 39. On Completion Properties

NameDescription
Executor Service RefSpecifies a reference for looking up the executorService to use for thread pool management.
Inherit Error HandlerSpecifies whether the node should use the error handler configured for the route. The default is Disabled.
On Failure OnlySpecifies whether the path will be taken only if message processing fails. Cannot be enabled if On Complete Only is enabled. The default is Disabled.
Use Original Message PolicySpecifies whether the message that began the route is placed in the dead letter queue instead of the message that caused the exception. The default is Disabled.
On Complete OnlySpecifies whether the path will be taken only if message processing completes successfully. Cannot be enabled if On Failure Only is enabled. The default is Disabled.
IdSpecifies a unique identifier for the endpoint. The Id can be used to refer to the endpoint in the Camel XML file.
DescriptionSpecifies a text description for the node. This description is included in the generated XML file, but it is informational only. It is not used by Apache Camel.