Oracle by Example brandingCreating an Orchestration to Check the Health Status of a Server Instance

section 0Before You Begin

This 30-minute OBE (Oracle By Example) shows you how to create an orchestration to check for the health status of a server instance and provide a report of the health status as a message.

In this OBE, you will create an orchestration with an Open API connector to call a REST service that retrieves the Server Manager information. You will then add a connector and a message step to the orchestration. Lastly, you will test the orchestration to verify that it returns the requested data and sends the message.

In this OBE, you will:

  1. Create a connection to the Server Manager Console

  2. Create the connector to retrieve the health status

  3. Create an orchestration that calls the connector

  4. Create a message to send the health check summary

  5. Test the final orchestration

In the Orchestrator Studio, you can configure a connector to invoke a REST service. The Connector design page in the Orchestrator Studio provides a test feature that enables you to test the connector and view the JSON response of the REST service call. This exercise sends a message to Work Center. If your environment is configured with an SMTP e-mail server, you can alternatively send the message to an e-mail address.

What Do You Need?

To perform the steps in this OBE, you will need:

  • An AIS Server version 9.2.5.0 or higher is running and accessible.
  • An instance of server running on the Server Manager Console 9.2.5.0 or higher to which you want to make a connection.
  • A EnterpriseOne user with an address book number associated where the address record exists in the address book table and does not have any associated e-email addresses where the delivery flag is 1. The deliveries need to go to work center for this address number.
  • Access to Orchestrator Studio.

section 1Creating a Connection to the Server Manager Console

A connector service request requires a connection, which will list all the REST services (API calls) that can be invoked through the Server Manager Console.

In this section, you will create an OpenAPI connection to list all the REST services on the Server Manager.

  1. On the Orchestrator Studio Home page, click the Connections icon.
  2. Click New and select Open API.
  3. On Connection Information, complete these fields:
    • Name: Health Check
    • Description: Connection for Health Check
    • Type: Select Open API from the drop-down list.
    • User/Role: Enter the user authorized to access the connection. The user can be an EnterpriseOne user, role, or *PUBLIC.
    • Environment: Enter the environment where the connections reside.
  4. On the Service Information tab, in the OpenAPI Catalog field, enter the URL for accessing the Open API documentation, through which you can access the Server Manager REST services.
    Example: https://Server_manager_Console_host:port/manage/mgmtrestservice/v1/open-api-catalog
  5. On the Security tab, select Basic Authentication and complete these fields to enable access to the Server Manager Console:
    • User: Enter an EnterpriseOne user authorized to access the Server Manager Console.
    • Password: Enter the password for the EnterpriseOne user.
  6. Enter proxy information on the Proxy tab if necessary for your network configuration.
  7. Save the record.
  8. The system automatically populates the details about the API including the Endpoint in the drop-down list where you can select from multiple endpoints if available.
    For this example, let's leave the value as is and use the https endpoint.
    Optional: You can use the Test Connection button to test the connectivity to the endpoint as well as to download the catalog.
  9. Save the record again.

The Open API connection should look like the following screenshot:

Open API connection
Open API Connection

section 2Creating the Connector to Retrieve the Health Status

In this section, you will create a connector that retrieves the health check summary of the instance.

  1. On the Orchestrator Studio Home page, click the Connectors icon.
  2. On the Connectors page, click the New button and select Open API.
  3. On the Connectors page, complete the following fields:
    ■ Name:  Health Check SR
    ■ Description: Health check of the instance
  4. In the Open API drop-down list, select the Connection for Health Check - HEALTH CHECK. connection that you created in the previous section.
  5. Click the API drop-down list and select /health.  The system may populate this value automatically along with the HTTP Method of POST.
  6. Modify the Body section to only request the health of one instance.
    {
    "instanceName": "${instanceName}"
    }
  7. Remove the TOKEN and AUTHORIZATION rows from the Headers section (Click X).
    Only Content-Type and Accept will remain.
  8. Save the connector. Now, you can test the connector to view the output.
  9. Click the Test button (Note: Do not confuse this with the Test Connection button.)
  10. In the dialog window, enter the name of a managed instance, then click Execute. Wait for the service to complete.
  11. Execute
    Execute
  12. Verify that the dialog window displays the output of the service call as shown in the following screenshot:
  13. Response Section
    Response Section
  14. Close the dialog (Click the X button).
    Now that we know the output of the service, we can configure the connector to return only the values we need.
  15. Expand the Response and Output sections.
  16. In the output section, populate the following rows, using JSON path notation for the output array.
    The array in the response is instanceHealths. Since we only need the first record, the index is zero.

    The fields required from the records in the output array are: healthStatus, instanceStatus, executedOn.

    We will also include variables for these three values so that we can use them in the message step later. Add these names to the Variable Name column as shown in the following screenshot:
  17. Output
    Output
  18. Save the connector request. The Health Check SR connector should look like this:
  19. Health Check SR Connector
    Health Check SR Connector
  20. Click Test again to test the final connector output.
  21. In the dialog window, enter the instance name and wait for the service to complete.
  22. Click the Show Output button.
  23. Verify that the output contains only the three defined values.
  24. Response
    Response
  25. Close the window.

