' oicbasics: Build Your Second Integration from Scratch | Create a PROJECT | Create Calculator Application | Oracle Integration Generation 3
May 17, 2024

Build Your Second Integration from Scratch | Create a PROJECT | Create Calculator Application | Oracle Integration Generation 3

 

In this article I have share the steps to develop and test a Calculator Integration from scratch in Oracle Integration Generations 3 Instance | A complete Hands-on Practice.






Use Case - Develop an Integration which will be able to perform basic calculator operations i.e. (i.e. Addition ➕, Subtraction ➖, Multiplication , Division ➗). 


Prerequisite - 

  • OIC Generation 3 Instance Account
  • Calculator Service WSDL URL:  http://www.dneonline.com/calculator.asmx?WSDL



- Advertisement -



End Result 
Once we complete the development of the Integration, final page looks as follow


Click on Image for better view

and the Testing Page looks as shown in below image, where we will have four different operations i.e. Add, Subtract, Multiply and Divide to select...


Click on Image for better view


The whole Article is divided into 3 Parts: 

    • Part 1 - I have mentioned the steps to Create Connection
    • Part 2 - mentioned the steps to develop the Integration
    • Part 3 - mentioned the steps to Test the Integration

Now Let's Start the development........




PART 1: Create Connection 


STEP 1: Create REST Trigger Connection. Follow this Article to create the connection.

STEP 2: Create the SOAP Connection for the Calculator Service. Please follow this article to create the connection.


Once you have created the above two connections, Let's moved to Part 2 i.e. Develop the Integration.



PART 2: Create Integration 


STEP 3: Create Integration.

  • STEP 3.1: In the navigation pane, Click on Integrations (at left hand top). Click Create, then select Application.

Click on the Image for better view


Click on the Image for better view


  • STEP 3.2: In the Name Filed, enter CalculatorApplication (you can enter any other meaningful name). Leave the other field as they are, click Create. 

Click on the Image for better view


💡
The integration canvas opens with an option for creating a trigger connection. The trigger (source) connection allows your integration to receive inbound messages from an application.



- Advertisement -



  • STEP 3.3:  Let's configure the REST Trigger connection to define how the Trigger connection receives messages in the integration
    • Click on the ➕ icon and then search for REST Trigger Connection which we have created in Step 1. Select that connection.



    • Enter "Calculate" as the endpoint name, Enable the “☑️ select to configure multiple resources or verbs " and then click Continue.



    • Resource configuration page will get open. Enter the below information as suggested:
      • Provide an Operation Name:  enter add
      • What is the endpoint's relative resource URI:  enter /calculator/operation/add
      • What action do you want to perform on the endpoint:  select POST
      • Select any options that you want to configure:   select below options
 ☑️Configure a request payload for this endpoint
 ☑️ Configure this endpoint to receive the response

Click Continue

 


 

    • In the Request Page enter the following details
      • Select the response payload format:  Select JSON Sample.
      • <<< inline >>>:  Click this field and enter the following content, then click Continue.

{
  "Number_1": null,
  "Number_2": null
}

      • Element:  Ensure response-wrapper is selected.
      • What is the media-type of Response Body:  Ensure JSON is selected.

Click Continue

 






    • let's configure the Response Page: 
      • Select the response payload format:  Select JSON Sample.
      • <<< inline >>>:  Click this field and enter the following content, then click Continue.

{
"AddResponse": null 
}

      •  Element:  Ensure response-wrapper is selected.
      • What is the media-type of Response Body:  Ensure JSON is selected.

Click Continue








- Advertisement -



📝Note: 
We have successfully configured the Request - Response page for ADD ➕ operation. Similarly, we have to configure the Request-Response page for the other operations - SUBTRACT , MULTIPLY and DIVIDE. I will cover the detail steps with screenshots for one more operation i.e. for SUBTRACT ➖ and the rest two operations you can do it by yourself. Don't worry will provide the configuration details but no screenshots 😁



    • Let's Configure Request - Response page for SUBTRACT operation (➖). Select "☑️Add Another operation" and then click Continue

Click on the Image for better view


    • Resource configuration page will get open. Enter the below information as suggested 
      • Provide an Operation Name:  enter subtract
      • What is the endpoint's relative resource URI:  /calculator/operation/subtract
      • What action do you want to perform on the endpoint:  select POST
      • Select any options that you want to configure:  
 ☑️Configure a request payload for this endpoint
 ☑️ Configure this endpoint to receive the response

