Configuring the Talend ESB REST Client connector - 7.3

Talend Connectors for BPM Reference Guide

Version
7.3
Language
English
Product
Talend Data Fabric
Talend Data Services Platform
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Design and Development
Last publication date
2023-01-05

Before you begin

You have created a BPM process or task in your Talend Studio and added the Talend ESB REST Client connector to it.

Procedure

  1. Select the Talend ESB REST Client connector in the process or task, click Edit in the Connectors tab of the General view to open a configuration wizard.
  2. Provide basic information for the connector.

    Field / option

    Description

    Name *

    Specify the name of the connector.

    Description

    Provide descriptive information for the connector.

    Select event *

    Specify the event that triggers the connector:

    • enter: event occurs when the flow enters this process step;
    • start: event occurs when the flow starts;
    • suspend/resume: event occurs when the user presses the suspend/resume button on the web-form;
    • finish: event occurs when the flow exits this process step
    If connector fails...

    Action to take if the connector fails consuming the Web service:

    • Put in failed state: puts the step in failed state and terminates the process;
    • Ignore error and continue process: continues the process ignoring the error;
    • Throw error event: throws a user-specified error.

    Named Error

    Specifies the name of the error which should be thrown if the connector fails. Available only if the Throw error event option is selected.

    Note: Fields followed by an asterisk (*) are required.
  3. Click Next to go to the next step and define the properties of the REST service to be called from within the process.

    Field / option

    Description

    Endpoint URL

    URL of the REST service to be invoked. When the Use Service Locator check box is selected on the next page of this wizard, this field is not used and the URL of the REST service will be obtained from the Service Locator server automatically.

    Relative Path

    Relative path of the REST service to be invoked.

    • If Use Service Locator is disabled: You can enter any of the first part of the address in the Endpoint URL field, and the second part in the Relative Path field.
    • If Use Service Locator is enabled: The URL part will be given by the Service Locator. In this case, you need to know the URL part, and specify the rest part in Relative Path. This depends on the service you request.

    Method

    From this list, select an HTTP method that describes the desired action. The specific meanings of the HTTP methods are subject to definitions of your Web service provider.

    Listed below are the generally accepted HTTP method definitions:

    • GET: retrieves data from the server end based on the given parameters.
    • POST: uploads data to the server end based on the given parameters.
    • PUT: updates data based on the given parameters, or if the data does not exist, creates it.
    • DELETE: removes data based on the given parameters.

    Accept Type

    Select the media type the client end is prepared to accept for the response from the server end.

    Available options are XML, JSON, and ANY. When ANY is selected, the response message can be of any type and will be transformed into a string.

    Query

    Specify the URI query parameters in the form of name-value pairs.

    This option is mostly used with the GET method.

    Request

    This option is required only when the POST or PUT HTTP method is selected.

    • Content Type: Select XML, JSON, or FORM according to the media type of the content to be uploaded to the server end.
    • Request: Payload of the request message.

    Security

    Use Security: Select this check box if authentication is required on the REST server end. Once selected, you need to provide your username and password.

    Security Type: choose a security type between Basic HTTP and Digest.

    Headers

    Type in the name-value pair(s) for HTTP headers to define the parameters of the requested HTTP operation.

    Timeouts

    Connection timeout: Set the amount of time, in seconds, that the client will attempt to establish a connection before it times out. If set to 0, the client will continue to attempt to open a connection indefinitely. (default: 30)

    Receive timeout: Set the amount of time, in seconds, that the client will wait for a response before it times out. If set to 0, the client will wait indefinitely. (default: 60)

  4. Click Next to go to the next step and configure Talend ESB Infrastructure services for this consumer request if needed.

    Field / option

    Description

    Service Locator

     

    Use Service Locator

    Select this check box to enable the Service Locator feature.

    With this feature enabled, the provider endpoint (URL) will be requested at runtime from the Talend ESB Service Locator. In this way, the process is loosely coupled to the provider so the provider can be used based on availability, regardless of where they are hosted.

    Service Name

    Name of the service to be invoked.

    Service Namespace

    Namespace of the service to be invoked.

    Service Locator Properties

    (Optional) Additional metadata can be set as a filter for the list of service providers. For example, if the provider uses a location metadata to specify the data center location they are running with (values EU and US for example), a row in this table with 'locator' values EU would only retrieve an endpoint where the provider is located in a EU data center.

    Service Activity Monitoring

     

    Use Service Activity Monitoring

    Select this check box to enable monitoring the service calls with Service Activity Monitoring. In this way, request from the process to a ESB Provider is also tracked as a Service Activity event.

    Service Activity Monitoring Custom Info

    The table allows you to provide additional user-defined metadata which is stored together with the Service Activity Event.

    Business Correlation  

    Use Business Correlation

    Select this check box to enable the Business Correlation feature. This will pass a correlation ID to the service it calls via the request HTTP header, so that chained service calls will be grouped under this correlation ID.

    With this feature enabled, the connector will also extract the correlation ID from the response HTTP header and store it in the process variable specified in the next step for further use in the process.

    Correlation ID

    Specify your correlation ID or select a process variable for your correlation ID to pass to the service the connector calls. If you leave this field empty, a random UUID will be generated automatically at runtime.

  5. Click Next to go to the next step and set the parameters as follows to map the Web service response to variables/data types of the process, and then click Finish.

    Field

    Description

    Connector output

    Select the connector output or its part for storing it in the specified variable. The list also allows you to open a dialog box which provides a structured view of the response parameter.

    Destination variable

    Select or create a variable where the connector output should be stored.