Showing posts from August, 2021

Tips and Tricks for handling numbers in BPEL or OIC

 While integrating with multiple systems and moving data from one system to the other, we generally come across scenarios, wherein we need to change the format of the number or perform operations like floor, ceil, round, divide, multiply, add, etc. on numbers. We will be going through various mathematical functions available in XSLT 1.0, which would be helpful in such scenarios, and also some generic errors which we encounter usually. - Mathematical Operations Divide Multiply Add Subtract Square-root Round Floor Ceil Advanced Number formatting - Common Errors Mathematical Operations 1. Divide To divide 2 numbers, we can use the  div operator to divide two numbers. Syntax:        $num1 div $num2 Example:        Let us assume we want to divide 120 by 7. XSL: <divide><xsl:value-of select="120 div 7"/></divide> Output <divide>17.14285714285714285714</divide>

Reading .csv files with and without headers using different delimiters in Mule 4

Flat files especially .csv files are very common for data loading and data transfers. We generally come across scenarios where we want to read a .csv file, which may or may not contain the header row. Also, there is a chance .csv files don't have ','(comma) as delimiter rather has ''|"(pipe) as a delimiter or any other character as a delimiter. This article will discuss various ways to read such files in Mule 4 and create a JSON output of it. Mule Flow This will be a simple flow, where we will be reading a file using a file connector. Then convert the read data to JSON using transform message. Finally, log the JSON payload to the console using Logger. Here, we are not doing any complex transformation, it will be more like a MIME type conversion from application/csv to application/json, for better understanding the structure of input data. Steps: Create a flow in your mule application. Drag and drop

Popular posts from this blog

DateTime formatting using xp20:format-dateTime ()

Create Delimited String from XML Nodes and Vice Versa in SOA 12c

Import and Export MDS artifacts in SOA 12c