Add the REST Adapter as a Trigger (Source) Connection

After creating an integration “EBS Java Service Demo”, you need to add a trigger (source) connection in the integration. The trigger (source) connection can be any application adapters suitable for your integrations. In this example, the REST Adapter is used for the integration.

Perform the following steps to add the REST Adapter as a trigger (source) connection:

  1. In the Create Order integration canvas, locate the "RESTSample" connection that you created earlier by entering "RESTSample" in the Connections field.

  2. Drag RESTSample from the Connections panel on the right to the Trigger (Source) area on the canvas.

    The Configure REST Endpoint wizard appears.

  3. Enter the following information:

    • What do you want to call your endpoint? - Enter the name of this endpoint, such as "REST".

    • What does this endpoint do? - Enter the usage of this endpoint, such as "Provide REST endpoint with input payload to obtain person absence details".

    • What is the endpoint's relative resource URI? - Enter “/getPersonAbsenceBalanceDtls/”.

    • What action does the endpoint perform? - Select "GET" from the drop-down list.

    Ensure that you select the following two check boxes for this trigger (source) connection:

    • Add and review parameters for this endpoint

    • Configure this endpoint to receive the response

    Description of restendpoint_basic.gif follows
    Description of the illustration restendpoint_basic.gif

    Click Next.

  4. In the Request Parameters page, perform the following tasks:

    Description of restendpoint_request.gif follows
    Description of the illustration restendpoint_request.gif
    • The Resource URI field displays the “/getPersonAbsenceBalanceDtls/” information you entered earlier,

    • In the “Specify Query Parameters” region, click the Add icon to enter the following information in a new row:

      • Name: Enter “personid”.

      • Data Type: Select “Integer” from the list.

    Click Next.

  5. In the Response page, select the JSON Sample button for this example.

    Click <<inline>> to enter the following JSON payload:

     "getPersonAbsenceBalanceDtls" : {
      "OutputParameters" : {
       "Output" : {
        "PerAbsenceBalanceDataBean" : [ {
         "Personid" : 1,
         "BusinessGroupId" : 2,
         "AbsenceAttendanceTypeId" : 3,
         "AbsenceTypeName" : "string",
         "Total" : 0.0,
         "Available" : 0.0,
         "Taken" : 0.0,
         "Planned" : 0.0
        } ]

    Click Next.

  6. This displays the Summary page of the REST service information that you specified earlier.

    Click Done.

    Click Save to save your work. The RESTSample connection now appears in the Trigger (Source) area on the canvas in the Invoke (Target) area.