Posts

Showing posts from May, 2022

SAP CPI - Loop Process Call with SuccessFactor (oData V2)

Image
This example will show you how to fetch data from SuccessFactor (oData V2 Message Protocal) with a specific page size. For example, if your data has 10,000 total records and each record consists of 20 child nodes (the result size is around 10MB), you can fetch data by 500 records per request by using Loop Process Call. # My integration process consists of 1. Content Modifier " Initial Data " which I declare property "fetchData". 2. Loop Process Call " Loop Fetch Data " which calls Local Integration Process " Fetch Data From SF ". 3. Groovy Script which writes data from property "fetchData" in an attachment format. This example will focus on step 2 - Loop Process Call & Local Integration Process. # Local Integration Process "Fetch Data from SF".  How does it work? 1. Use Request Reply to call SuccessFactor to get data 500 records per request. 2. Use Groovy Script to get some fields and return in XML format. 3. Use XML to CS...

SAP Cloud Platform Integration - XML to CSV Converter

Image
  XML to CSV Converter : If your XML format looks like this: Your configuration in XML to CSV Converter 1 will be

SAP Cloud Platform Integration - Splitter

Image
  This example will show you how to use General Splitter to divide a big XML message into several small messages. The main process we need to focus on is the local integration process, "Split XML", which has a General Splitter inside and ends with Gather to combine a result of each split message (after the process) together. # General Splitter 1.  Expression Type: I use XPath  because the results from the SuccessFactor are an XML. 2. XPath Expression: XPath of the node that marks each split the message (Including root node) 3. Grouping: The number of records in the 1 split message 4. Streaming: Enable this if you want to start splitting before the entire big message is loaded into memory. The system will first divide the message into chunks and starts splitting the chunks into split messages. This is only relevant if the splitter is the first step after the step that fetches data – otherwise, the content would have already loaded in memory. # Gather After you proces...

Setting IntelliJ IDEA to run Groovy Script

Image
  1. Download Groovy SDK From https://groovy.apache.org/download.html or a specific version at  https://groovy.jfrog.io/artifactory/dist-release-local/groovy-zips/ Ex. Version 3.0.8 visit at https://groovy.jfrog.io/artifactory/dist-release-local/groovy-zips/apache-groovy-binary-3.0.8.zip 2. Unzip your download file. You can store it in the directory you need. 3. Open IntelliJ IDEA Application. 4. Create a new Project. In this step, you can create New Project and follow the default configuration or you can create an Empty Project and use a manual configuration. In this document will choose the Empty Project name “Groovy-Script”. 5. Right click on the project name and choose “Open Modul Settings” 6. The Project Structure window will be open. Choose Module in the left panel. On the right panel, please make sure your setting is the same as the below picture. -      Module SDK is OpenJDK or up to your java version on your computer -      G...