Correlated data in Oracle Integration Cloud using XPath Expressions

  1. Create an App Drive Integration with name “Correlated Payload”. Expose REST adapter as Trigger in integration with verb as POST.
  2. Below is the request and response payload used.
{
"departments":[
{
"deptId":"1",
"deptName":"IT",
"deptType":"INTERNAL",
"employeeCount":"200"
},
{
"deptId":"2",
"deptName":"HR",
"deptType":"EXTERNAL",
"employeeCount":"500"
},
{
"deptId":"3",
"deptName":"FINANCE",
"deptType":"EXTERNAL",
"employeeCount":"100"
},
{
"deptId":"4",
"deptName":"ADMIN",
"deptType":"INTERNAL",
"employeeCount":"400"
},
{
"deptId":"5",
"deptName":"NETWORK",
"deptType":"INTERNAL",
"employeeCount":"800"
},
{
"deptId":"6",
"deptName":"CLIENTS",
"deptType":"EXTERNAL",
"employeeCount":"900"
}
],
"employees":[
{
"empId":"100",
"empName":"David",
"deptId":"2"
},
{
"empId":"101",
"empName":"Adam",
"deptId":"4"
}
]
}
{
"employees":[
{
"empId":"100",
"empName":"David",
"deptId":"2",
"deptName":"",
"deptType":""
},
{
"empId":"101",
"empName":"Adam",
"deptId":"4",
"deptName":"",
"deptType":""
}
]
}
Integration looks like this
Integration Canvas
Expression at this point of time.
/nstrgmpr:execute/nstrgdfl:request-wrapper/nstrgdfl:departments[  nstrgdfl:deptId = current () / nstrgdfl:deptId ] / nstrgdfl:deptName
((/nstrgmpr:execute/nstrgdfl:request-wrapper/nstrgdfl:departments[(nstrgdfl:deptId = current()/nstrgdfl:deptId)]/nstrgdfl:deptType = "EXTERNAL") and (/nstrgmpr:execute/nstrgdfl:request-wrapper/nstrgdfl:departments[(nstrgdfl:deptId = current()/nstrgdfl:deptId)]/nstrgdfl:employeeCount > "100"))

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Part 6: Hello World in Programming Languages

Exploring the journey of two unrelenting frameworks — React Native vs. Ionic

Google Cloud CSV to Google Sheets

A simple way to deploy React multi-threaded server side rendering with Risen.JS

React/Redux Architecture: What is an App? (1)

Develop Mobile Apps On a Chromebook…Really!

How I replace Redux, Redux Saga with React Hooks

Building a design system and a component library

Atomic design ilustration

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Akshay Nayak

Akshay Nayak

More from Medium

Creating and Using Dynamic Libraries in C

Understanding XML

Multicast on Public Cloud- Azure

k-means clustering and its real use case in the security domain: