Conditional Mapping in OIC Oracle integration Cloud

This is a very common requirement to have a conditional mapping in OIC processes. Basically, we need to check the input payload element and set values to target element based on certain condition.

Let’s see with a quick example

If LINE TYPE ID = 6 SET RECEIVING ROUTER HEADER ID =3
image Conditional Mapping in OIC 1

This is an example of a receiving transaction Api in which if the Line type id of a PO line = 6 We need to set the Receiving Router header id = 3

Since this is a single Condition we can just use the If Condition in the OIC mapper.

Steps

image 1 Conditional Mapping in OIC 2
  • Create target element (Routing header id in our case)
  • Enable XSLT Developer mode
  • Toggle Functions
  • Select XSLT Tab
  • Select the If condition
  • Drag the if condition to Routing header id. make sure that the icon is just below the element
image 3 Conditional Mapping in OIC 3
Drag the if condition to Routing header id. make sure that the icon is just below the element as in the image above
image 2 Conditional Mapping in OIC 4

Drag line type id to the expression box and set the value = 6

ns28:LineTypeId =6

image 4 Conditional Mapping in OIC 5

image 5 Conditional Mapping in OIC 6

image 6 Conditional Mapping in OIC 7

Finally, The mapper looks like below

image 8 Conditional Mapping in OIC 8

Adding multiple Conditions in OIC Mapper

Similarly, we can add multiple conditions with choose statement. follow the same process

example

(IF Linetype Id =1 Routing header id =3 )

(IF Line type id =2 Routing header id =9 )

Drag choose under routing header id

then drag when condition under choose

set line type id =1 in expression ( drag line type id to expression builder and set =1)

Drag Value of statement under When and Set =3 in expression (this sets the value of routing header id to 3)

so now the condition applied is if line type id =1 , routing header id =3

image 9 Conditional Mapping in OIC 9

similarly, you can add another condition e.g If line type id =2, routing header id =9

image 11 Conditional Mapping in OIC 10

So this covers 2 conditions

If linetype =1 routing header id =3

if line type =2 routing header id =9

Similarly, you can add more complex and Conditional Mapping in OIC mapper.

image 3 Conditional Mapping in OIC 11
Make sure to drag the XSLT element under the element you need to add the logic. A reverse arrow mark will automatically show up on a valid element

Become a Oracle Cloud Application Integration Architect with the below courses

Check Details

Covers: All Major OIC and Application Skills required to do Major integrations. Support for One Year with Money Back Gurantee

Check Details
Oracle Fusion Technical Training with OIC/PCS/VBCS on Udemy
This training covers Fusion Technical and OIC bundle (OIC /PCS/VBCS)

A Good Training Overall!

Check Details

The course will help you to prepare for the 1Z0 1042: oracle cloud platform application integration specialist exam.

You may like

wpsadmin
We will be happy to hear your thoughts

Leave a reply

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
Best Wordpress Adblock Detecting Plugin | CHP Adblock
Cloud Technologies Blog
Logo
Compare items
  • Total (0)
Compare
0
Shopping cart