This documentation is for WSO2 Enterprise Integrator version 6.4.0 . View documentation for the latest release in the 6.x.x family and the latest release in the 7.x.x family.

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!

    If you have used both the Be sure to use only one of the following parameters to specify the variable mappings: Output Variable Mappings and or Output Variable Name parameters, the Output Variable Name parameter will be effective over the other.

    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!

    If you have used both the Output Variable Mappings and Output Variable Name parameters, the Output Variable Name parameter will be effective over the other.

    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>

...