HTTP ReST Routing Service (com.ibi.agents.XDReSTRouteAgent)

Syntax:

com.ibi.agents.XDReSTRouteAgent

iIT Service Object:

http: HTTP ReST Routing Service

Description:

This service routes a ReST request to a process flow based on the request method and path. An HTTP ReST Routing Reviewer (com.ibi.reviewer.XDReSTRouteReviewer) is also provided, which shares the same parameters as the service.

The main purpose of these components is to identify a process flow to execute, given a URI path and the type of the HTTP request. The name of the process flow will be stored in a special register (SREG). In addition to this routing function, some elements in the URI path, and all keys and values in the URI query string, will be stored as SREGs. This functionality will be made available as a service for use within a process flow, but also as a reviewer. This allows for earlier execution in the processing stage to allow conditional routing to handle the execution of the identified process flow.

Parameters:

Parameter

Description

Route File Path *

The path to the XML file describing the route. The file is loaded when the service is first executed and remains in effect until the listener is restarted.

ReST Verb *

The HTTP verb (PUT, POST, DELETE, or GET).

Hint: In nHTTP this is in the SREG called reqType.

URI *

The URI of the incoming HTTP request. In nHTTP, this is stored in the SREG called url. This may include a path and a query string.

Flow Name Register *

An SREG of this name will be created with the name of the process flow to run.

Route Namespace

SREG namespace prefix to use when creating SREGs from path steps, including the process flow name register.

Query Namespace

SREG namespace prefix to use when creating SREGs from the query string portion of the URI.

Output Type

Determines in the event of a routing error, what document should be output from this service. Select one of the following document types:

  • status
  • input

Edges:

The following table lists the available line edges for the HTTP ReST Routing Service (com.ibi.agents.XDReSTRouteAgent).

Line Edge

Description

OnError

Error

OnSuccess

Success

OnFailure

Failure

OnCustom

  • OnError
  • OnSuccess
  • OnFailure
  • fail_parse
  • fail_notfound
  • fail_route
  • fail_security