Objective:
-> The goal was to build an integration flow in SAP CPI that processes structured XML data, applies conditional filtering through parallel branches, and stores the filtered outputs as separate files in Dropbox.
-> I have used Start Timer to trigger scheduled intervals, and applied filters in parallel branches to separate records, and transferred them securely to Dropbox. To ensure reliability, I added an Exception Subprocess for error handling and email notifications.
files.content.writefiles.content.read->In CPI:
->Fill in details:
https://www.dropbox.com/oauth2/authorize?token_access_type=offlinehttps://api.dropboxapi.com/oauth2/token->Deploy and authorize. After successful login, CPI confirms with: "Authorization was successful: Refresh Token was added to the OAuth2 Authorization Code Credential."
1. Start Timer
Triggers the flow at scheduled intervals (e.g., every 10 minutes).
2. Content Modifier
Add XML data in the message body. Example structure:
<students>
<student>
<id>101</id>
<name>Ravi Kumar</name>
<age>20</age>
<gender>Male</gender>
<department>Computer Science</department>
<grades>
<subject name="Math">85</subject>
<subject name="Physics">78</subject>
<subject name="Chemistry">88</subject>
</grades>
</student>
<student>
<id>102</id>
<name>Anjali Sharma</name>
<age>21</age>
<gender>Female</gender>
<department>Electronics</department>
<grades>
<subject name="Math">90</subject>
<subject name="Physics">82</subject>
<subject name="Chemistry">91</subject>
</grades>
</student>
<student>
<id>103</id>
<name>Mohit Verma</name>
<age>22</age>
<gender>Male</gender>
<department>Mechanical</department>
<grades>
<subject name="Math">75</subject>
<subject name="Physics">80</subject>
<subject name="Chemistry">70</subject>
</grades>
</student>
<student>
<id>104</id>
<name>Sneha Reddy</name>
<age>20</age>
<gender>Female</gender>
<department>Civil</department>
<grades>
<subject name="Math">88</subject>
<subject name="Physics">85</subject>
<subject name="Chemistry">89</subject>
</grades>
</student>
<student>
<id>105</id>
<name>Amit Singh</name>
<age>23</age>
<gender>Male</gender>
<department>Electrical</department>
<grades>
<subject name="Math">92</subject>
<subject name="Physics">90</subject>
<subject name="Chemistry">94</subject>
</grades>
</student>
<student>
<id>106</id>
<name>Priya Das</name>
<age>21</age>
<gender>Female</gender>
<department>Computer Science</department>
<grades>
<subject name="Math">87</subject>
<subject name="Physics">83</subject>
<subject name="Chemistry">86</subject>
</grades>
</student>
<student>
<id>107</id>
<name>Rahul Mehta</name>
<age>22</age>
<gender>Male</gender>
<department>Electronics</department>
<grades>
<subject name="Math">78</subject>
<subject name="Physics">76</subject>
<subject name="Chemistry">80</subject>
</grades>
</student>
<student>
<id>108</id>
<name>Kavita Joshi</name>
<age>20</age>
<gender>Female</gender>
<department>Mechanical</department>
<grades>
<subject name="Math">84</subject>
<subject name="Physics">79</subject>
<subject name="Chemistry">85</subject>
</grades>
</student>
<student>
<id>109</id>
<name>Suresh Nair</name>
<age>23</age>
<gender>Male</gender>
<department>Civil</department>
<grades>
<subject name="Math">81</subject>
<subject name="Physics">77</subject>
<subject name="Chemistry">82</subject>
</grades>
</student>
<student>
<id>110</id>
<name>Neha Gupta</name>
<age>21</age>
<gender>Female</gender>
<department>Electrical</department>
<grades>
<subject name="Math">89</subject>
<subject name="Physics">88</subject>
<subject name="Chemistry">90</subject>
</grades>
</student>
</students>Also, define a dynamic property (Optional) for file naming:filename = ${date:now:yyyyMMdd_HHmmss}.xml3. Parallel Multicast
Routing simultaneously to multiple branches for filtering.
4. Filters
Apply XPath conditions in each branch:
/students/student[gender='Male']/students/student[gender='Female']5.Dropbox Receiver Adapter
Configure each branch to upload filtered files to Dropbox using OAuth credentials.
6. Exception Subprocess
Handles errors:
${exception.message}{Mail Adapter:
Configure SMTP settings for email notification.
• Host: smtp.gmail.com
• Port: 587
• Authentication: Username/Password
• To: [email protected]
• From: [email protected]
This setup ensures immediate visibility when errors occur in processing or Dropbox connectivity.}
Deploy the Integration Flow and monitor message processing from the Monitoring tab in Integration Suite. Check the Dropbox folders for generated files and check the email alerts for any errors.
-> This integration highlights the flexibility of SAP Cloud Integration for handling structured data. By combining parallel processing, conditional filtering, and secure Dropbox connectivity, I was able to automate a process, otherwise I required manual effort. The design with error handling made the solution reusable for scenarios like reporting, batch uploads, and data archiving. This type of approach easy as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 50 | |
| 34 | |
| 22 | |
| 21 | |
| 18 | |
| 10 | |
| 9 | |
| 8 | |
| 7 | |
| 6 |