Skip to content

integrations/integrations

Documentation

Overview

Classes

Integrations

invokeRoute()

Synchronously invokes a specified Camel route.

ts
static invokeRoute(routeId: string, payload: any, headers: HeadersMap, exchangeProperties: ExchangeProperties): any;
ParameterTypeDescription
routeIdstringThe unique identifier of the Camel route to be executed.
payloadanyThe initial message body/payload for the route.
headersHeadersMapA map of headers to set on the initial Camel Message.
exchangePropertiesExchangePropertiesA map of properties to set on the Camel Exchange context.

Returns

  • Type: any
  • Description: The final result (the body of the resulting Camel Message) after the route has completed execution.

getInvokingRouteMessage()

Retrieves the current message being processed by the underlying integration engine's context. This is typically used within a route endpoint (e.g., a script component) to access or modify the message.

Note: '__context' is assumed to be a global or context-injected variable.

ts
static getInvokingRouteMessage(): IntegrationMessage;

Returns

  • Type: IntegrationMessage
  • Description: The current IntegrationMessage wrapper.