diff --git a/oic-gen3/cookbooks/erp-cloud/business-services/create-connections/create-connections.md b/oic-gen3/cookbooks/erp-cloud/business-services/create-connections/create-connections.md new file mode 100644 index 0000000..078fadc --- /dev/null +++ b/oic-gen3/cookbooks/erp-cloud/business-services/create-connections/create-connections.md @@ -0,0 +1,112 @@ +# Create and Configure Connections + +## Introduction + +This lab will walk you through the steps to create connections for all the services which will be used in the Integration Flow. + +Estimated Time: 10 minutes + +### Objectives + +In this lab, you will: + +- Create REST connection using REST adapter +- Create ERP Cloud connection using ERP Cloud adapter + +### Prerequisites + +This lab assumes you have: + +- Completed all the previous labs + +## Task 1: Create REST Connection using REST adapter + +> **Note: Ignore this section if you have a REST Interface connection created already in your Project as part of one of the previous labs.** + +Create a connection with the REST Adapter. + +1. In the left Navigation pane, click ***Projects***, click on the project which you have created. + You may skip this step if you are already in the project. +2. In the **Connections** section, click ***Add*** to create a new connection. +3. In the *Create Connection* dialog, select the **REST** adapter. To find the adapter, enter *REST* in the search field. Click on the highlighted adapter. +4. In the *Create Connection* dialog, enter the following information and click on ***Create***: + + | **Field** | **Value** | + | --- | ----------- | + | Name | REST Interface | + | Role | Trigger | + | Description | REST Interface Connection for OIC LiveLabs | + + Keep all other values as default. + +> **Note: If you are a Bootcamp user then execute step 5 ONLY and skip the other steps. +If you are a non Bootcamp user then skip step 5 and continue from step 6..** + +5. In the *Use a shared Connection* section search for **REST Interface** and select the connection which is already created/shared in the Training instance. Exit the connection canvas by clicking the back button on the top left side of the screen. + +Please note that the connection with the name **REST Interface** is already created in your training instance, which is configured and shared with other projects. Although both the connections names are similar, they exist in the different projects. You can share adapter connection resources across projects. For example, you may have two projects that need to integrate with a common system, such as Oracle ERP Cloud. The connection you created is referencing the shared connection in the instance. + +![Shared Connection](images/connection-sharing.png) + +6. In the *Configuration* page, enter the following information: + + | **Field** | **Values** | + |---|---| + |Security Policy | OAuth 2.0 Or Basic Authentication | + +7. Click on ***Test*** and wait until you receive a confirmation box that the test was successful. +8. Click ***Save*** and wait for the confirmation box. Exit the connection canvas by clicking the back button on the top left side of the screen. + +## Task 2: Create ERP Cloud Connection using ERP Cloud adapter + +> **Note: Ignore this section if you have a ERP Cloud connection created already in your Project as part of one of the previous labs.** + +Create a connection with the Oracle ERP Cloud Adapter. + +1. In the left Navigation pane, click ***Projects***, click on the project which you have created. + You can please skip this step if you are already in the project. +2. In the **Connections** section, click ***Add*** to create a new connection. + +3. In the *Create Connection* dialog, select the ***Oracle ERP Cloud*** adapter to use for this connection. To find the adapter, enter `erp` in the search field. Click on the highlighted adapter. +4. In the *Create Connection* dialog, enter the following information and click on ***Create***: + + | **Field** | **Value** | + | --- | ----------- | + | Name | `ERP Cloud` | + | Description | `ERP Cloud Connection for OIC LiveLabs` | + + Keep all other values as default. + + > **Note:** If you are a Bootcamp user then execute step 5 only and skip other steps. + If you are a non Bootcamp user then skip step 5 and continue with other steps.. + +5. Search for **ERP Cloud**, Please note that the connection with the name **ERP Cloud** is already created by the instructors, configured and shared with other projects. +Do not get confused with the same name, both the connections are in the different projects so, we are good with it. And click on **ERP Cloud** and click on **Save**. Exit the connection canvas by clicking the back button on the top left side of the screen. + +6. In the *Oracle ERP Cloud Connection* dialog, enter the following information: + + | **Field** | **Values** | + |---|---| + |ERP Cloud Host | `your-erp-host-name` | + |Security Policy | **Username Password Token**| + |Username | ``| + |Password | ``| + +7. Click on ***Test*** and wait until you receive a +confirmation box that the test was successful. + + > **Note:** The first time you run the test, it could take up to 2 minutes for completion. + +8. Click ***Save*** and wait for the confirmation box. Exit the connection canvas by clicking the back button on the top left side of the screen. + +You may now **proceed to the next lab**. + +## Learn More + +- [Using the REST Adapter with Oracle Integration 3](https://docs.oracle.com/en/cloud/paas/application-integration/rest-adapter/index.html) +- [Using the SOAP Adapter with Oracle Integration 3](https://docs.oracle.com/en/cloud/paas/application-integration/soap-adapter/index.html) + +## Acknowledgements + +* **Author** - Subhani Italapuram, Product Management, Oracle Integration +- **Last Updated By/Date** - Kishore Katta, November 2024 diff --git a/oic-gen3/cookbooks/erp-cloud/business-services/create-connections/images/connection-sharing.png b/oic-gen3/cookbooks/erp-cloud/business-services/create-connections/images/connection-sharing.png new file mode 100644 index 0000000..aa08730 Binary files /dev/null and b/oic-gen3/cookbooks/erp-cloud/business-services/create-connections/images/connection-sharing.png differ diff --git a/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/business-services-integration.md b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/business-services-integration.md new file mode 100644 index 0000000..19b36c6 --- /dev/null +++ b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/business-services-integration.md @@ -0,0 +1,524 @@ +# Business Services Integration + +## Introduction + +This lab walks you through the steps to create an Integration flow which invokes ERP Cloud REST API. + +This Lab explores the use of Oracle Integration to invoke Oracle ERP Cloud Business Services which +validates the data on the fly and creates a Payables Invoice in ERP Cloud. As part of the lab you will build the following use case scenario: + +1. You create and activate an integration that invokes Business services for example Financials Business Unit, Suppliers LOV and Invoice REST API. The Integration flow validates data from source Request and conditionally creates Invoices after Validation. +2. You then trigger the Integration flow from Oracle Integration Tester. +3. Your integration receives the request, validates various data elements and finally creates an Invoice in ERP Cloud + + The following diagram shows the runtime interaction between the systems involved in this use case: + ![Create Invoice Architecture](images/create-invoice-architecture.png) + +### Components and Flow Description + +The diagram illustrates a high-level overview of an integration process between a **REST Interface**, **Oracle Integration**, and **ERP Cloud** with a focus on business services in the ERP Cloud application. + +1. **User Input**: The process begins with a user providing an invoice and line details in JSON format, which is sent to the OIC. +2. **OIC Processing**: Within OIC, several validation steps occur: + - **Validate Business Unit**: Ensures the business unit provided in the invoice data is valid. + - **Verify Supplier Exists**: Checks if the supplier exists in the ERP Cloud system. + - **Search Supplier Site**: Validates the supplier site associated with the invoice. +3. **Invoice Creation**: Once all validations pass, OIC invokes Oracle ERP Cloud's transactional services through REST APIs to create the invoice and associated line items. +4. **Response**: After successfully creating the invoice, a status response is sent back to the user, completing the flow. + +This integration leverages OIC's ERP Cloud adapter to facilitate seamless communication with ERP Cloud's REST API, enabling the creation of invoices based on validated input data. + +Estimated Time: 20 minutes + +### Objectives + +In this lab, you will: + +- Understand how to use ERP Cloud Adapter Connection as invoke role +- Invoke ERP Cloud REST Services for Validation/Enrichment +- Use Global Variables and Data Stitch to store intermediary results +- Configure Custom Fault Response to the Client + +### Prerequisites + +This lab assumes you have: + +- All previous labs successfully completed. + +## Task 1: Create the Invoice Validation Integration + +1. In the left Navigation pane, click ***Projects***, click on the project which you have created. + You can please skip this step if you are already in the project. +2. In the **Integrations** section, click ***Add***. +3. On the *Add integration* dialog, click ***Create***. +4. On the *Create integration* dialog, Click on ***Application***. +5. In the *Create integration* dialog, enter the following information: + + | **Element** | **Value** | + | --- | ----------- | + | Name | `Invoice Validation` | + | Description | `ERP Business Services Integration` | + + Accept all other default values. + +6. Click ***Create*** + + > **Note:** If you get an error that the identifier already exists, change the Integration Name by suffixing username or so and remember this name for later use in the workshop. + +7. Optional, Select Layout to ***Horizontal*** and Click ***Save*** to apply changes. + +## Task 2: Create the REST Interface Trigger + +1. Click the ***+*** sign below **START** in the integration canvas. + +2. Begin typing ***REST Interface*** in the Search field to find the connection to your REST interface which is created in one of the previous labs. + +3. Select the connection named ***REST Interface*** +The Configure REST Endpoint wizard appears. + +4. On the **Basic Info** page, + - for the **What do you want to call your endpoint?**, enter ***createInvoice*** + - for the **What does this endpoint do?**, enter ***This endpoint defines the REST interface*** + - Click ***Continue*** + +5. On the Resource Configuration page, + - for the **What does this operation do?**, enter ***Creates Invoice in ERP Cloud*** + - for the **What is the endpoint's relative resource URI:**, enter ***/createInvoice*** + - for the **What action do you want to perform on the endpoint?:**, enter select ***POST*** + - Select ***Configure request payload for this endpoint*** + - Select ***Configure this endpoint to receive the response*** + - Click ***Continue*** + +6. On the **Request** Page + - Select the **Request Payload Format** to ***JSON Sample*** + - Click the ***<<<inline>>>*** link. + - Provide the below JSON and Click ***Continue*** (Scroll down to see the Ok button) + + ``` + + { + "InvoiceNumber" : "XX_INV_ABC_0001", + "InvoiceCurrency" : "USD", + "InvoiceAmount" : 600, + "InvoiceDate" : "2021-01-01", + "BusinessUnit" : "US1 Business Unit", + "Supplier" : "ABC Consulting", + "SupplierSite" : "ABC US1", + "Description" : "Invoice Created using OIC", + "invoiceLines" : [ { + "LineNumber" : 1, + "LineType" : "Item", + "LineAmount" : 500, + "Description" : "Line 1 Description", + "ProrateAcrossAllItemsFlag" : true + }, { + "LineNumber" : 2, + "LineType" : "Item", + "LineAmount" : 100, + "Description" : "Line 2 Description", + "ProrateAcrossAllItemsFlag" : true + } ] + } + + ``` + + - In the **What is the media-type of Request Body?** Select ***JSON*** (By default, this option is selected if not, you need to select) + - Select ***Continue*** + +7. On the **Response** Page, + - Select the **Request Payload Format** to ***JSON Sample*** + - Click the ***<<<inline>>>*** link. + - Provide the below JSON and Click ***Continue*** (Scroll down to see the Ok button) + + ``` + + { + "InvoiceId" : 300000245076423, + "InvoiceNumber" : "XX_INV_ABC_0002", + "InvoiceCurrency" : "USD", + "PaymentCurrency" : "USD", + "InvoiceAmount" : 2500, + "InvoiceDate" : "2021-01-01", + "BusinessUnit" : "US1 Business Unit", + "Supplier" : "ABC Consulting", + "SupplierNumber" : "1288", + "SupplierSite" : "ABC US1", + "InvoiceGroup" : null, + "AccountingDate" : "2021-01-01", + "Description" : "Invoice Created using OIC" + } + + ``` + + - In the **What is the media-type of Response Body?** Select ***JSON***(By default, this option is selected if not, you need to select) + - Select ***Continue*** and Click ***Finish*** on Summary page. + - Click ***Save*** to apply changes. + +## Task 3: Configure Validate Business Unit + +1. Hover over the outgoing arrow for the **Trigger createInvoice** activity and click ***+*** + +2. Begin typing ***ERP Cloud*** Service in the Search field and Select the ERP Cloud Connection + +3. In the **Basic Info** page, name your endpoint ***validateBusinessUnit***. Click ***Continue*** + +4. In the **Actions** page, Select ***Query,Create,Update or Delete Information***. Click ***Continue*** + +5. On the **Operations** page, + - In the **Browse by** list of values, Select ***Business (REST) Resources*** + - for **Select a Service Application**, Select ***fscmRestApp*** + - for **Select a Business Resource**, search for ***FinBusinessUnitsLOV*** and select + - **Select the operation** as ***getAll*** and click ***Continue*** + +6. On the **Summary** page, Select ***Finish*** + +## Task 4: Define the Data Mapping (validateBusinessUnit) + +A Map action named Map to validateBusinessUnit is automatically created. We'll define this data mapping. + +1. Select the ***Map validateBusinessUnit*** action. Click on ***...*** and select ***Edit*** from the menu. The **Data Mapping** page appears + +2. In the Target section, expand ***Query Parameters*** + +3. Use the mapper to drag element nodes in the source createInvoice Request structure to element nodes in the target validateBusinessUnit Request structure. + + Expand the **Source** node: + createInvoice Request > Request Wrapper + + Expand the **Target** node: + validateBusinessUnit Request > Query Parameters + + Complete the mapping as below, right click on ***Query***, click on **Create target node** and click on **Switch to developer view** and copy and paste ***concat("BusinessUnitName=",)*** and drag and drop **BusinessUnit** from the Source after **comma** + ![mapbu1](images/mapbu1.png =30%x30%) + ![mapbu1](images/developer-view.png =50%x50%) + + | **Source** | **Target** | + | --- | ----------- | + | concat("BusinessUnitName=", /nssrcmpr:execute/nssrcdfl:request-wrapper/nssrcdfl:BusinessUnit) | Query | + + ![MapValidateBusinessUnit](images/map-validate-bu.png) + + > **Note:** The xpath expression namespace might vary. So, always drag the element which will capture the correct namespace. + You can drag functions from the Component section, expand Functions, and then expand String Category + +4. Click the ***Tick Mark*** in the expression editor. Click ***Validate***. A message confirming the expression is valid appears. Click ***< (Go back)*** and ***Save*** the Integration Flow. +5. Click ***Save*** to persist changes. + +## Task 5: Check for Business Unit + +Let's check if the Business Unit sent in the Request payload is Valid or not. + +1. Click ***Actions*** icon and from the **Collection** section, drag ***Switch*** to the **Integration** Canvas and place it after the **validateBusinessUnit** activity + ![Check for BusinessUnit](images/checkforbu.png) + + You need to define two branches: + - Route1 branch: this branch checks the **count of items**. If the expression evaluates to true, the instance follows the flow in this branch. + - Otherwise branch: the instance follows this branch when the routing expression for the initial branch resolves to false. We will configure a fault return if the Business Unit is Invalid. + +### *Add the branches* +1. Select ***Switch*** and Click on **...** and select **Add** and click on **Otherwise**. +2. You should see two branches, one is **Route1** and another one is **Otherwise** + ![switch condition branches](images/switchbranches.png) + +### *Define the Route1 flow* + +1. Select ***Route1*** and click on **...** and click on **Edit** +The Expression builder appears +2. Define an expression to check if any business units returned per the query parameter. + + - In the **Expression Name** field, enter ***BusinessUnitFound*** + - In the **Source** section, select $validateBusinessUnit/getAllResponse/items + - Drag and Drop items on to the right side section. + - Click on **Switch to Developer View** and Formulate the expression as count($validateBusinessUnit/nsmpr5:getAllResponse/nsmpr5:items). This returns # of items nodes + +3. select **=** as a operator, and enter ***1.0*** in the **Value** field as shown in the image given below. + ![Route1](images/switch-route-1.png) + +4. Click ***Route 1*** OR on anywhere on the Canvas to come out of the expression builder. +5. Click ***Save*** to persist changes. + +### *Invoke Create Invoice* + +1. Click ***+*** under **Route1** activity + +2. Begin typing ***ERP Cloud*** Service in the Search field and Select the ERP Cloud Connection + +3. In the **Basic Info** page name your endpoint ***createERPInvoice*** and click ***Continue*** + +4. In the **Actions** page Select ***Query,Create,Update or Delete Information***. Click ***Continue*** + +5. In the **Operations** page + - In the **Browse by** list of values, Select ***Business (REST) Resources*** + - for **Select a Service Application**, Select ***fscmRestApp*** + - for **Select a Business Resource**, search for ***Invoices*** and Select it + - for **Select the operation**, select ***create*** + - click ***Continue*** + - for **Child Resource** Select ***invoiceLines*** and Move to the **Your Selected Child Resource(s)** box. + - click ***Continue*** + - In the **Select Flexfield contexts**, Do not Select anything and Click ***Continue*** + + ![createinvoicesummary](images/createinvoicesummary.png) + +6. In the **Summary** page Select ***Finish*** + + ![createERPInvoice](images/create-erp-invoice.png) +7. Click ***Save*** to persist changes. + +### *Define the Mapping Map to createERPInvoice* + +A Map action named Map createERPInvoice is automatically created. We'll define this data mapping. + +1. Select the ***Map createERPInvoice*** action. Click on the ***...*** icon. Click the ***Edit*** icon. The **Data Mapping** page appears + +2. Use the mapper to drag element nodes in the source **createInvoice** Request structure to element nodes in the target **createERPInvoice** Request structure. + + Expand the **Source** node: + createInvoice Request > Request Wrapper + + Expand the **Target** node: + createInvoice Request > Invoices + + Complete the mapping per below: + + | **Source** | **Target** | + | --- | ----------- | + | Invoice Number | Invoice Number | + | Invoice Currency | Invoice Currency | + | Invoice Amount | Amount | + | Invoice Date | Invoice Date | + | Business Unit | Business Unit | + | Supplier | Name | + | Supplier Site | Site | + | Description | Description | + | Invoice Lines | Invoice Lines | + | Invoice Lines > Line Number | Invoice Lines > Line Number | + | Invoice Lines > Line Type | Invoice Lines > Line Type | + | Invoice Lines > Line Amount | Invoice Lines > Line Amount | + | Invoice Lines > Description | Invoice Lines > Description | + | Invoice Lines > Prorate Across All Items Flag | Invoice Lines > Prorate Across All Item Lines | + + > **Note:** You can easily find a Source or Target Element by using the Search functionality + +3. Click ***Validate***. A message confirming the expression is valid appears. Click on ***< (Go back)*** and ***Save*** the Integration Flow. + +### *Define the Global Variable* + +Define Global Variable to store the createInvoice Response. We need this because the createInvoice Response variable is created automatically within the scope of the Switch condition. To access the response payload we will use Data Stitch Activity to achieve the requirement. + +1. Select ***(x)*** Global Variables from the Right-hand side palette + +2. Select ***Add Variable***. + +3. Provide **Name** as ***invoice\_response\_var*** and Select **Type** as ***Object***. This brings up the Sources pane with all the variables. Expand ***$createERPInvoice > createResponse >***. Drag and drop ***Invoices*** variable onto the right side pane. + + ![Create Global Variable](images/data-stitch-invoice-variable.png) + +4. Close the Global Variables pane. + +5. ***Save*** the the Integration Flow + +6. Hover over the outgoing arrow for the **createERPInvoice** activity and click ***+***. Search for **Data Stitch** activity. (Alternatively, you can drag from the **Actions** palette) + +7. A pane for the Data Stitch activity appears. Here we select the Variable and Values. + + - Enter the activity name as ***storeInvoiceResponse*** + - Select the Tools Icon next to the **Variable (x)** box to Switch to Developer View. From the **Sources** view select ***$invoice\_response\_var*** drag and drop onto the **Variable (x)** box. + - Select **Operation** as ***Assign*** + - In the **Value (x)** box (Switch to Developer view if required) Select ***$createERPInvoice > createResponse > Invoices*** drag into the **Value (x)** box + - Click on Stitch activity which will close the Data Stitch pane automatically + ![Create Data Stitch Variable](images/data-stitch-activity.png) + +### *Define the Response mapping (createInvoice)* + +The response we got from ERP Cloud for **createERPInvoice** must be mapped to the Integration Flow response to send back to the client. We will be mapping only a few elements to indicate that a New Invoice is Created in ERP Cloud. + +1. Select the ***Map createInvoice***, Click ***...*** and Click ***Edit*** + +2. Use the mapper to drag element nodes in the source **invoice\_response\_var** Request structure to + element nodes in the target **createInvoice Response** Request structure. + + Expand the source node ***invoice\_response\_var*** and ***Invoices*** + + Expand the **Target** node: + + createInvoice Response > Response Wrapper + + Complete the mapping per below: + + | **Source** | **Target** | + | --- | ----------- | + | Invoice Id | Invoice Id | + | Invoice Number | Invoice Number | + | Invoice Currency | Invoice Currency | + | Payment Currency | Payment Currency | + | Amount | Invoice Amount | + | Invoice Date | Invoice Date | + | Business Unit | Business Unit | + | Name | Supplier | + | Supplier Number | Supplier Number | + | Site | Supplier Site | + | Invoice Group | Invoice Group | + | Accounting Date | Accounting Date | + | Description | Description | + +3. Click ***Validate*** and click on ***< (Go back)***. ***Save*** the Integration Flow + +### *Define the Otherwise conditional flow* + +1. Click ***+*** under **Otherwise** activity and select ***Fault Return*** Activity. This activity returns a Custom Fault + +2. Select the ***Map createInvoice*** to configure Fault details. + +3. Expand the Target **createInvoice Fault** and map per the following + + | **Source** | **Target** | + | --- | ----------- | + | "Invalid Business Unit" | Title | + | "The value for the Business Unit attribute is invalid. You must provide a valid value" | Detail | + | "400" | Error Code | + + > **Note:** If the Target element is greyed out, Select the target node and Right Click "Create Target Node" which brings up the Expression Editor + +4. Select ***Validate*** and click on ***< (Go back)*** +5. Your final Integration Flow should look as below + ![Final Integration Flow](images/final-integration-flow.png) + +## Task 6: Define Tracking Fields + +1. Manage business identifiers that enable you to track fields in messages during runtime. + + > **Note:** If you have not yet configured at least one business identifier **Tracking Field** in your integration, then an error icon is displayed in the design canvas. + +2. Click the ***(I)*** on the top right + ![Open Business Identifiers For Tracking](images/open-business-identifiers.png) + +3. From the **Source** section, expand ***execute > request-wrapper***, Drag the ***InvoiceNumber*** , ***BusinessUnit*** and ***InvoiceDate*** fields from Source to the *Business Identifier Field* section: + + ![Assign Business Identifiers](images/assign-business-identifiers.png) + +4. Click ***(I)*** + +5. On the Integration canvas, click ***Save***, followed by ***< (Go back)***. + +## Task 7: Activate the integration + +1. In the **Integrations** section, Click on **...** of the Integration and click the **Activate** icon +2. On the **Activate Integration** dialog, select ***Audit*** as tracing level and click ***Activate*** + +- The activation will be completed in a few seconds. If activation is successful, a status message is displayed in the banner at the top of the page, and the status of the integration changes to **Active**. + +## Task 8: Formulate Request Payload to Create Invoice + +We will be testing the Integration flow with a happy case and fault case by modifying the request payload. + +1. Login to ERP Cloud. Identify the user who has the role of Create Invoices + +2. Navigate to ***Payables > Invoices*** + +3. Select ***Tasks > Create Invoice*** + +4. Provide the values per below + + | **Name** | **Value** | + | --- | ----------- | + | Business Unit | US1 Business Unit | + | Supplier | ABC Consulting | + + Make a note of the following values + - Business unit + - Supplier + - Supplier Site + + Do not create the Invoice. We will need valid values to formulate the Test Request payload. + +## Task 9: Test the Integration Flow + +We will test the end to end Integration flow using the built-in Test Client. In an ideal scenario, the request would be posted from a Web, Mobile Client and so on. + +1. From **Integrations** section, Select **Invoice Validation** Integration Flow, Click on ***... (Actions)*** and Click on ***Run*** + +2. Select ***Body*** Tab and make sure ***Text*** Radio button is selected. Provide the below Payload + + ``` + + { + "InvoiceNumber" : "XX_INV_ABC_0099", + "InvoiceCurrency" : "USD", + "InvoiceAmount" : 600, + "InvoiceDate" : "2021-01-01", + "BusinessUnit" : "US1 Business Unit", + "Supplier" : "ABC Consulting", + "SupplierSite" : "ABC US1", + "Description" : "Invoice Created using OIC", + "invoiceLines" : [ { + "LineNumber" : 1, + "LineType" : "Item", + "LineAmount" : 500, + "Description" : "Line 1 Description", + "ProrateAcrossAllItemsFlag" : true + }, { + "LineNumber" : 2, + "LineType" : "Item", + "LineAmount" : 100, + "Description" : "Line 2 Description", + "ProrateAcrossAllItemsFlag" : true + } ] + } + + ``` + + Modify the above payload with the values captured from ERP Cloud for **Business Unit, Supplier and Supplier Site**. Provide a unique **Invoice Number** + +3. Click on ***Run***. Observe the **Response** payload returned. + + ![Activity Stream](images/activity-stream.png) + +4. Select the Instance Id and View the Integration flow + + ![Activity Stream Success](images/acitivity-stream-success.png) + +5. Modify the **Request Payload** with an Invalid Business Unit and Test the Integration Flow. Observe + the Custom Fault Payload returned and the **Otherwise** condition is executed. + +## Task 10: Extend the Usecase (Bonus Lab) + + There are a few hints provided in the Bonus Lab to extend the use case which will Validate the Supplier and Supplier Site. Refer to the Introduction section for High-Level Flow + +### *Validate Supplier Activity* + + 1. Use **ERP Cloud** Connection and configure the REST resources to invoke ***SupplierLOV > getAll*** operation + + 2. In the **Child Resources** page Select ***sitesLOV*** + +### *Define the Map to validateSupplier* + + 1. In **validateSupplier Request** provide Query Parameters per below + - Expand -> "sitesLOV" + - Query -> concat ("SupplierName=", /nssrcmpr:execute/ns31:request-wrapper/ns31:Supplier ) + +### *Create IF Condition for Supplier* + + 1. In the ***If*** condition use the condition **count($validateSupplier/nsmpr13:getAllResponse/nsmpr13:items) = 1.0** to Validate if Supplier is Found + +### *Create IF Condition for Supplier Site* + + 1. In the ***If*** condition use the condition **count($validateSupplier/nsmpr13:getAllResponse/nsmpr13:items/nsmpr7:sitesLOV[nsmpr2:SupplierSite=/nsmpr8:execute/nsmpr4:request-wrapper/nsmpr4:SupplierSite]) = 1** to Validate if Supplier Site is Found + +### *Create Otherwise Condition for Supplier and Supplier Site* + + 1. Create Otherwise condition for Supplier and Supplier Site to return fault payload accordingly + + The final integration changes for the bonus lab section will be per below + ![Final Integration Flow with Bonus](images/final-integration-flow-bonus.png) + +**Congratulations!** You have learnt how to invoke ERP Cloud REST API with the Out of the box adapter capabilities. ERP Cloud Adapter abstracts the API/Services/Business Objects and provides an intuitive interface which Simplifies the task to perform Real-Time Synchronization. + +## Learn More + +- [Getting Started with Oracle Integration 3](https://docs.oracle.com/en/cloud/paas/application-integration/index.html) + +## Acknowledgements + +- **Author** - Kishore Katta, Director Product Management, Oracle Integration +- **Contributors** - Subhani Italapuram, Director Product Management, Oracle Integration +- **Last Updated By/Date** - Subhani Italapuram, Nov 2024 diff --git a/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/acitivity-stream-success.png b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/acitivity-stream-success.png new file mode 100644 index 0000000..b7568af Binary files /dev/null and b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/acitivity-stream-success.png differ diff --git a/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/activity-stream.png b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/activity-stream.png new file mode 100644 index 0000000..481958e Binary files /dev/null and b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/activity-stream.png differ diff --git a/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/assign-business-identifiers.png b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/assign-business-identifiers.png new file mode 100644 index 0000000..6237eb5 Binary files /dev/null and b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/assign-business-identifiers.png differ diff --git a/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/checkforbu.png b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/checkforbu.png new file mode 100644 index 0000000..96701f2 Binary files /dev/null and b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/checkforbu.png differ diff --git a/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/create-erp-invoice.png b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/create-erp-invoice.png new file mode 100644 index 0000000..3d4bf7e Binary files /dev/null and b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/create-erp-invoice.png differ diff --git a/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/create-invoice-architecture.png b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/create-invoice-architecture.png new file mode 100644 index 0000000..86ebaf8 Binary files /dev/null and b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/create-invoice-architecture.png differ diff --git a/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/createinvoicesummary.png b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/createinvoicesummary.png new file mode 100644 index 0000000..14bfc05 Binary files /dev/null and b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/createinvoicesummary.png differ diff --git a/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/data-stitch-activity.png b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/data-stitch-activity.png new file mode 100644 index 0000000..a588e08 Binary files /dev/null and b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/data-stitch-activity.png differ diff --git a/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/data-stitch-invoice-variable.png b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/data-stitch-invoice-variable.png new file mode 100644 index 0000000..7563234 Binary files /dev/null and b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/data-stitch-invoice-variable.png differ diff --git a/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/developer-view.png b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/developer-view.png new file mode 100644 index 0000000..0ef5f3d Binary files /dev/null and b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/developer-view.png differ diff --git a/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/final-integration-flow-bonus.png b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/final-integration-flow-bonus.png new file mode 100644 index 0000000..749c518 Binary files /dev/null and b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/final-integration-flow-bonus.png differ diff --git a/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/final-integration-flow.png b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/final-integration-flow.png new file mode 100644 index 0000000..c6e7d41 Binary files /dev/null and b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/final-integration-flow.png differ diff --git a/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/map-validate-bu.png b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/map-validate-bu.png new file mode 100644 index 0000000..962737a Binary files /dev/null and b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/map-validate-bu.png differ diff --git a/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/mapbu1.png b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/mapbu1.png new file mode 100644 index 0000000..f133ce6 Binary files /dev/null and b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/mapbu1.png differ diff --git a/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/open-business-identifiers.png b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/open-business-identifiers.png new file mode 100644 index 0000000..b87f484 Binary files /dev/null and b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/open-business-identifiers.png differ diff --git a/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/switch-route-1.png b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/switch-route-1.png new file mode 100644 index 0000000..1f6651a Binary files /dev/null and b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/switch-route-1.png differ diff --git a/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/switchbranches.png b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/switchbranches.png new file mode 100644 index 0000000..686d43b Binary files /dev/null and b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/switchbranches.png differ diff --git a/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/tracinglevel.png b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/tracinglevel.png new file mode 100644 index 0000000..fabfd12 Binary files /dev/null and b/oic-gen3/cookbooks/erp-cloud/business-services/create-flow/images/tracinglevel.png differ diff --git a/oic-gen3/cookbooks/erp-cloud/business-services/introduction/introduction.md b/oic-gen3/cookbooks/erp-cloud/business-services/introduction/introduction.md new file mode 100644 index 0000000..3c0fb53 --- /dev/null +++ b/oic-gen3/cookbooks/erp-cloud/business-services/introduction/introduction.md @@ -0,0 +1,73 @@ +# Introduction + +## About this Workshop + +This workshop shows you how to design and develop a Real time Synchronization Usecase in Oracle Integration 3 integrating with the ERP cloud. Out of the box, ERP Cloud adapter helps an Integration developer to quickly consume Business Services in a secured way using various authentication schemes. + +This Lab 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: + +1. You create and activate an integration that subscribes to an ERP Cloud Purchase Order (PO) event +2. You then create a PO in ERP Cloud and a PO event is triggered. +3. Your integration receives the PO event and pushes the data + into the File Server. + + The following diagram shows the runtime interaction between the systems involved in this use case: + ![Create Invoice Architecture](../create-flow/images/create-invoice-architecture.png) +Estimated Time: 80 minutes + +### Objectives + +In this workshop, you will learn how to: + +* Creating a Project +* Creating Connections +* Create a Real-Time Synchronization scenario using Business Services. +* Use Business Object to Integrate with ERP Cloud. + +### Prerequisites + +* Oracle Integration Instance. +* Access to the ERP Cloud environment +* A Chrome browser. + +## Task 1: Leverage the ERP Cloud Adapter in Oracle Integration 3 + +Oracle Integration 3 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, HCM Cloud, Salesforce.com, Workday, EBS, SAP, NetSuite and so on. OIC adapters simplify connectivity by handling the underlying complexities of connecting to applications using industry-wide best practices + +With the help of this cookbook series, you can design and implement ERP Cloud Integration patterns leveraging Oracle Integration 3 features and functionalities + +As an Integration Developer, if you have a requirement to integrate an ERP Cloud application with any other SaaS or On-premise application, then this cookbook series helps you to go through the pre-requisite steps, common use cases, ERP Cloud adapter functional capabilities and several implementation considerations along with lab exercises to provide hands-on experience. + +The Oracle ERP Cloud Adapter enables you to easily integrate on-premises or SaaS applications with Oracle ERP Cloud without having to know about the specific details involved in the integration. + +The Oracle ERP Cloud Adapter provides the following key benefits: + +* Provides declarative support for subscribing to business events raised by various modules in Oracle ERP Cloud and Oracle Supply Chain Management Cloud. +* Integrates easily with the Oracle ERP Cloud application’s WSDL file to produce a simplified, integration-centric WSDL. +* Generates automatic mapping to the selected business object, event subscription, or business (REST) API. +* Simplifies connection creation by automatically identifying the required service resources based on the Oracle ERP Cloud hostname you specify when creating a new connection on the **Connections** page. +* Supports several security policies for selection during Oracle ERP Cloud Adapter connection configuration: + * Username Password Token With PGP Key Support + * Username Password Token + * OAuth Authorization Code Credentials +* Provides standard error handling capabilities. +* Enables you to upload a file in the Oracle ERP Cloud business tables. +* Enables you to upload files to Oracle WebCenter Content (Universal Content Manager) in encrypted or unencrypted format. + +### Video Preview + +[ERP Cloud Integration Patterns](youtube:nKXbh2ZPuMI) + +You may now **proceed to the next lab**. + +## Learn More + +* [Getting Started with Oracle Integration 3](https://docs.oracle.com/en/cloud/paas/application-integration/index.html) +* [Using the Oracle ERP Cloud Adapter with Oracle Integration 3](https://docs.oracle.com/en/cloud/paas/application-integration/erp-adapter/index.html) + +## Acknowledgements + +* **Author** - Kishore Katta, Director Product Management, Oracle Integration +* **Contributors** - Subhani Italapuram, Director Product Management, Oracle Integration +* **Last Updated By/Date** - Subhani Italapuram, Nov 2024 diff --git a/oic-gen3/cookbooks/erp-cloud/business-services/workshops/tenancy/index.html b/oic-gen3/cookbooks/erp-cloud/business-services/workshops/tenancy/index.html new file mode 100644 index 0000000..6acdb69 --- /dev/null +++ b/oic-gen3/cookbooks/erp-cloud/business-services/workshops/tenancy/index.html @@ -0,0 +1,62 @@ + + + + + + + + + Oracle LiveLabs + + + + + + + + + + + + +
+
+
+
+
+
+
+
+ + + + + diff --git a/oic-gen3/cookbooks/erp-cloud/business-services/workshops/tenancy/manifest.json b/oic-gen3/cookbooks/erp-cloud/business-services/workshops/tenancy/manifest.json new file mode 100644 index 0000000..611b626 --- /dev/null +++ b/oic-gen3/cookbooks/erp-cloud/business-services/workshops/tenancy/manifest.json @@ -0,0 +1,38 @@ +{ + "workshoptitle": "Oracle Integration 3 - Cookbook - ERP Cloud Business Services", + "include": {"starter-file.sql":"../../data-load/files/starter-file.sql", + "sample.json":"../../data-load/files/sample.json", + "step2.md":"../../data-load/files/step2.md"}, + "variables": ["../../variables/variables.json", + "../../variables/variables-in-another-file.json"], + "help": "livelabs-help-oic_us@oracle.com", + "tutorials": [ + { + "title": "Introduction", + "description":"Introduction to integrating with ERP Cloud", + "filename": "../../introduction/introduction.md" + }, + { + "title": "Get Started", + "description": "This is a get started section to understand the basic of OIC and the extract design pattern integrating with ERP cloud", + "filename": "../../../../../common/get-started-erp-cloud/get-started.md" + }, + { + "title": "Lab 1: Create a Project", + "filename": "../../../../../common/create-project/create-project.md" + }, + { + "title": "Lab 2: Create Connections", + "filename": "../../create-connections/create-connections.md" + }, + { + "title": "Lab 3: Create Business Services Integration", + "filename": "../../create-flow/business-services-integration.md" + }, + { + "title": "Need Help?", + "description": "Solutions to Common Problems and Directions for Receiving Live Help", + "filename":"https://oracle-livelabs.github.io/common//labs/need-help/need-help-freetier.md" + } + ] +}