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.
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.
Provide basic information for the connector.
Field / option
Specify the name of the connector.
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.
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.
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
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 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.
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.
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.
Specify the URI query parameters in the form of name-value pairs.
This option is mostly used with the GET method.
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.
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.
Type in the name-value pair(s) for HTTP headers to define the parameters of the requested HTTP operation.
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)
Click Next to go to the next step and configure Talend ESB Infrastructure services
for this consumer request if needed.
Field / option
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.
Name of the service to be invoked.
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.
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.
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.
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.
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.
Select or create a variable where the connector output should be stored.