Oracle Integration - ERP Cloud Events Lab

Oracle Documentation

Background

Oracle Integration provides native connectivity to Oracle and non-Oracle Software as a Service (SaaS) and On-premises applications, such as Oracle ERP Cloud, Oracle Service Cloud, Oracle HCM Cloud, Salesforce.com, Workday, EBS, SAP, NetSuite and so on. Oracle Integration adapters simplify best practice connectivity to these applications by handling many of the underlying technical complexities often encountererd when integrating applications.


Use Case

This use case explores the use of Oracle Integration to subscribe to Oracle ERP Cloud Events and push the relevant event information to downstream systems. As part of the lab you will build the following use case scenario:

  • You create and activate an integration that subscribes to an ERP Cloud Purchase Order (PO) event.
  • You then create a PO in ERP Cloud and a PO event is triggered.
  • Your integration receives the PO event and pushes the data into a Visual Builder Web App.

The following diagram shows the runtime interaction between the systems involved in this use case:


Before You Begin

Some steps in this tutorial have a Copy to Clipboard icon next to them. Click this icon to copy the snippet of text to your clipboard and then paste where needed.

Your instructor will provide you the information you need to access the environments used in this lab.


For this lab we will provide you the following:

  • Oracle Integration
  • ERP Cloud

Get Your Oracle Integration (OIC) Environment

Select your OIC Environment and enter your User Number to get the information needed to access Oracle Integration.

Select your OIC environment

 


Get Your ERP Cloud Environment

Select your ERP Cloud Purchasing environment to get the information needed to access Oracle ERP Cloud.

ERP Cloud Environment


Sign In

  1. Open your Oracle Integration instance.

  2. Enter your user name and password.

    Your password will be provided by the instructor.
  3. Click Sign In.

    The Home page appears.

    You are now logged in and ready to use Oracle Integration.


Create the PO Event Integration

  1. On the Home page, click Integrations, and then click Integrations.
  2. On the Integrations page, click Create.
  3. In the Select Integration Style dialog, select App Driven Orchestration.
  4. Click Select.
  5. In the Create New Integration dialog, configure the integration:
    1. What do you want to call your integration?

      Enter ERP Cloud PO Event

    2. In the What does this integration do? field, enter:

      This integration shows how to use the Oracle Integration ERP Cloud adapter to subscribe to ERP Cloud business events.

  6. Click Create.

Create the ERP Cloud PO Event Trigger

  1. Hover over START and click Add icon.
  2. Begin typing ERP Cloud in the Search field to find the connection to your ERP Cloud environment.
  3. Select the connection named ERP Cloud.

    The Configure Oracle ERP Cloud Endpoint wizard appears.

  4. Name your endpoint POEvent.
  5. In the What does this endpoint do? field, enter:

    This endpoint subscribes to the ERP Cloud Purchase Order business event.

  6. Click Next.
  7. On the Request page, configure the request properties:
    1. From the Define the purpose of this trigger options, select Receive Business Events raised within ERP Cloud.
    2. In the Business Event For Subscription field, begine typing Purchase Order Event.
    3. Select Purchase Order Event.

    4. In the Filter Expr for Purchase Order Event field, enter the following expression:

      <xpathExpr xmlns:ns0="http://xmlns.oracle.com/apps/prc/po/editDocument/purchaseOrderServiceV2/" xmlns:ns2="http://xmlns.oracle.com/apps/prc/po/editDocument/purchaseOrderServiceV2/types/">$eventPayload/ns2:result/ns0:Value/ns0:PurchaseOrderLine/ns0:ItemDescription="Lan Cable "</xpathExpr>
    5. Click Next.
  8. On the Response page, from the Response Type options, select None.
  9. Click Next.

    A summary of the properties you configured appears.

  10. Review the summary and click Done.
  11. On the Integration canvas, from the Layout list, select Horizontal.

  12. Click Save to save the integration.

Create the Create Purchase Order Activity

  1. Hover over the outgoing arrow for the POEvent activity and click Add icon.
  2. In the Search field, begin typing Visual Builder to find your connection.
  3. Select the connection named Visual Builder.

    The Configure REST Endpoint wizard appears.

  4. In the Basic Info page, configure the endpoint:

    1. Name your endpoint CreatePO.
    2. In the What does this endpoint do? field, enter:

      This endpoint creates a purchase order record in a Visual Builder application.

    3. In the relative resource URI, enter:

      /ic/builder/design/PurchaseOrders/1.0/resources/data/PO

      This is the relative URI to a Visual Builder application API. The Visual Builder connection specifies the base URL to your OIC environment which combined with relative URI defines the complete API endpoint.

    4. In the action to perform on the endpoint field, select POST.
    5. In the options that you want to configure section, select:

      • Configure a request payload for this endpoint
      • Configure this endpoint to receive the response
  5. Click Next.
  6. On the Request page, configure the following values:

    1. From the Select the request payload format list, select JSON Sample.

    2. Click the <<<inline>>> link.
    3. Enter the following JSON sample:
      {
                  "pOHeaderId": "300000074157551",
                  "orderNumber": "163521",
                  "procurementBUId": "300000046987012",
                  "procurementBusinessUnit": "US1 Business Unit",
                  "supplierId": "300000047414679",
                  "supplier": "Dell Inc.",
                  "soldToLegalEntity": "US1 Legal Entity"
      }
    4. Click OK.
  7. Click Next.
  8. On the Response page, configure the following values:

    1. From the Select the response payload format list, select JSON Sample.

    2. Click the <<<inline>>> link.
    3. Enter the following JSON response sample:
      {
                  "id": 41,
                  "creationDate": "2019-01-22T17:32:24+00:00",
                  "lastUpdateDate": "2019-01-22T17:32:24.027+00:00",
                  "createdBy": "john.doe@example.com",
                  "lastUpdatedBy": "john.doe@example.com",
                  "pOHeaderId": "300000074157551",
                  "orderNumber": "163521",
                  "procurementBUId": "300000046987012",
                  "procurementBusinessUnit": "US1 Business Unit",
                  "supplierId": "300000047414679",
                  "supplier": "Dell Inc.",
                  "soldToLegalEntity": "300000046973970", 
                  "lOCId": null,
                  "soldToLegalEntity": "300000046973970", "lOCId": null
      }
    4. Click OK.
  9. Click Next.

    A summary of the properties you configured appears.

  10. Review the summary and click Done.
  11. Click Save to save the integration.

