An OIC Implementation with Complex Data Transformation

May 28, 2024 | 5 minute read
Text Size 100%:

Introduction

In my previous blog Implementing a Complex Transformation in OIC, I presented an implement of a complex data transformation. In this blog, I will present an implementation of the OIC integration that leverages the data transformation to achieve a more sophisticated integration use case. For detailed use case description, please refer to my previous blog linked above.

Integration Overview 

To illustrate the integration, I will start with a high-level annotated picture of the entire integration as shown below. The integration has been marked into different sections with numbers and a brief description on what they do. This picture provides an end-to-end view of the implementation. In the following sections of this blog, I will dive into each section more to further expose their details.

Full integration

Step Details

Step 1

Step 1

The trigger node accepts a pick batch number from FA Shipping. In the next node, three variables are initialized for the while loop. 

  • offset = 0, this variable is used in the FA REST API to indicate the first shipment line retrieved in the current page
  • hasMore = true, this variable controls the while loop. 
  • lastWmsOrderNbr = "", this is the order number of the last WMS order after the transformation. This variable is compared to the first WMS order number in the next shipment line batch is transformed. 

Step 2

Step 2

Calls the FA Inventory REST API to retrieve the first batch of shipment lines. The size of each batch can be controled by a predefined integration property. 

Step 3

Step 3

This step is necessary to make sure the first REST call returns shipment lines. If there is no shipment line returned in the very first call, the integration can stop. 

Step 4

Step 4

This step is the main transformation from FA shipment lines to WMS orders. The transformation has been explained in my previous blog  Implementing a Complex Transformation in OIC. The resulting WMS orders are saved into a variable named "currentWmsBatch". 

Step 5 - Step 8

These steps are executed when we detect that the last shipment set name in the previous batch matches the first shipment set name in the current retrieved batch. This is detected by matching the value of the variable lastWmsOrderNbr to that of the first WMS order number in the current batch.

Step 5

Step 5

Merge the lines in the first shipment set in the current batch into the last shipment set in the previous batch.

Step 6 - Step 8 

These steps are necessary if there are more shipment lines after the merge in Step 5.

Step 6

Step 6

Moves the previous batch to the input payload variable for stage file write, and writes the stage file.

Step 7

Step 7

This step maps the stage file output to the input variable for WMS API call, and sends the WMS order payload to WMS.

Step 8

Step 8

After we send the previous batch of WMS orders to WMS, we can discard them and get ready for the next batch of shipment lines from FA Inventory. This step assigns the current WMS batch of orders to the lastWmsBatch variable. 

Step 9

Step 9

This step is only executed when the current batch of shipment lines are the very first batch. This step is the same as Step 8.

Step 10

Step 10

Sets up variables for the next FA Inventory query

  • offset = (count + offset), this variable sets the first shipment line of the next batch of shipment line query
  • hasMore = the value of the "hasMore" in the current batch of shipment lines. 
  • lastWmsOrderNbr = the order number of the last WMS order after the transformation in the current batch 

 

Steps Outside of the While Loop

Last Step

These steps simply send the remaining batch of WMS Orders to WMS.

 

 

Siming Mu


Previous Post

Multicast on OCI - Bi-Directional traffic between On-premises and the Cloud

Andrei Stoian | 6 min read

Next Post


OCI IPv6 Unique Local IPv6 Unicast Addresses usage and considerations

Andrei Stoian | 4 min read