This documentation is work in progress and will be released with the next WSO2 EI version.
Page Comparison - Working with REST Tasks (v.26 vs v.27) - WSO2 Enterprise Integrator 6.x.x - WSO2 Documentation

All docs This doc

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Select the  Properties  tab of the REST Task, click  General  and enter the  Name  as  Get Appointment
  2. In the Properties tab of the REST Task, click Main config and update the following: 

    Service URLhttp://localhost:9090/healthcare/appointments/validity/${appointmentNo}
    HTTP methodGET
    Output Variable MappingsnoOfDays:$.status
    Tip

    Important!

    Be sure to use only one parameter (Output Variable Mappings parameter or the Output Variable Name parameter) to specify the variable mappings.

    Expand
    titleMore information on the properties of the REST Task

    After adding the REST Task to your BPMN Diagram, you can configure the below Properties appropriately, as explained below.

    Field NameString ValueRequired/Optional
    Service URL 

    URL of the target endpoint.


    Optional

    Tip

    You can give this instead of the Service Reference (EPR).

    BasicAuth UsernameUsername if the endpoints are securedRequired
    BasicAuth PasswordPassword for the username aboveRequired
    Service Reference (EPR)

    Registry resource path of the endpoint reference.


    Optional

    Tip

    You can give this instead of the Service URL.

    HTTP MethodHTTP method (GET. POST, PUT or DELETE)Required
    Input PayloadRequest payloadOptional
    Output Variable name

    Name of the variable to save the response.

    Tip

    Important!

    Be sure to use only one parameter (Output Variable Mappings parameter or the Output Variable Name parameter) to specify the variable mappings.

    Optional
    Output Variable Mappings

    Variable mappings to map JSON response content into multiple variables. 

    Code Block
    languagejava
    var2:customer.name,var3:item.price
    Optional
    Transport headers

    Header values in the format

    Code Block
    languagejs
    {"headerName1":"headerValue1","headerName2":"header Value2"}
    Optional

    Configuring the HTTP client

    The above REST task is bundled with an HTTP client by default. You can edit its configurations in the <EI_HOME>/wso2/business-process/conf/activiti.xml file as shown in the example below.

    Code Block
    <bean id="restClientConfiguration">
            <property name="maxTotalConnections" value="200"/>
            <property name="maxConnectionsPerRoute" value="200"/>
            <property name="connectionTimeout" value="12000"/>
            <property name="socketTimeout" value="12000"/>
    </bean>

...