Running the Hello World Invoke Sample

This sample demonstrates how to call and invoke a simple REST web service in an orchestrated integration. The REST Adapter is triggered when you specify a URL. The Hello World REST Adapter you previously used in the Hello World sample is invoked in the integration. The name and email address response are sent to you in JSON format. A logging message is created and logged to the activity stream for viewing. You also track the integration and monitor message status.
Description of sample_invoke_integrat.png follows
Description of the illustration sample_invoke_integrat.png

Complexity

Minimal.

Prerequisites

The Hello World sample integration must be activated before configuring the connection in How to Configure.

How to Configure

Before you can activate and run this sample, you must configure the connection and security properties of the Sample Hello World Invoke REST Adapter used in this sample.

  1. In the home page, click the Connections diagram.

  2. Click Sample Hello World Invoke.

  3. Click Configure Connectivity to specify information to connect to the application/endpoint and process requests.

    1. For Connection Type, select Swagger Definition URL.

    2. For Connection URL, enter the following:

      https://hostname:port/integration/flowapi/rest/HELLO_WORLD/v01/metadata/swagger
    3. Click OK.

  4. Click Configure Security.

    1. Enter the username and password that you used to log in to Oracle Integration Cloud Service, then click OK.

  5. Click Test to test your configuration. A message is displayed that describes the results of the test. If successful, you are ready to activate the integration.

    Connection Sample Hello World Invoke was tested successfully.
  6. Click Save, then click Close.

How To Activate

  1. On the Oracle Integration Cloud Service home page, click the Integrations diagram.
    The Integrations diagram for creating and activating integrations

  2. In the row for the Hello World Invoke sample, click the Activate icon, then click Activate when prompted.
    Description of sample_activate.png follows
    Description of the illustration sample_activate.png

  3. Wait for the icon to turn green, indicating that it is activated.

How To Run

Enter one of the following URLs in a browser. You can also access these URLs from the Information icon for this integration.
https://host:port/integration/flowapi/rest/HELLO_WORLD_INVOKE/v01/info?name={Name}

https://host:port/integration/flowapi/rest/HELLO_WORLD_INVOKE/v01/info?name={Name}&email={Email Address}
For example:
https://my_pod.us.company.com:port/integration/flowapi/rest/HELLO_WORLD_INVOKE/v01/info?name=Mark
https://my_pod.us.company.com:port/integration/flowapi/rest/HELLO_WORLD_INVOKE/v01/info?name=Mark&email=mark.smith@mycompany.com

What Results Do You See

If you specified a name and email, you receive the following response in your browser:

{
  "Hello" : "mark",
  "Message" : "\"Welcome to ICS!  Check your email.\"You have successfully called a REST service!",
  "Email" : "mark.smith@mycompany.com"
}
and you receive a Hello email with the following contents:
Hello Mark,

Welcome to Oracle Integration Cloud Service!

How To Monitor

  1. In the upper left corner of the page, click the The hamburger menu menu.

  2. In the navigation pane, click the home icon icon, then click the Monitoring diagram.

    By default, the Dashboard page displays overall system status, including the percentage of successful messages, total number of messages, total number of successful messages, and total number of failed messages. Details about currently used connections, currently activated integrations, and scheduled integrations are also provided. You can also view the activity stream and download diagnostic logs and incident reports. From the Integration Health dropdown menu, you can view overall system health and design time metrics.

  3. Click Activity Stream to view details about the invocation.

  4. In the navigation pane, click Tracking and note that Hello World Invoke is listed as completed. Hello World, which was invoked by Hello World Invoke, has also completed.


    Description of sample_invoke_tracking.png follows
    Description of the illustration sample_invoke_tracking.png
  5. In the navigation pane, click Integrations and note that the messages were successfully received and processed without any errors.
    Description of sample_invoke_integrations.png follows
    Description of the illustration sample_invoke_integrations.png

How To View

  1. Click the home icon icon.

  2. Click the Integrations diagram.

  3. Click the Hello World Invoke integration.

    A read-only version of the integration is displayed for viewing. Because the integration is active, it cannot be edited.

  4. View the flow of the integration:

    • A REST Adapter is configured as a trigger (inbound) connection in the integration. The REST Adapter is configured with a resource endpoint of /info and a GET operation, and retrieves a name and email address. This REST Adapter is triggered when you specify the URL in How to Run.

    • A logging message is created and logged to the activity stream.

    • The Hello World REST Adapter you previously used in the Hello World sample is invoked in the integration. The REST Adapter is configured with a business object of /name/{name}, a GET operation, and a request query parameter of email. The name and email address response are sent to you in JSON format.


    Description of sample_invoke_integrat.png follows
    Description of the illustration sample_invoke_integrat.png