Click Continue



    • In the Request Page enter the following details
      • Select the response payload format:  Select JSON Sample.
      • <<< inline >>>:  Click this field and enter the following content, then click Continue.
{ 
"Number_1": null, 
"Number_2": null 
}

      • Element:  Ensure response-wrapper is selected.
      • What is the media-type of Response Body:  Ensure JSON is selected.
Click Continue

 





    • Configure the Response Page: 
      • Select the response payload format:  Select JSON Sample.
      • <<< inline >>>:  Click this field and enter the following content, then click Continue.

"SubtractResponse": null 
}

      • Element:  Ensure response-wrapper is selected.
      • What is the media-type of Response Body:  Ensure JSON is selected.

Click Continue

 

Click on the Image for better view





    • We have successfully configured two operations -   ADD and SUBTRAT.  Now I request you to configure the left two operations by following the same steps after clicking "☑️Add Another operation". Below I have provided the configuration details for both Multiply  and Divide ➗ that you need to enter during configuration 😇



- Advertisement -


               ------FOR Multiply----

                             RESOURCE CONFIGURATION PAGE DETAIL:

        • Provide an Operation Name: multiply
        • What is the endpoint's relative resource URI: /calculator/operation/multiply
        • What action do you want to perform on the endpoint: POST
        • Select any options that you want to configure:  
 ☑️Configure a request payload for this endpoint
 ☑️Configure this endpoint to receive the response

 

REQUEST CONFIGURATION PAGE DETAIL:

        • Select the response payload format: Select JSON Sample.
        • <<< inline >>>: Click this field and enter the following content, then click Continue.