section 3Creating an Orchestration that Calls the Connector

In this section, you will create an orchestration to perform health check of an instance. This task involves creating an orchestration using the Health Check SR connector that you created in the previous section.

  1. From the Orchestrator Studio, access the Connector page and open the Health Check SR connector.
  2. Click the Manage drop-down list, and click Create Orchestration. The system will automatically create an  orchestration, and the orchestration page is displayed. Save the new orchestration.
    You can see that the new orchestration is created with the Health Check SR step with mapped inputs and selected outputs.
  3. On the Orchestration design page, change the values in these fields:
    ■ Orchestration: Health Check Orchestration
    ■ Description: Orchestration to perform health check
  4. Click Save. Verify the automatically mapped inputs.
  5. Click the Start icon of the orchestration and then click Inputs and Values. Verify that the window displays one input:  instanceName. Enable the Required option for the instanceName Input.
  6. Inputs and Values Window
    Inputs and Values Window
  7. Click anywhere outside the Inputs and Values window to close the window. Click the Heath Check SR step in the orchestration, and then click the Transformations icon. Verify that the system displays one mapping for instanceName.
  8. Transformations Window
    Transformations Window
  9. Click anywhere outside the Transformations window to close it. In the orchestration, click the End icon, and then click Outputs and Assertions.
  10. Change the values in the Output column to simplify the outputs by removing the instanceHealths[0] portion of the name. Enable the Select option for the three values if they are not already selected. The outputs should look like this:
  11. Outputs and Assertions Window
    Outputs and Assertions Window
  12. Save the Orchestration.
  13. To test the orchestration, double-click the Start icon.
  14. In the Run Orchestrations window, in the Name filed, enter an instance name.
  15. In the Inputs section, enter values for the following inputs:
    ■ instanceName
  16. Click Run.
  17. The test result should look like this:
  18. Run Orchestrations Window
    Run Orchestrations Window

section 4Creating a Message to Send the Health Check Summary

In this section, you will add a message step to the orchestration to send the health check summary.

  1. Access the Health Check orchestration.
  2. Double-click on the line segment between the Health Check SR and End icons. In the New Step Type window, click Message.
    Alternatively, you can click the Design Mode button and click the + icon to add a new Message step.
  3. Message Step
    Message Step
  4. Click New.
  5. On the Message page, complete these fields:
    ■ Name: Health Check Message
    ■ Description: Health check of an instance
  6. In the To field, select Address Book Address as the recipient’s name.
  7. In the Address Book field, enter ${toAddress} as a variable.
  8. In the Subject field, enter Health Check Report ${instanceName}.
  9. In the body field, enter the following message:
    Hi,
    Please find the Heath Report for the ${instanceName} instance as follows: Health Status: ${healthStatus}
    Instance Status: ${instanceStatus}
    Execution Time: ${executedOn}
  10. Save the message.
  11. The Health Check Message request should look like this:
  12. Message Window
    Message Window
  13. Click X to close the message.
    The system adds the new message step to the orchestration.
  14. Click the Start icon and then click the Inputs and Values icon. In the Orchestration Inputs tab, add toAddress in the Input field, and enable the Required option.
  15. Inputs and Values Window
    Inputs and Values Window
  16. Click the message step and then click the Transformations icon.
  17. Click the Auto Map button. Verify that the Transformations windows looks like the following screenshot:
  18. Transformations Window
    Transformations Window
  19. Click the End icon and click Outputs and Assertions.
  20. Enable the Select option for success output from the message step. Change the name to Message Success.
    Note: Earlier releases may not enable you to perform this step, but the message will still be sent.
  21. Health Check Message
    Health Check Message
  22. Save the Orchestration

section 4Testing the Final Orchestration

In this section, you will use the Run Orchestration page to test the orchestration and verify that it returns the output as defined in the orchestration and sends the email message.

  1. Access the Health Check Orchestration and double-click the Start icon.
    Alternatively, you can also use the Tools menu and select Run Orchestrations
  2. In the Inputs area, enter values for the following inputs:
    instanceName
    toAddress: Enter the address number associated with your EnterpriseOne user
  3. Click Run.
  4. Verify that the test result looks like the following screenshot:
  5. Run Orchestrations Window
    Run Orchestrations Window
  6. From the Tools menu, click JD Edwards EnterpriseOne.
  7. In the user drop-down list in EnterpriseOne, click Manage Notifications, and then click Message Center.
  8. Message Center
    Message Center
  9. Click the Work Center tab, expand Personal In Basket.
  10. Click the Health Check Report message received.
  11. Verify that the message you received looks like the following screenshot:
  12. Message Center Window
    Message Center Window

more informationWant to Learn More?