Define the Data Mapping

A Map action named Map to CreatePO is automatically created. We'll define this data mapping.

  1. Click the action Map to CreatePO and click Edit icon.

    The Map to CreatePO page appears.

    In a couple of seconds, you should see a Recommendations Available popup appear

  2. Click Recommend icon Recommend.

    The recommended mapping appears:

  3. From the Strength list, select Medium.

  4. Click Apply Recommendations icon Apply Recommendations.

    A confirmation message appears informing you that the recommendations were applied.

  5. Click Validate.

    A confirmation message appears.

  6. Click Close.
  7. Click Save to save the integration.

Define the Tracking Fields

  1. In the Integration canvas, you should see an error icon Error icon next to the Last Saved field.

    The icon shows the number of errors you need to fix in your integration. You should have one error. To fix this error you need to add business tracking identifiers.

  2. On the Integration canvas, click Actions icon , and then select Tracking.

    Tracking selection

    The Business Identifiers for Tracking dialog appears.

  3. In the Source search field, enter ordernumber and click Search icon.
  4. From the Source section, select OrderNumber, and then click Edit icon.

    The Order Number field appears in the Tracking Fields table.

    This defines how to identify your instances in the Monitoring console.

  5. Click Save.

    Notice there are no errors.

  6. On the Integration canvas, click Save, and then click Close.

Activate the Integration

  1. On the Integrations page, locate your integration and hover over it.

    The name of your integration is ERP Cloud PO Event .

    When you hover over the integration, a set of actions appear in the Status column.

  2. Click Activate icon.
  3. Select Enable Tracing, and then select Include Payload.

    Typically these options are disabled in production environments, but we'll enable them for the purpose of this lab.

  4. Click Activate.

    The activation will complete in a few seconds. If the activation succeeds, a confirmation message appears at the top of the page, and the status will change to Active.


Testing the Integration

  1. Open a browser and sign in to ERP Cloud using the following information:

    1. ERP Cloud URL:
    2. ERP Cloud User Name:

    3. ERP Cloud Password: Your password will be provided by the instructor.
  2. Select the Procurement tab.
  3. Click Purchase Orders.
  4. Click Add icon.

    The Tasks menu appears.

  5. In the Orders section, click Create Order.

    The Create Order dialog appears.

  6. In the Supplier field, enter Dell Inc. and from the list that appears, select Dell Inc..
  7. Click Create.
  8. On the Edit Document (Purchase Order) page, in the Additional Information section, click Add Row icon

    A new row appears in the Lines table.

  9. Enter the following values for the columns in the new row:

    1. Type: select Goods.
    2. Description:
      Enter Lan Cable .
    3. Category Name: click Search: Category Name icon, search for Computer Supplies, and then select it.
    4. Quantity: enter 1.
    5. UOM: click ▼ and select Ea from the dialog that appears.
    6. Base Price: enter 1.00.
  10. Click Submit to create the purchase order.

    A confirmation message with the purchase order number appears.

  11. Copy the order number.

Verify the Order Was Created

  1. Click Add icon.

    The Tasks menu appears.

  2. In the Orders section, click Manage Orders.

  3. In the Order field, enter the order number you wrote down.
  4. Click Search.

    Your order appears in the search results.

  5. Verify that the order status is Open.

    If the status isn't Open, wait a couple of minutes and run the search again until the status changes to change to Open.

Review your integration

  1. Open Oracle Integration.
  2. Click Integrations in the top level navigation pane to return to Home.


    Home

  3. From Home, click Monitoring, then Integrations, then Tracking.
  4. Look for a completed integration with your Order Number.
  5. Click your Order Number link to open the integration instance.

    The flow is colored in green to indicate that it ran successfully.

  6. Click Menu and select View Activity Stream.


    Activity Stream

  7. Review the flow and messages from your integration.
  8. Click Close when done reviewing.

Run the Web Application

  1. Open the following link to a Visual Builder Web App and verify your Purchase Order was created in the app:

  2. If prompted, enter your user name and password.

    Your password will be provided by the instructor.
  3. Click PO List Page.
  4. Verify that your purchase order was created in the Visual Builder Web App.

Congratulations!

Congratulations! You have finished your integration and learned how to subscribe to ERO Cloud business events.