{

  "Number_1": null,

  "Number_2": null

        •  Element: Ensure response-wrapper is selected.
        • What is the media-type of Response Body: Ensure JSON is selected.

 

RESPONSE CONFIGURATION PAGE DETAIL:

        • Select the response payload format: Select JSON Sample.
        • <<< inline >>>: Click this field and enter the following content, then click Continue.

{
"MultiplyResponse": null
}

        • Element: Ensure response-wrapper is selected.
        • What is the media-type of Response Body: Ensure JSON is selected.



              -----FOR Divide-----


 RESOURCE CONFIGURATION PAGE DETAIL:

        • Provide an Operation Name: divide
        • What is the endpoint's relative resource URI: /calculator/operation/divide
        • What action do you want to perform on the endpoint: POST
        • Select any options that you want to configure:  
 ☑️Configure a request payload for this endpoint
 ☑️ Configure this endpoint to receive the response

 

REQUEST CONFIGURATION PAGE DETAIL:

        • Select the response payload format: Select JSON Sample.
        • <<< inline >>>: Click this field and enter the following content, then click Continue.
{ 
"Number_1": null, 
"Number_2": null 
}

 

        • Element: Ensure response-wrapper is selected.
        • What is the media-type of Response Body: Ensure JSON is selected.

 

RESPONSE CONFIGURATION PAGE DETAIL:

        • Select the response payload format: Select JSON Sample.
        • <<< inline >>>: Click this field and enter the following content, then click Continue.

{
"DivideResponse": null 
}

        • Element: Ensure response-wrapper is selected.
        • What is the media-type of Response Body: Ensure JSON is selected.



    • Once you have configured the other 2 operations click Continue. Below summary page will get generated. Click Finish.

Click on the Image for better view



- Advertisement -



STEP 3.4: We have successfully configured four operations in REST Trigger Adapter. Now let's add the Calculator SOAP Connection to invoke calculator service.



    • Drag your cursor along the line until the Add Add icon icon appears. Select Invokes, then select the Calculator connection



    • Configure Basic Info page opens, enter following details:
      • What do you want to call your endpoint - Enter Addition

Click continue

 


 

    • Configure Operations page appears. Enter the following information
      • Select the Port - select CalculatorSoap
      • Select the Operation - select Add

Click Continue

 





    • Configure Headers page appears. Leave the configuration as they are, click Continue. 




    • Summary page appears. Review your selections, then click Done.




If you notice, by mistake, I have added the invoke connection at the end because of which the response mapper is present at the Top. We need to reposition the response mapper in the flow. So before moving forward lets first Reposition Response Mapper.

1. Select the Add Map (i.e. Trigger Response) 
2. and then click Cut ✀ (present at top left) and then Paste it at the End of the flow. Thats it. Now Flow is okay. We can move forward with our integration development.

Please refer below screenshot. 







- Advertisement -


STEP 3.5: We have successfully created and configure the REST Trigger and SOAP Invoke connection. Let's now configure the mappers.
    • Double Click the first map, i.e. Map Addition (request mapper)



    • The mapper opens. In the Sources section, expand Add Request. In the Target section, expand Addition Request.
    • Drag the source Number 1 element to the target intA element. 
    • Similarly drag the source Number 2 element to the target intB element
    • Click Validate and wait for the Validation Successful message to popup.
    • Click Back Back icon to exit the mapper and return to the integration canvas. Your mappings are automatically saved.





    • Now Let's Map the second Mapper i.e. Map add (response mapper). Double click the mapper or select the mapper, right click and click Edit




    • The mapper opens. In the Sources section, expand Addition Response. In the Target section, expand Response Wrapper.
    • Drag the source Add Result element to the target Add Response element. 
    • Click Validate and wait for the Validation Successful message to popup.
    • Click Back Back icon to exit the mapper and return to the integration canvas. Your mappings are automatically saved.




STEP 3.6: Define a Business Identifier
Let's now define the primary business identifier for this Scope.



Knowledge:  👀 
Business Identifier? Business identifiers enable you to track payload fields in messages during runtime. Each integration requires a primary business identifier.


    • Click red error sign, then select Business Identifier Business identifiers iconExpand Request Wrapper and drag Number 1 to the Business identifier field.
    • Similarly drag Number 2 to the second Business identifier field.
refer below images







    • Click Save, then click outside the Business identifiers panel to close it. The business identifier you specify here is visible when you monitor your completed integration instance.
    • We have successfully completed the configuration of ADDITION  Operation; design looks as follows.





Now similarly we are going to configure the Invoke connection and Mapper for all the left 3 operations i.e. for Subtraction ➖, Multiplication , Division ➗


STEP 3.7: Add the Calculator Invoke Connection



    • Enter Endpoint Name = Multiplication, click continue




    • Select Port = CalculatorSoap , Operation= Multiply and then click Continue


    • Configure Headers page opens. Leave this page as they are. Click Continue




    • Summary page appears. Review your selections, then click Finish.




- Advertisement -



STEP 3.8: We have successfully configured the SOAP Invoke connection, now let's configure the mapper.

    • Select the first mapper (i.e. Map Multiplication), click edit




    • Drag and drop the source element to the target element (similar to above step 3.5)
    • Refer below image



    • Open the second mapper (i.e. Map Multiply) and complete the mapping (similar to above step 3.6)
    • Refer below image






STEP 3.9: Define a Business Identifier (similar to above step 3.6)







    • This way we have successfully configured the Multiplication Operation also.
    • Now I request you to configure the left 2 operations i.e. SUBTRACT  AND DIVIDE ➗ by yourself. You just need to keep in mind to select the correct operation while configuring the SOAP Connections of the left 2 operations
    • Choose Subtract for subtract operation and Divide for Divide Operations.
    • Mapper will be similar to the above configured operations. 
    • Once you have completed the configuration of the left two operations (i.e. configured Invoke connection, Mapper and business identifier) Final Page looks like below image:







PART 3: Test the Integration 


 Activate and Run the Integration

    • In Integrations section, click Power button Actions icon




    • Leave the tracing level set to the Production and the other options as they are and then click Activate.



    • Click RefreshRefresh icon periodically. The integration status changes to Active. You are now ready to run the integration and send a message




    • Click Actions Actions icon, then select Run






    • Let's check Add operation first. Select Add operations. Enter below payload in the body section and click Run
{ 
"Number_1": 1, 
"Number_2": 4 
}




    • View the response message at the bottom of the Configure and run page. The addition operation value is displayed 




Similarly, you can run and test the other 3 operations i.e. Subtraction ➖, Multiplication , Division ➗

I have pasted the screenshots for your reference ...






Congratulation! 👏👏You have successfully created, designed, activated, run, and monitored your First integration. 


Thank You!  ta-ta 👋

 

No comments:

Post a Comment

If you have any doubts, Please let me know.

Top