The question of conditional mapping comes up regularly on the ICS part of community.oracle.com which prompted us to write this blog. So if you want the output of an integration in element X to contain value from element A or B depending upon element C there are a number of answers, each having pros and cons. So let’s look at them before we offer an example of how we would solve the simpler more common problem.. Your choices are ….

  • Use the power of XSLT within the mapping,
  • Use the conditional option Within a Basic Map Data or an Orchestration pattern,
  • Use a custom piece of JavaScript
XLST Condition in the flow Custom Javascript
Single path through the integration Simpler to read and see visually Can be used either in the condition oer the mapping. Easier to apply than XSLT directly.
ICS doesnt make it the easiest to write this, but reading is fairly easy Easy to visually understand, but means more maintenance effort Easy to incorporate, but makes the development process multistep

We have talked about the condition/filtering in the book, and we will tackle the use of JavaScript in its own Definitive Guide, so let’s look at the XSL mapping option, and probably the route that will cover most cases. In many respects this is nothing to do with ICS, and is all about the use of XSLT so you may find it helpful to have an XSLT reference to hand. To this end the following maybe useful:

  • W3C – perhaps not the easiest to read, but definitely definitive,
  • XMLSchool far more readable but keeps things simple, and focuses on XSLT to create (X)HTML content

Read More