<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Gursimran Singh Ranhotra on Medium]]></title>
        <description><![CDATA[Stories by Gursimran Singh Ranhotra on Medium]]></description>
        <link>https://medium.com/@gursimransingh1298?source=rss-b63c3192756b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*easzS9uyw9e4bR3S.jpg</url>
            <title>Stories by Gursimran Singh Ranhotra on Medium</title>
            <link>https://medium.com/@gursimransingh1298?source=rss-b63c3192756b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 02:19:21 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gursimransingh1298/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Cache Policy vs. Cache Scope in MuleSoft — a Practical, Production-Ready Guide]]></title>
            <link>https://medium.com/another-integration-blog/cache-policy-vs-cache-scope-in-mulesoft-a-practical-production-ready-guide-d5e2d4e45295?source=rss-b63c3192756b------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5e2d4e45295</guid>
            <category><![CDATA[cache]]></category>
            <dc:creator><![CDATA[Gursimran Singh Ranhotra]]></dc:creator>
            <pubDate>Wed, 24 Sep 2025 06:48:28 GMT</pubDate>
            <atom:updated>2025-11-25T15:42:41.965Z</atom:updated>
            <content:encoded><![CDATA[<h3>Cache Policy vs. Cache Scope in MuleSoft — a Practical, Production-Ready Guide</h3><p>Caching is the cheapest latency you’ll ever buy. In MuleSoft you have two levers that look similar but serve different missions:</p><ol><li><strong>HTTP Caching policy</strong> — applied at the <strong>gateway</strong> (API Manager) to short-circuit whole HTTP responses.</li></ol><p><strong>2. Cache scope</strong> — placed <strong>inside your Mule flows</strong> to memoize the output of expensive steps (DB calls, HTTP requests, transformations, etc.).</p><p>When it comes to optimizing performance in your MuleSoft applications, caching is one of the most powerful techniques at your disposal. However, many developers find themselves confused about when to use <strong>Cache Policy</strong> versus <strong>Cache Scope</strong>. While both serve the fundamental purpose of storing frequently accessed data to improve response times and reduce backend load, they operate at different levels and serve distinct use cases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/331/0*KpZXujL2tBivDIqs" /></figure><h3>What’s the HTTP Caching policy?</h3><p>The HTTP Caching policy caches responses at the gateway, so that repeated requests don’t hit your app or downstream systems. You configure <strong>what to cache</strong>, <strong>for how long</strong>, and <strong>when to invalidate</strong>, with knobs such as:</p><ul><li>httpCachingKey (DataWeave expression; default uses the request path)</li><li>ttl, maxCacheEntries, useHttpCacheHeaders, requestExpression, responseExpression</li><li>invalidationHeader (clear a single entry or the entire cache)</li><li>distributed and persistCache (share across nodes and survive restarts where supported)</li><li><strong>Policy order matters.</strong> Responses <strong>served from cache skip policies that come <em>after</em></strong> the caching policy. Put any policy that must always apply (authn/authz, rate limiting, IP allowlist) <strong>before</strong> the HTTP Caching policy.</li></ul><p><strong>Great for:</strong> idempotent <strong>GET/HEAD</strong> endpoints, public reference data, catalog/lookup services, or expensive aggregation results that don’t change every request.</p><h3>What’s the Cache scope?</h3><p>The Cache scope wraps a portion of your flow. On a miss, it runs the enclosed processors, returns the result, and stores it. On a hit, it immediately returns the stored result — not just for HTTP; for any expensive step you put inside. By default it uses an in-memory object store (fast, but per-worker and volatile). You can (and often should) point the Cache scope at a custom Object Store to control TTL, capacity, and concurrency.</p><p>Two important realities:</p><ul><li>The scope only caches <strong>repeatable</strong> content; ensure the payload/streams are repeatable if you expect hits.</li><li>In CloudHub multi-worker deployments, the default in-memory cache is <strong>not shared</strong>; use <strong>Object Store v2 (OSv2)</strong> to share entries across workers of the same app.</li></ul><p><strong>Great for:</strong> DB lookups, DataWeave transforms, composite calls, token lookups, or <strong>intermediate</strong> results in complex orchestrations where policy-level HTTP caching can’t see the inner work.</p><h3>Decision quick-pick</h3><ul><li><strong>Want edge caching without touching code?</strong> Use <strong>HTTP Caching policy</strong> (tune keys/TTL; mind policy order).</li><li><strong>Need to cache a <em>part</em> of a flow, or non-HTTP work?</strong> Use <strong>Cache scope</strong>. Back it with <strong>OSv2</strong> if you run multiple workers.</li><li><strong>Have both</strong> (heavy inner work + a highly cacheable GET)? Layer <strong>scope</strong> (inside) and <strong>policy</strong> (edge) — but design keys to avoid confusion and stale hits.</li></ul><h3>Keys, TTLs, and invalidation</h3><p><strong>Design the key like a contract.</strong></p><p><em>Policy</em>: include method/path plus <strong>only</strong> the headers/params that shape the response (e.g., Accept-Language, tenantId, critical query params) via httpCachingKey, requestExpression, and responseExpression.</p><p><em>Scope</em>: derive a key from request attributes/vars (e.g., #[vars.productId ++ &#39;-&#39; ++ vars.locale]) or use a <strong>key generator</strong> in your strategy. Configure store <strong>size</strong> and <strong>expiration</strong> at the object store.</p><p><strong>Invalidation</strong></p><ul><li><em>Policy</em>: send the configured <strong>invalidation header</strong> to purge a single entry or the whole cache. Ideal for release/ETL events.</li><li><em>Scope</em>: programmatically delete entries or version your keys (e.g., prefix with v2:) so a deployment flips the “namespace.”</li></ul><h3>Real-world patterns</h3><h3>1) “Static enough” GETs → HTTP Caching policy</h3><p>Set ttl (e.g., 300–600s), enable useHttpCacheHeaders=true so standard directives apply. Place <strong>authn/allowlist/rate limits before</strong> HTTP Caching.</p><h3>2) Expensive inner work → Cache scope (+ OSv2)</h3><p>Wrap the DB/HTTP composite in a Cache scope. Use an <strong>OSv2-backed</strong> object store for multi-worker consistency; set eviction and max entries there.</p><h3>3) Mixed strategy</h3><ul><li>Use <strong>policy</strong> to cache frequently requested hourly/daily summaries at the edge.</li><li>Use <strong>scope</strong> to cache granular intermediate data (humidity/wind aggregations) so later requests can reuse them without recomputing.</li></ul><h3>Common pitfalls (and how to avoid them)</h3><ol><li><strong>Rate limit after the caching policy:</strong><br> Those cached responses won’t be rate-limited. Put must-apply controls <strong>before</strong> caching; then cache.</li></ol><p>2. <strong>Expecting cross-worker hits with the default Cache scope</strong><br> Default is per-worker memory. Use <strong>OSv2</strong> to share.</p><p><strong>3. Under- or over-keying</strong><br> Miss required headers/params → <strong>wrong hits</strong>. Include only the inputs that shape the response. Over-keying (e.g., all headers) destroys your hit ratio.</p><p><strong>4. Caching non-repeatable streams</strong><br> Scope won’t cache what it can’t repeat. Ensure repeatable streams or transform into repeatable content first.</p><p><strong>5. Unbounded in-memory caches</strong><br> For large entries or long TTLs, move to an <strong>object store</strong> and tune max entries/TTL centrally.</p><h3>When to Use Cache Policy</h3><p>Cache Policy is ideal when:</p><ul><li><strong>API-First Approach</strong>: You’re following an API-first design where caching should be transparent to the implementation</li><li><strong>Multiple Implementations</strong>: Your API might be implemented across different technologies or services</li><li><strong>Centralized Cache Management</strong>: You want to manage caching behavior centrally through API Manager</li><li><strong>Cross-Cutting Concerns</strong>: Caching is a cross-cutting concern that should apply regardless of the backend implementation</li><li><strong>Simple Caching Needs</strong>: Your caching requirements are straightforward and don’t need complex conditional logic.</li></ul><h3>When to Use Cache Scope</h3><p>Cache Scope is ideal when:</p><ul><li><strong>Fine-Grained Control</strong>: You need precise control over what gets cached within your flow</li><li><strong>Complex Cache Keys</strong>: Your cache key needs to be derived from payload data or complex business logic</li><li><strong>Conditional Caching</strong>: You need to implement sophisticated rules about when to cache</li><li><strong>Partial Flow Caching</strong>: You want to cache only specific portions of your flow execution</li><li><strong>Integration with Business Logic</strong>: Caching decisions need to be tightly integrated with your application’s business logic</li></ul><p>Thanks for reading! Please feel free to like and follow me for more articles in the future.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5e2d4e45295" width="1" height="1" alt=""><hr><p><a href="https://medium.com/another-integration-blog/cache-policy-vs-cache-scope-in-mulesoft-a-practical-production-ready-guide-d5e2d4e45295">Cache Policy vs. Cache Scope in MuleSoft — a Practical, Production-Ready Guide</a> was originally published in <a href="https://medium.com/another-integration-blog">Another Integration Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An In-depth Look at Anypoint API Experience Hub: Redefining API Management]]></title>
            <link>https://medium.com/another-integration-blog/an-in-depth-look-at-anypoint-api-experience-hub-redefining-api-management-13080becc511?source=rss-b63c3192756b------2</link>
            <guid isPermaLink="false">https://medium.com/p/13080becc511</guid>
            <category><![CDATA[experience]]></category>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[mulesoft]]></category>
            <dc:creator><![CDATA[Gursimran Singh Ranhotra]]></dc:creator>
            <pubDate>Mon, 15 Sep 2025 08:03:15 GMT</pubDate>
            <atom:updated>2025-11-25T15:42:00.294Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>An In-depth Look at Anypoint API Experience Hub: Redefining API Management</strong></p><p>APIs have become the backbone of modern businesses, driving integrations, innovations, and seamless digital experiences. But how do you ensure your APIs are not just functional but also engaging, discoverable, and impactful? Enter the <strong>Anypoint API Experience Hub</strong> — MuleSoft’s game-changing solution designed to bridge the gap between API providers and consumers, making APIs the true heroes of your digital ecosystem.</p><p>This blog dives deep into the <strong>Anypoint API Experience Hub (AEH)</strong>, its standout features, components, and how it compares to other tools in MuleSoft’s arsenal. Let’s uncover how AEH transforms APIs from mere technical assets into strategic enablers of growth.</p><h3>Why the Anypoint API Experience Hub Matters</h3><p>Imagine you’re a developer searching for the perfect API to solve your integration problem. What if, instead of combing through dense documentation or confusing portals, you discover a beautifully designed API hub that lets you:</p><ul><li>Quickly find the right API with intuitive search.</li><li>Explore interactive documentation with real-time testing.</li><li>Understand use cases through visually appealing content.</li></ul><p>That’s the power of AEH — transforming how APIs are consumed, adopted, and monetized. It’s not just about managing APIs; it’s about crafting an experience that delights developers and drives business value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*ytc_HldC6ztVng5KHFX4oQ.png" /></figure><h3>Core Features of the Anypoint API Experience Hub</h3><p>AEH is packed with features that cater to both technical and business users. Let’s take a closer look at its key components:</p><h4>1. Unified API Catalog: A Single Source of Truth</h4><p>The Unified API Catalog consolidates APIs from diverse environments — on-premises, cloud, or hybrid — into one searchable repository. Here’s why it stands out:</p><ul><li><strong>Comprehensive Search</strong>: Advanced filters and metadata tagging ensure developers can locate APIs by functionality or use case.</li><li><strong>Centralized Access</strong>: No more scattered documentation; all your APIs are accessible in one place.</li><li><strong>Seamless Integration</strong>: APIs from various platforms can be published effortlessly, maintaining a cohesive ecosystem.</li></ul><h4>2. Self-Service API Portal: Empower Your Consumers</h4><p>The self-service portal is the beating heart of AEH, designed to simplify API adoption. Key highlights include:</p><ul><li><strong>Interactive API Documentation</strong>: Real-time “try-it-out” features let users test APIs directly from the portal, reducing friction.</li><li><strong>Tutorials and Use Cases</strong>: Step-by-step guides help both technical and non-technical users understand API functionality.</li><li><strong>Developer Tools</strong>: Pre-built SDKs, libraries, and sample code accelerate integration efforts.</li></ul><h4>3. Customizable API Landing Pages: Tell Your API Story</h4><p>Your APIs deserve more than plain text. With AEH, you can create branded, visually appealing landing pages that:</p><ul><li><strong>Highlight Use Cases</strong>: Showcase practical applications of your APIs to inspire developers.</li><li><strong>Share Success Stories</strong>: Include testimonials and case studies to build credibility.</li><li><strong>Incorporate Multimedia</strong>: Videos, infographics, and diagrams make technical content engaging.</li></ul><h4>4. Built-in API Marketplace: Monetize Your APIs</h4><p>Turn your APIs into revenue generators with AEH’s marketplace capabilities:</p><ul><li><strong>Flexible Pricing Models</strong>: Offer subscription-based, tiered, or pay-per-use options.</li><li><strong>Enhanced Discoverability</strong>: Position your APIs prominently to internal teams and external partners.</li><li><strong>Consumption Insights</strong>: Analytics tools provide visibility into usage patterns and revenue streams.</li></ul><h4>5. Analytics and Reporting: Make Data-Driven Decisions</h4><p>Understanding API engagement is critical for growth. AEH provides:</p><ul><li><strong>Consumer Behavior Insights</strong>: Learn which APIs are most popular and why.</li><li><strong>Performance Metrics</strong>: Monitor response times, error rates, and more.</li><li><strong>Engagement Tracking</strong>: Gauge how users interact with your API documentation and portals.</li></ul><h3>How to Set Up Anypoint API Experience Hub</h3><p>AEH is designed to get you up and running quickly, even if you’re new to API management. Here’s a step-by-step guide to set up your hub:</p><h4>Step 1: Secure the Right Licenses</h4><p>Before you dive in, ensure you have the necessary licenses:</p><ul><li><strong>Salesforce License</strong>: Needed for accessing the Salesforce Experience Builder.</li><li><strong>External Identity Licenses</strong>: These determine the number of API access requests your portal can handle. A minimum of 2000 licenses supports 100 API access requests.</li></ul><h4>Step 2: Publish Your APIs to the Unified Catalog</h4><ol><li>Use Anypoint Platform’s tools to upload API specifications (RAML, OpenAPI, etc.).</li><li>Add metadata, tags, and documentation to improve discoverability.</li><li>Automate updates with CI/CD pipelines for consistent API lifecycle management.</li></ol><h4>Step 3: Build Your Portal</h4><ol><li>Choose from OOTB templates to create a professional-looking portal.</li><li>Customize with your branding, adding logos, colors, and multimedia elements.</li><li>Configure interactive documentation so users can test APIs directly from the portal.</li></ol><h4>Step 4: Enable Monetization</h4><ol><li>Define pricing models that suit your business goals (e.g., subscription or pay-per-use).</li><li>Set up payment gateways and monitoring tools to track revenue.</li><li>Use analytics to identify high-demand APIs and optimize pricing.</li></ol><h4>Step 5: Launch and Iterate</h4><ol><li>Conduct user testing to ensure a seamless experience.</li><li>Monitor analytics and gather feedback to refine the portal.</li><li>Continuously update content and features to keep users engaged.</li></ol><h3>How Does AEH Compare to ACM and Anypoint Exchange?</h3><p>While AEH, ACM, and Anypoint Exchange share a common goal of improving API usability, their approaches are distinct:</p><h4>AEH vs. ACM (API Community Manager)</h4><ul><li><strong>Focus</strong>: AEH is consumer-oriented, emphasizing API discovery and monetization, while ACM fosters API-centric communities with forums and case management.</li><li><strong>Setup</strong>: AEH simplifies portal creation with OOTB templates, whereas ACM requires more Salesforce expertise.</li><li><strong>Customization</strong>: AEH offers greater flexibility with modern design standards.</li></ul><h4>AEH vs. Anypoint Exchange</h4><ul><li><strong>Purpose</strong>: Exchange serves as a repository for integration assets, catering to developers seeking reusable components. AEH, by contrast, is designed to engage and onboard API consumers.</li><li><strong>Monetization</strong>: Only AEH supports API monetization, enabling businesses to generate revenue directly.</li><li><strong>User Experience</strong>: AEH provides interactive portals with try-it-out features, while Exchange focuses on asset downloads.</li></ul><h3>Why Choose Anypoint API Experience Hub?</h3><p>With its robust features, AEH is more than a tool — it’s a strategy for API success. Here’s why organizations love it:</p><ul><li><strong>Quick Deployment</strong>: Launch API portals in minutes, not weeks.</li><li><strong>Enhanced Engagement</strong>: Delight developers and business users with intuitive, interactive experiences.</li><li><strong>Revenue Potential</strong>: Turn APIs into profit centers with flexible monetization options.</li><li><strong>Scalability</strong>: Support growing ecosystems with tools designed for seamless integration and collaboration.</li></ul><h3>Conclusion</h3><p>The Anypoint API Experience Hub redefines what’s possible with APIs. It’s not just about managing integrations; it’s about creating vibrant, consumer-centric ecosystems that drive growth, innovation, and revenue. Whether you’re an API provider looking to boost adoption or a business leader aiming to monetize digital assets, AEH is your go-to solution.</p><p>Ready to transform your API strategy? Let’s build something extraordinary together!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=13080becc511" width="1" height="1" alt=""><hr><p><a href="https://medium.com/another-integration-blog/an-in-depth-look-at-anypoint-api-experience-hub-redefining-api-management-13080becc511">An In-depth Look at Anypoint API Experience Hub: Redefining API Management</a> was originally published in <a href="https://medium.com/another-integration-blog">Another Integration Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Revolutionize Your API Strategy: How Anypoint Platform Gateways Are Redefining the Future of…]]></title>
            <link>https://medium.com/another-integration-blog/revolutionize-your-api-strategy-how-anypoint-platform-gateways-are-redefining-the-future-of-105862ab3ae4?source=rss-b63c3192756b------2</link>
            <guid isPermaLink="false">https://medium.com/p/105862ab3ae4</guid>
            <category><![CDATA[gateway]]></category>
            <category><![CDATA[business]]></category>
            <category><![CDATA[mulesoft]]></category>
            <dc:creator><![CDATA[Gursimran Singh Ranhotra]]></dc:creator>
            <pubDate>Sun, 05 Jan 2025 14:24:29 GMT</pubDate>
            <atom:updated>2025-01-14T00:00:43.075Z</atom:updated>
            <content:encoded><![CDATA[<h3>Revolutionize Your API Strategy: How Anypoint Platform Gateways Are Redefining the Future of Integration!</h3><p>Managing APIs and microservices is no longer a luxury — it’s a necessity in today’s digital-first world. Whether you’re running APIs on MuleSoft or diverse platforms, choosing the right gateway can make or break your operations. Anypoint Platform provides a robust ecosystem for API management, including its versatile gateways that act as the cornerstone for enforcing policies, securing APIs, and ensuring scalability. Let’s break down MuleSoft’s <strong>Mule Gateway</strong> and <strong>Flex Gateway</strong>, exploring their pros, cons, and how to pick the best fit for your needs!</p><h3>🌀 What’s an API Gateway Anyway?</h3><p>Imagine a gateway as your traffic cop — controlling, securing, and optimizing every API request and response. API gateways serve as intermediaries between API clients (such as applications or end-users) and the backend services. They manage API traffic, enforce security policies, and provide a single entry point for monitoring and scaling API usage. MuleSoft’s <strong>Mule Gateway</strong> and <strong>Flex Gateway</strong> go beyond basics, offering advanced traffic management, policy enforcement, and security.</p><h3>1.🥇 Mule Gateway: Tailored for MuleSoft APIs</h3><p>Mule Gateway works hand-in-glove with Mule runtimes. It is seamlessly integrated with MuleSoft’s design-time tools and provides out-of-the-box capabilities for API management. If your APIs are developed in MuleSoft, this is your native choice!</p><h4>🚀Key Features:</h4><ul><li><strong>Native Integration</strong>: Works natively with Mule applications and APIs.</li><li><strong>Policy Enforcement</strong>: Apply policies such as rate limiting, authentication, and logging.</li><li><strong>Centralized Management</strong>: Full control via Anypoint API Manager.</li><li><strong>Built-in Analytics</strong>: Offers insights into API traffic and performance.</li><li><strong>Deployment Options</strong>: Supports on-premises, cloud, or hybrid environments.</li></ul><h4>🎯 <strong>Best For</strong>:</h4><p>Ideal for organizations heavily invested in MuleSoft’s runtime, needing an integrated and straightforward solution for managing Mule applications.</p><p><strong>✨ Pros:</strong></p><ul><li><strong>Seamless Integration:</strong> Works natively with Mule APIs.</li><li><strong>Centralized Management:</strong> Single point of control via API Manager.</li><li><strong>Built-in Analytics:</strong> Easy-to-understand insights for API performance.</li><li><strong>Versatile Deployment:</strong> Works in on-prem, cloud, or hybrid setups.</li></ul><p><strong>⚠️ Cons:</strong></p><ul><li><strong>Mule-Dependent:</strong> Limited to APIs built with Mule runtime.</li><li><strong>Heavier Footprint:</strong> Slower than modern, lightweight alternatives.</li></ul><h3>2.🚀 Flex Gateway: The Future of API Management</h3><p>Designed for flexibility, Flex Gateway is fast, lightweight, and works across all runtimes — not just MuleSoft.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*RuibTXWex0ehEnGgHEtWYQ.jpeg" /></figure><h4>🚀Key Features:</h4><ul><li><strong>Independent Runtime</strong>: Manages APIs built on any platform, not limited to MuleSoft.</li><li><strong>Lightweight and Fast</strong>: Optimized for high-performance workloads.</li><li><strong>Deployment Flexibility</strong>: Can be deployed as a sidecar, ingress controller, or standalone process.</li><li><strong>Secure</strong>: Provides robust security features such as mutual TLS, OAuth 2.0, and OpenID Connect.</li><li><strong>Observability</strong>: Integrated with Anypoint Monitoring for traffic analysis and troubleshooting.</li></ul><h4>🌍Deployment Models:</h4><ol><li><strong>Standalone</strong>: Flex Gateway operates as an independent service within a single network to secure API traffic.<br><strong>Best For</strong>: Organizations with internal services that require API management within a protected network.</li></ol><p><strong>2. Egress Deployment</strong>: Manages outbound API traffic from an organization’s internal network to external APIs or services.<br><strong>Best for</strong>: Controlling and securing outbound API communications.</p><p><strong>3. Ingress Deployment</strong>: Designed to manage external traffic entering an internal network, typically deployed behind a load balancer.<br><strong>Best For</strong>: Managing public-facing APIs and securing entry points.</p><p><strong>4. Sidecar</strong>: Embeds Flex Gateway within each microservice’s deployment unit, such as a Kubernetes pod.<br><strong>Best For</strong>: Microservices architectures requiring localized API management.</p><h4>🎯 <strong>Best For</strong>:</h4><p>Best suited for enterprises using diverse APIs across hybrid or multi-cloud environments, needing a single, high-performance gateway solution.</p><p><strong>✨ Pros:</strong></p><ul><li><strong>Platform-Agnostic:</strong> Handles Mule and non-Mule APIs.</li><li><strong>Blazing Fast:</strong> Optimized for high-performance workloads.</li><li><strong>Deployment Freedom:</strong> Use as a sidecar, ingress controller, or standalone process.</li><li><strong>Security Powerhouse:</strong> Built-in mTLS, OAuth 2.0, and OpenID Connect.</li><li><strong>Observability:</strong> Advanced monitoring with tools like Prometheus and Grafana.</li></ul><p><strong>⚠️ Cons:</strong></p><ul><li><strong>Learning Curve:</strong> Requires initial setup and adaptation for Mule users.</li><li><strong>Kubernetes Dependency for Certain Features</strong>: Full potential relies on Kubernetes for ingress control and microservices orchestration.</li><li><strong>Lack of Legacy Support</strong>: Not ideal for legacy, non-modernized environments.</li></ul><h3>❌ Goodbye, Anypoint Service Mesh</h3><p>MuleSoft has officially decommissioned Anypoint Service Mesh. The <strong>Flex Gateway</strong> now absorbs its key features, offering:</p><ul><li><strong>Enhanced Scalability:</strong> Beyond Kubernetes-only environments.</li><li><strong>Unified Policy Management:</strong> Across APIs and services.</li><li><strong>Deeper Observability:</strong> Leverages Istio for seamless microservices communication.</li><li><strong>Advanced Features</strong>: Flex Gateway incorporates enhanced security, observability, and performance optimization tools.</li></ul><h3>Flex Gateway for Service Mesh Use Cases</h3><p>Flex Gateway retains the core capabilities of Anypoint Service Mesh while introducing additional benefits like API-Level Traffic Control, mTLS Support, Seamless Integration with Istio and Observability.<strong> </strong>For detailed integration steps, check MuleSoft’s documentation: <a href="https://docs.mulesoft.com/gateway/latest/flex-gateway-istio">Flex Gateway and Istio</a>.</p><h3>Key Differences Between Mule Gateway and Flex Gateway</h3><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8b0883183e7762eb1d2721ceb48e9462/href">https://medium.com/media/8b0883183e7762eb1d2721ceb48e9462/href</a></iframe><h3>🎯 Which Gateway Should You Choose?</h3><p>🤝 <strong>Pick Mule Gateway if:</strong></p><ul><li>You’re already invested in the MuleSoft ecosystem.</li><li>You want easy integration without learning new tools.</li></ul><p>🌟 <strong>Opt for Flex Gateway if:</strong></p><ul><li>Your environment also includes non-Mule APIs.</li><li>Scalability, speed, and versatility are your top priorities.</li></ul><h3>🔥 What’s Next? Take Action Now!</h3><p>MuleSoft’s API gateways are the key to unlocking seamless digital transformation. With the rise of hybrid environments, choosing the right gateway ensures your APIs stay secure, performant, and future-ready.</p><p>1️⃣ Assess your current API landscape: Are you MuleSoft-centric or platform-agnostic?<br>2️⃣ Experiment with Flex Gateway for unmatched flexibility and speed.<br>3️⃣ Transition seamlessly if you’re still on Anypoint Service Mesh.</p><p>💬 <strong>What’s your experience with API gateways? Share your story below!</strong> Let’s make API management a breeze together.</p><p>📢 Don’t forget to <strong>like</strong>, <strong>share</strong>, and <strong>follow</strong> for more insights into MuleSoft’s game-changing innovations! 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=105862ab3ae4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/another-integration-blog/revolutionize-your-api-strategy-how-anypoint-platform-gateways-are-redefining-the-future-of-105862ab3ae4">Revolutionize Your API Strategy: How Anypoint Platform Gateways Are Redefining the Future of…</a> was originally published in <a href="https://medium.com/another-integration-blog">Another Integration Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Ultimate Showdown: Which MuleSoft Deployment Model Will Supercharge Your Business?]]></title>
            <link>https://medium.com/another-integration-blog/the-ultimate-showdown-which-mulesoft-deployment-model-will-supercharge-your-business-8fd6d82489d9?source=rss-b63c3192756b------2</link>
            <guid isPermaLink="false">https://medium.com/p/8fd6d82489d9</guid>
            <category><![CDATA[deployment]]></category>
            <category><![CDATA[cloudhub]]></category>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[mule]]></category>
            <dc:creator><![CDATA[Gursimran Singh Ranhotra]]></dc:creator>
            <pubDate>Sun, 05 Jan 2025 14:04:05 GMT</pubDate>
            <atom:updated>2025-01-15T08:08:57.110Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s hyperconnected world, integration is the heartbeat of innovation. Imagine a seamless flow of data, systems talking to each other like lifelong friends, and your business thriving at lightning speed. That’s what MuleSoft promises — and delivers. But here’s the catch: choosing the right deployment model can make or break your strategy.</p><p>With game-changing options like <strong>CloudHub</strong>, <strong>Hybrid</strong>, <strong>Runtime Fabric</strong>, and <strong>Private Cloud Edition</strong>, the choice might seem daunting. But don’t worry — I’m here to demystify it all. Whether you’re a tech enthusiast, a business visionary, or just someone who loves clarity, this guide is your one-stop solution to making the right choice. Ready to dive in? Let’s make some integration magic happen!</p><h3>🚀 1. CloudHub 1.0: The Simplicity of a Fully Managed Cloud Platform</h3><p>💡<strong>Why complicate when you can simplify?</strong>: Picture this — you focus on innovation, while MuleSoft takes care of everything else. CloudHub 1.0 is MuleSoft’s integration dream team, offering a fully managed cloud platform where you can deploy, scale, and secure your integrations — without lifting a finger.</p><p>🌟 <strong>Perfect for</strong>:</p><ul><li>Startups and small-to-medium businesses (SMBs) that want to build and deploy integrations quickly without managing infrastructure.</li><li>Enterprises that want a simple, fully managed cloud platform with global scalability.</li></ul><p>🔑 <strong>What Makes It Amazing</strong>:</p><ul><li><strong>Fully Managed</strong>: MuleSoft handles infrastructure management, including scaling and updates.</li><li><strong>Multi-Tenant</strong>: Your application runs on shared resources with other users, but is securely isolated.</li><li><strong>Auto-Scaling</strong>: Automatically scales based on traffic.</li></ul><h4>⚙️Control Plane &amp; Runtime Plane setup:</h4><ul><li><strong>Control Plane</strong>: Managed by MuleSoft in AWS.</li><li><strong>Runtime Plane</strong>: Hosted on AWS and fully managed by MuleSoft.</li></ul><h4>✅Pros:</h4><ul><li><strong>Simple &amp; Hassle-Free</strong>: Focus purely on building integrations — no infrastructure headaches.</li><li><strong>Automatic Scaling</strong>: Traffic increases? CloudHub scales automatically.</li><li><strong>Built-In Security</strong>: MuleSoft manages security, keeping your data safe.</li></ul><h4>⚠️Cons:</h4><ul><li><strong>Limited Customization</strong>: You can’t customize cloud features including network or security configurations. Additionally, you cannot share resources directly via domain.</li><li><strong>Data Residency Concerns</strong>: CloudHub primarily operates on AWS, and the data centers may not meet specific regional or compliance requirements for certain industries.</li></ul><h3>🔥 2. CloudHub 2.0: Next-Level Cloud, More Control</h3><p>💡<strong>When control meets convenience</strong>: You asked for more control — and MuleSoft listened. CloudHub 2.0 offers almost everything that CloudHub 1.0 does, plus added flexibility, security, and dedicated resources. It’s a full-on cloud powerhouse that gives you the flexibility to manage your integrations exactly the way you want.</p><p>🌟 <strong>Perfect for</strong>:</p><ul><li>Medium to large enterprises that need cloud flexibility with more granular control over network configurations and security.</li><li>Businesses with higher traffic volumes or stricter security requirements.</li></ul><h4>💡 Why You’ll Love It:</h4><ul><li><strong>Dedicated Workers</strong>: Choose shared or dedicated workers based on performance needs.</li><li><strong>Zero Downtime</strong>: Deploy updates without interrupting running applications.</li><li><strong>Enhanced VPC Integration</strong>: Better network isolation and customizable VPC peering.</li></ul><h4>⚙️Control Plane &amp; Runtime Plane setup:</h4><ul><li><strong>Control Plane</strong>: Managed by MuleSoft with more network customization options.</li><li><strong>Runtime Plane</strong>: Also managed by MuleSoft, but with tighter security controls and more flexibility.</li></ul><h4>✅Pros:</h4><ul><li><strong>More Control</strong>: Customize network configurations, granular vCores allocation option, higher app deployment size and option to choose between shared or dedicated resources.</li><li><strong>Zero Downtime</strong>: Seamless rolling updates mean no downtime during deployments.</li><li><strong>Improved Security</strong>: Advanced security features with better network isolation.</li></ul><h4>⚠️Cons:</h4><ul><li><strong>Still Cloud-Based</strong>: You’re still tied to MuleSoft’s cloud infrastructure, which might not meet the strictest privacy and regulatory needs.</li><li><strong>Still Limited Control</strong>: While it’s more flexible than CloudHub 1.0, you’re still reliant on MuleSoft’s infrastructure.</li></ul><h3>🌐 3. Hybrid Deployment: Flexible Cloud + On-Premise</h3><p>💡<strong>Why settle for one when you can have both?</strong>: With Hybrid, you get the best of both worlds — scalability in the cloud, security on-prem. For organizations handling sensitive data, Hybrid deployment gives you the flexibility to mix cloud power and on-premise control like a pro.</p><p>🌟 <strong>Perfect for</strong>:</p><ul><li>Large enterprises that have compliance requirements to keep certain data or services on-prem while using the cloud for less sensitive workloads.</li><li>Organizations that want flexibility to mix on-prem and cloud resources.</li></ul><h4>💡 Why You’ll Love It:</h4><ul><li><strong>Split Deployment</strong>: Run some/complete services on-premises while remaining are in the cloud.</li><li><strong>Centralized Management</strong>: Manage all deployments through Anypoint Platform, regardless of where they run.</li><li><strong>Flexible Scaling</strong>: Dynamically scale your cloud resources while maintaining full control over on-prem infrastructure.</li></ul><h4>⚙️Control Plane &amp; Runtime Plane setup:</h4><ul><li><strong>Control Plane</strong>: Managed by MuleSoft, with your team having partial control depending on the setup.</li><li><strong>Runtime Plane</strong>: Split between MuleSoft’s cloud and your on-prem infrastructure or completely with on-prem</li></ul><h4>✅Pros:</h4><ul><li><strong>Ultimate Flexibility</strong>: Choose where to deploy workloads — cloud for scalability, on-prem for security.</li><li><strong>Unified Platform</strong>: Manage both cloud and on-prem integrations from one place.</li><li><strong>Compliance-Ready</strong>: Keep sensitive data on-prem while taking advantage of the cloud for non-sensitive tasks. Ideal for industries with strict data security and privacy regulations.</li></ul><h4>⚠️Cons:</h4><ul><li><strong>Complex Setup</strong>: Requires strong IT expertise to manage both environments.</li><li><strong>Higher Costs</strong>: You might need to invest in both cloud and on-prem infrastructure, which can increase expenses. You’re responsible for updates, patches, scaling, and monitoring.</li></ul><h3>☁️ 4. Private Cloud Edition (PCE): Cloud Features, Private Control</h3><p>💡 <strong>Cloud power, your way</strong>: The Private Cloud Edition (PCE) is like having your own personal cloud — packed with all the cutting-edge features of cloud technology, but under your roof. It’s your infrastructure, your rules. MuleSoft’s Kubernetes-powered PCE gives you the full cloud experience with total control.</p><p>🌟 <strong>Perfect for</strong>:</p><ul><li>Enterprises that want the flexibility and scalability of cloud technologies but need to keep control over their infrastructure.</li><li>Organizations that require strict security and compliance but still want cloud-native features.</li></ul><h4>🔑 What Makes It Amazing:</h4><ul><li><strong>Private Cloud</strong>: Leverage cloud features like auto-scaling within your private cloud infrastructure.</li><li><strong>Kubernetes Integration</strong>: Built on Kubernetes, allowing for high availability and dynamic scaling.</li><li><strong>Custom Security</strong>: Full control over security and compliance policies within your own environment.</li></ul><h4>⚙️Control Plane &amp; Runtime Plane:</h4><ul><li><strong>Control Plane</strong>: Self-managed within your private cloud.</li><li><strong>Runtime Plane</strong>: Runs on your private cloud infrastructure, with cloud-native tools like Kubernetes.</li></ul><h4>✅Pros:</h4><ul><li><strong>Cloud Flexibility</strong>: Gain the benefits of cloud technologies (like scalability) within a secure, private infrastructure.</li><li><strong>Control Over Security</strong>: Full control of security, making it easier to comply with regulations.</li><li><strong>Cloud-Native Features</strong>: Benefit from dynamic scaling, high availability, and resilience through Kubernetes.</li></ul><h4>⚠️Cons:</h4><ul><li><strong>Complex Setup</strong>: Managing Kubernetes and private cloud infrastructure requires significant expertise.</li><li><strong>Ongoing Maintenance</strong>: You’re responsible for managing and scaling your private cloud.</li></ul><h3>💡 5. Runtime Fabric: Deploy Anywhere, Anytime, Powered by Kubernetes</h3><p>💡<strong>The Kubernetes-Powered Integration Maestro</strong>: Ready to unleash your potential in the cloud, on-premise, or anywhere in between? Runtime Fabric’s Kubernetes-powered deployment gives you unmatched flexibility and scalability. It’s like the Swiss Army knife of deployment solutions. It’s the go-to choice for organizations that prioritize resilience, scalability, and multi-cloud options.</p><h4>🌟 <strong>Perfect for</strong>:</h4><ul><li>Enterprises that want to deploy Mule applications across multiple cloud providers or in hybrid environments.</li><li>Organizations that need a resilient, scalable solution for mission-critical applications.</li></ul><h4>🔑 <strong>What Makes It Amazing</strong>:</h4><ul><li><strong>Kubernetes-Based</strong>: Built on Kubernetes for dynamic scaling, resilience, and portability.</li><li><strong>Multi-Cloud Flexibility</strong>: Supports deployment on AWS, Azure, Google Cloud, or on-prem.</li><li><strong>Centralized Management</strong>: Use Anypoint Platform to manage all deployments from one place.</li></ul><h4>⚙️Control Plane &amp; Runtime Plane:</h4><ul><li><strong>Control Plane</strong>: Managed via Anypoint Platform, with your team controlling Kubernetes clusters.</li><li><strong>Runtime Plane</strong>: Deployed on Kubernetes clusters, either in the cloud or on-premises.</li></ul><h4>✅Pros:</h4><ul><li><strong>Run Anywhere</strong>: Deploy across cloud, on-prem, or hybrid environments.</li><li><strong>Kubernetes Power</strong>: Dynamic scaling, high availability, and fault tolerance via Kubernetes.</li><li><strong>Resilient &amp; Flexible</strong>: Designed for highly available, scalable deployments.</li></ul><h4>⚠️Cons:</h4><ul><li><strong>Kubernetes Expertise Required</strong>: Managing Kubernetes clusters can be complex and requires specialized skills.</li><li><strong>Higher Management Overhead</strong>: More management responsibilities compared to fully managed cloud options.</li></ul><h3>Detailed Comparison of MuleSoft Deployment Models</h3><p>The following diagram elucidates the relative positioning of each deployment model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-hJ0dyh0lPONofGe--ROWw.png" /></figure><p>The subsequent table offers a comprehensive differentiation of each deployment model:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cc979aa5c505638ac514f75532a02f62/href">https://medium.com/media/cc979aa5c505638ac514f75532a02f62/href</a></iframe><h3>The Big Question: Which Model Is Right for You?</h3><p>Selecting the right MuleSoft deployment model depends on your business’s goals, security requirements, and technical capacity. If you need something quick and easy, CloudHub or CloudHub 2.0 might be the right choice. If you’re looking for more control and security, Hybrid or On-Premise deployment could fit your needs. For cloud-native features in a private environment and Kubernetes setup, PCE or Runtime Fabric will give you the flexibility, security and scalability you need.</p><p>👉 Want it fast and easy? Go with CloudHub. <br>👉 Need more control? Choose CloudHub 2.0. <br>👉 Balancing security and scalability? Hybrid is your jam. <br>👉 Strict security and compliance? PCE is the answer.<br>👉Craving unparalleled flexibility across environments with Kubernetes at the core? RTF is your weapon of choice.</p><p>The decision you make will shape how you scale, integrate, and succeed. The right MuleSoft deployment model can unleash your business growth like never before. So, what are you waiting for? Choose your path, and let the integration magic begin!</p><p>This isn’t just a blog. It’s your business’ next big step.<strong><br></strong>📢 Don’t forget to like, share, and follow for more insights into MuleSoft’s game-changing innovations! 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8fd6d82489d9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/another-integration-blog/the-ultimate-showdown-which-mulesoft-deployment-model-will-supercharge-your-business-8fd6d82489d9">The Ultimate Showdown: Which MuleSoft Deployment Model Will Supercharge Your Business?</a> was originally published in <a href="https://medium.com/another-integration-blog">Another Integration Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implementing One-Way SSL for MuleSoft Applications]]></title>
            <link>https://medium.com/@gursimransingh1298/implementing-one-way-ssl-for-mulesoft-applications-3173aa4965f2?source=rss-b63c3192756b------2</link>
            <guid isPermaLink="false">https://medium.com/p/3173aa4965f2</guid>
            <category><![CDATA[ssl]]></category>
            <category><![CDATA[mulesoft]]></category>
            <dc:creator><![CDATA[Gursimran Singh Ranhotra]]></dc:creator>
            <pubDate>Mon, 08 Apr 2024 15:27:04 GMT</pubDate>
            <atom:updated>2024-04-08T15:39:35.039Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>In one-way SSL authentication, the server application shares its public certificate with the client. <br>Here, only the Client validates the server; the server does not verify the client application. When implementing one-way SSL authentication, the server application shares its public certificate with the Client.</p><p>In this article, we will be going to learn various terms related to SSL and how to set up the one-way SSL for MuleSoft applications.</p><h3>Important terminologies:</h3><p>Let’s go over some key terms that will help you understand the rest of this article-</p><p>T<strong>ransport Layer Security (TLS)</strong> is a cryptographic protocol designed to provide communications security over a computer network. The protocol is widely used in applications such as email, and instant messaging, but it’s use in securing HTTPS remains the most publicly visible (e.g. web packages and servers, including a web browser loading page).</p><p>TLS protocol uses Digital Certificates which will be configured on the Client and Server sides to secure (encrypt/decrypt data) the communication over a transport layer. This blog describes TLS as supported by Mule and how to configure TLS in Mule apps.</p><p>D<strong>igital Certificates: </strong>They<strong> </strong>are Public/Private keys Signed by <strong>Certificate Authority (CA) </strong>or self-signed certificates, used for communication over a TLS/SSL protocol. With this client and server can identify each other authenticity.</p><p><strong>Self-Signed Certificate: </strong>A Self Signed Certificate is not signed by a trusted Certificate Authority(CA) but instead is signed with its own private key.</p><p><strong>CA-signed Certificate: </strong>A CA-signed certificate is a certificate that has been issued and signed by a publicly trusted certificate authority (CA).</p><p>K<strong>eystore: </strong>It is<strong> </strong>a repository where private keys, certificates (public keys) and symmetric keys can be stored. This is typically a file. A Keystore contains private keys and associated certificates having the public key. KeyStore has its dedicated password. Each entry of a private key/certificate combination in Keystore has its own dedicated password. The owner/Server retrieves a certificate from its KeyStore and presents it to the other side</p><p>T<strong>ruststore: </strong>It is<strong> </strong>a repository where certificates (public keys) can be stored. This is typically a file. A trust store has a list of all certificates that clients trust. These could be certificates of Trusted CA and self-signed certificates of trusted parties. So when a server presents its certificate, the Client will verify it using the certificates stored in TrustStore. A password also protects TrustStore.</p><p><strong>Note</strong>: Mule supports many types of keystores, including:</p><ul><li>JCEKS</li><li>PKCS12</li><li>JKS</li></ul><h3>One Way SSL</h3><p>As mentioned above in one way SSL only client verifies the server certificates. At the server end, there will be a Keystore that will hold the private and public certificates of the server whereas, at the client end, there will be a Truststore that will hold the public certificate of the server.</p><p>In <strong>one</strong>–<strong>way TLS</strong> authentication (Server Certificate Authentication), only the Client validates the server; the server does not verify the client application. When implementing <strong>one</strong>–<strong>way TLS </strong>authentication, the server application shares its public certificate with the Client.</p><h3>Implementing One Way SSL For MuleSoft Application</h3><p>For generating Keystore and Truststore, we can use OpenSSL or keytool utility. For this article, we will be using keytool which is part of your JDK.</p><h3>1. Generate Server Keystore</h3><p>For generating Keystore, we will be using the below command. <br>You can generate the Keystore for the server using the Java Keytool tool preinstalled with the JDK. To generate the Keytool, open your terminal/cmd and enter the following command, which would generate Keystore with RSA 2048 bit keypair saved in the location.</p><pre>keytool -genkey -alias mule-server -keysize 2048 -keyalg RSA -keystore C:/Certificates/server-keystore.jks</pre><p>Once we execute the above command, it will ask for the Keystore password, first and last name including other details, and the key password.</p><p><strong>alias </strong>in the above command is used to search the certificate in the Keystore as there can be multiple certificates in the same Keystore and alias is useful in identifying the right certificate.</p><h3>2. Export the Public Certificate From the Server Keystore:</h3><p>We will be requiring the server public certificate to be installed in the client truststore. So we need to extract the public key from the server Keystore.</p><p>For extracting the server public certificate, we will be using the below export command.</p><pre>keytool -export -alias mule-server -keystore C:/Certificates/server-keystore.jks -file C:/Certificates/server_public.crt</pre><h3><strong>3. Import Server Public Certificate Into Client Truststore:</strong></h3><p>For importing the server public key into the client truststore, we will be using the below command.</p><p>This below command will generate the client’s truststore and import the server public certificate.</p><pre>keytool -import -alias mule-client-public -keystore C:/Certificates/client-truststore.jks -file C:/Certificates/server_public.crt</pre><p>Thus, we can see that all required certificates and files are created inside the desired folder-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C5yKXJZ8hBkxUhunPon78A.png" /></figure><h3>4. Configuring MuleSoft HTTP Listener and Requester</h3><p>Let’s see how we can configure Keystore and Truststore on the MuleSoft application.</p><p>We need to make sure <strong>server-Keystore.jks and client-truststore.jks</strong> that are generated in the above steps, must be copied under folder <strong>src/main/resources</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/355/1*nPTz-d5mP3J5ygaJ5SBMTw.png" /></figure><p>Now, we will configure the server Keystore on the MuleSoft HTTP Listener. Under General Settings, the Protocol must be “HTTPS”.</p><h3><strong>Server/listener configuration:</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/0*kMQRnzEmjVQzAXin.png" /></figure><p>Now, we will perform a TLS Key Store configuration. Provider Type, Keystore Path, Keystore and key password, and alias name.<br>(Alias can be left blank if your Keystore has one 1 keypair).</p><p>Go to the TLS tab and click on Keystore configuration-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/609/1*bzBFPKK66FRMaP0PPJHhFw.png" /></figure><p>Test the connection, to see if it&#39;s successful-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*Jj6aJytG7OmFzOM0omKt1w.png" /></figure><p>This is the configuration that needs to be done on the server side.</p><h3><strong>Client/Requester Configuration:</strong></h3><p>Now, we will see the client-side configuration. For that, we will be using the MuleSoft HTTP requester. Provide the connection settings on the HTTP requester.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/559/0*HWJJCv3SPxTfa8Z5.png" /></figure><p>Now, we will do the TLS configuration. Provide the client’s Truststore path, password, type, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*ci3-lyYn15US5TiLu3fHiA.png" /></figure><p><strong>Server Flow</strong>-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/232/1*v9RrODoc4Svdjw7UFXUQ7g.png" /></figure><p><strong>Client Flow</strong>-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/196/1*jXjr5qcHKUuWfvYScrfvsw.png" /></figure><p>That’s it! <br>We just set up a TLS connection with our HTTP listener acting as the server and the requester we configured acting as a Client. To test the created application, we could create an HTTP listener sending a request to the server endpoint. The client HTTP listener accepts HTTP requests here so we can hit the postman or any other client without any issue.</p><p>Thanks for reading!<br>Please feel free to comment and follow<strong> </strong>me for more helpful articles and insights in the future.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3173aa4965f2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[All about Tracing Module and MDC Logging in MuleSoft]]></title>
            <link>https://medium.com/another-integration-blog/mdc-logging-in-mulesoft-353eed7966e9?source=rss-b63c3192756b------2</link>
            <guid isPermaLink="false">https://medium.com/p/353eed7966e9</guid>
            <category><![CDATA[mdc]]></category>
            <category><![CDATA[mentor]]></category>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[tracing]]></category>
            <dc:creator><![CDATA[Gursimran Singh Ranhotra]]></dc:creator>
            <pubDate>Mon, 08 Apr 2024 13:29:44 GMT</pubDate>
            <atom:updated>2024-04-29T17:49:05.303Z</atom:updated>
            <content:encoded><![CDATA[<p>Tracing module enables users to enhance the logs by adding, removing, and clearing all variables from the logging context for a given Mule event. It also enables you to modify the correlation ID during flow execution.</p><p>At the end of this article, you will learn how to Change the Correlation ID During Flow Execution and different operations of configuring the Logging Variables (Clear logging variables, Remove logging variables, and Set logging variables using MuleSoft as an iPaaS tool.</p><h3>Why MDC Logging?</h3><p>MDC stands for Mapped Diagnostic Context. It enriches logging and improves tracking by providing more context and information in the logs for the current Mule event.</p><p>By default, Mule logs two MDC entries: processor, which shows the location of the current event, and event, which shows the correlation ID of the event. The logging context exists for the entire execution of the corresponding event.</p><h3>How to use MDC Logging</h3><p><strong>1</strong>. Add the Tracing Module to your Mule Project</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/465/0*vv-9bmjDWovF0S7B.png" /></figure><p><strong>2.</strong> Change Pattern Layout to MDC in log4j2.xml</p><p>Open log4j2.xml located at the <em>src/main/resources</em> of your project and replace <em>[processor: %X{processorPath}; event: %X{correlationId}] with [%MDC] </em>for Pattern Layout.</p><p>This change instructs Mule to automatically add the MDC context, which includes the correlation ID and the processor path.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CxrTD0rkdb1RO72F.png" /></figure><h4>Example log4j.xml File Configurations</h4><p>Default log4j.xml file without MDC logging:</p><pre>&lt;PatternLayout pattern=&quot;%-5p %d [%t] [processor: %X{processorPath}; event: %X{correlationId}] %c: %m%n&quot;/&gt;</pre><p>Updated log4j.xml file with MDC logging:</p><pre>&lt;PatternLayout pattern=&quot;%-5p %d [%t] [%MDC] %c: %m%n&quot;/&gt;</pre><p><strong>3.</strong> To see the variable in the console as well, kindly add the Console logging in Appenders tag. Also, add this reference to the AsyncRoot tag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*qcvqcm-wQCulH11H.png" /></figure><p>Example Log4j2.xml:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mE5N3CQPL-rEK6R-Cm8cCw.png" /></figure><p>Here, I’m attaching the entire flow covered in this blog for better understanding-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rC-X0S5SNXWWNg1FMoVCMA.png" /></figure><h3><strong>Operations:</strong></h3><h4><strong>1. Changing the Correlation ID During Flow Execution with the Tracing Module</strong></h4><p>For these scenarios, the Tracing module <strong>With CorrelationID</strong> scope enables you to modify the correlation ID during the execution of that scope.</p><ol><li>Here, I’m wrapping the 2 loggers and one transform message inside the “With correlation Id” scope.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H99qxxwD1a8qyIvrflwX3g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/366/1*TCVlEaXNHZ8ypoJ27V9F-w.png" /></figure><p>On execution, you can observe that the original correlation ID (“gursimran1234) is changed to “123” for all processors that are wrapped inside the “With Correlation Id” Scope.</p><p>Pfa the Logs below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*beiRrqmtSwIRrX4cdP2Hyg.png" /></figure><p><strong>Note</strong>: <br>When an HTTP Request is received, the request is inspected for the “X-Correlation-Id” header.</p><p>•If the “X-Correlation-Id” header is present, HTTP connector uses this as the Correlation Id.<br>• If the “X-Correlation-Id” header is not present, a Correlation Id is randomly generated.</p><p>In this scenario, I am using the below custom correlationId:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/1*IBufFelxxof3WPHt9-8vpw.png" /></figure><h4>2. Configure Logging Variables<strong>:</strong></h4><p>Here, I would describe Configuring the <strong>Clear logging variables</strong>, <strong>Removing logging variable,</strong> and the <strong>Set logging variable</strong> Tracing module operations.</p><ol><li><strong>Set Logging Variable:</strong></li></ol><p>With set logging Variable, you can log variables based on the request payload and attributes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J27zH0WGHO11epoTXWauNg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/358/1*mjrUdQeE4lqBbRFlVJTCHA.png" /></figure><p>In my flow, I am configuring its value to payload.orderId which propagates to value 123.</p><p>Thus, in the logs, you can see that OrderVar is getting printed alongside the correlationId.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vzvuSTtYPZ7RkMbTjovb1w.png" /></figure><p>I am again setting a variable that prints the variable customerVar along with it.</p><p>Final Logs:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sgvw9L_3BAyoQrl9NyBFKA.png" /></figure><p>Thus, currently, both the variables are printed successfully.</p><p><strong>2. Remove Logging Variables</strong></p><p>Removes a variable from the event logging context. In the below example, I’m removing the below logging variable (customerVar).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Voko_BZtWAmz30uy3z2jFA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/294/1*2b2FCd_ta_q3hY3dhzeMlw.png" /></figure><p>Thus, we can see that by executing this, the variable customerVar is removed from logs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zKWacFK0V0vnjjJW7FiGfA.png" /></figure><h4><strong>3. Clear Logging Variables</strong></h4><p>This Clears all the current logging variables.</p><p>As we have only one variable left now, we can see that it also gets removed after executing the Clear Logging Variables operation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/319/1*2PYRBfG8BVgj7fHouz1zpg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mZmLsnEOI8OSqJHgd3tWdQ.png" /></figure><p><strong>Note</strong>: This operation does not remove the correlation ID nor the current event processor because those variables are managed by the Mule runtime engine.</p><p>Thanks for reading!<br>Please feel free to comment and follow<strong> </strong>me for more helpful articles and insights in the future.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=353eed7966e9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/another-integration-blog/mdc-logging-in-mulesoft-353eed7966e9">All about Tracing Module and MDC Logging in MuleSoft</a> was originally published in <a href="https://medium.com/another-integration-blog">Another Integration Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Email MuleSoft Integration]]></title>
            <link>https://medium.com/another-integration-blog/email-mulesoft-integration-6f562e3b8aba?source=rss-b63c3192756b------2</link>
            <guid isPermaLink="false">https://medium.com/p/6f562e3b8aba</guid>
            <category><![CDATA[mulesoft]]></category>
            <category><![CDATA[gmail]]></category>
            <category><![CDATA[email]]></category>
            <category><![CDATA[integration]]></category>
            <dc:creator><![CDATA[Gursimran Singh Ranhotra]]></dc:creator>
            <pubDate>Thu, 04 Jan 2024 12:42:04 GMT</pubDate>
            <atom:updated>2024-01-05T22:51:23.473Z</atom:updated>
            <content:encoded><![CDATA[<p>Sending and receiving email notifications play an important role in the integration platform. At the end of this article, you will learn how to send, retrieve, count, delete email messages, and perform other related operations using different protocol servers and MuleSoft as an iPaaS tool.</p><p><strong>Important Terminologies</strong>:<br>Let’s understand some basic terminologies that would help us understand this integration better:</p><h3>SMTP</h3><p>SMTP (Simple Mail Transfer Protocol) is a widely used TCP protocol for email sending. The SMTP protocol is mainly used by the clients to send emails to the servers or for email communications between servers.<br>When you click “send” on an email, the message travels from your device to an SMTP server. An SMTP protocol on the server finds the correct route. The server sends the email to the recipient using the route it selects. Works on TCP port number 25. It does not store mail on the server it just sends the mail.</p><h3><strong>IMAP</strong></h3><p>Internet Message Access Protocol (IMAP) is an inbound email protocol. IMAP keeps your emails on the server by default and stores only small reference copies of them on your devices. This feature synchronizes your emails within every folder across all the computers associated with the account, allowing you to access your messages via multiple devices.<br>Since IAMP allows access to emails from multiple locations simultaneously, it keeps the email on the server after being delivered. Also, it doesn’t download the entire email until the recipient opens it. Works on TCP port number 143. It stores all mail on the server and downloads when it gets request to download.</p><h3>POP3</h3><p>POP3, short for post office protocol, version 3, is an inbound email protocol. An inbound protocol allows a device to retrieve email messages from a server. For example, if your computer supports POP3, you can download email messages to your local machine from a server. This protocol stores the emails within your inbox folder on your device.</p><p>By default, POP3 deletes the messages from the server once the download is complete. POP3 transfers emails from the server to the client, allowing you to read them even if you are not connected to the internet. Works on TCP port number 110. It downloads all the mail when it is connected to the internet.</p><p><strong>Note</strong>-<br>1. SMTP is a push protocol whereas IMAP and POP3 are pull protocols<br>2. SMTP works between the sender’s mail server to receiver’s mail server and the sender and sender’s mail server. IMAP and POP work between the receiver and the receiver’s mail server.</p><h3><strong>Steps</strong>-</h3><ol><li><strong>Configuring the Email Connector:</strong></li></ol><p>Navigate to studio and import module from Search in Exchange</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/823/0*uXtrN1gtOVU7t5BC.png" /></figure><p>2. In the Mule palette — The emailmodule would be displayed as below. Drag and drop the Send connector to Mule flow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*_xtwkiuNkvplWXrf_yWgPQ.png" /></figure><h3>• <strong>Setting up Gmail:</strong></h3><p>1. Go to the following link:<br><a href="https://myaccount.google.com/apppasswords">https://myaccount.google.com/apppasswords</a></p><p>2. Mention your email password and log inusing that email with which you want to connect with Mulesoft.</p><p>3. After logging in successfully, you will be redirected to the page like below-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*ry3h93rh0MfyajHf4jOqfQ.png" /></figure><p>4. There you can type your Appname and once you click on save, a password is generated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*hPHkzAAZJBmL99F4YB6Pnw.png" /></figure><p>5. Copy the mentioned password, and there you go!</p><h3>1. Sending Emails:</h3><p>1. Drag and drop the Send connector from the palette to the Mule flow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/352/1*E58AOteVnwP6mSf8OOiToA.png" /></figure><p>2. <strong>Connector configuration:</strong></p><p>You can keep the connection as SMTP or SMTPS (SMTP with TLS configuration)</p><p>Give the following details:<br>1. Host (Host name of the mail server: If the Hostname value is defined with a property name and the value is empty, then it defaults to the localhost value)<br>Example: While connecting to Gmail, it will be smtp.gmail.com</p><p>2. Port (The port number of the mail server; Default: 25)</p><p>3. User (Username used to connect with the mail server)</p><p>4. Password (Username password to connect with the mail server)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*N12VwrO7UUk3rDWSF6k1aw.png" /></figure><p>Once done, please click on OK and fill in the other details.</p><p>3. Click on Advanced and in the properties section, select the dropbox.<br>Now, add the following property Key: “mail.smtp.starttls.enable” with its Value as: “true”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/572/1*CEEqtIF72-MQqbuPmCc27w.png" /></figure><p>4. Configure the From Address, To Addresses, subject, and content fields.<br>You can also send attachments and add Cc addresses, Bcc addresses, and other fields if needed.</p><p>There you go!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TcuKO3A5OIOrCQi3wm-0lA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xs7HxrPvvcQ2YCxf-t_6rg.png" /></figure><p>5. Run the flow, and on successful completion, we will receive the mail.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nhKPrWj7A8qdslMz5V8ZKg.png" /></figure><h3>2. Retrieving Email-</h3><p>As discussed earlier, you can use Pop3 or IMAP protocols to retrieve emails.</p><h3>•IMAP-</h3><p>Use connector list IMAP to retrieve all emails present in a particular email box-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/152/1*NjXr8GUMtwV_yiLW6utdkA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*05eyhyL8JWokl7RR8uZSbg.png" /></figure><ol><li>Give the following details:</li></ol><p>1. Host (Example while connecting to Gmail: imap.gmail.com)<br>2. Port<br>3. User<br>4. Password</p><p>Give connections as IMAP or IMAPs depending upon your need.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/469/1*MmN01Z0X1_h489aq_ETFVA.png" /></figure><p>2. Give the correct folder name from where you want to retrieve the email.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CZCf8FqEP0at1YK9-7eGhw.png" /></figure><p>3. Here you go. Once the program is run, you will be able to retrieve all email details.</p><p>I’m adding all the details of the emails extracted through this connector in an Excel sheet through my MuleSoft flow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/618/1*0O04kD24CNS8dw33MTP3EQ.png" /></figure><h3>• POP3-</h3><ol><li>Use connector List- POP3 to retrieve all emails present in a particular email box-</li></ol><p>Give the following details:<br>1. Host (Example while connecting to Gmail: pop.gmail.com)<br>2. Port<br>3. User<br>4. Password</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/591/1*u3Tkj3PfII4LZ3hzXIE19g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/126/1*bXE_4YvLPjBxpJ2UfILAag.png" /></figure><p>2. Add details in it, including the mailbox folder (Folder from which you want to retrieve the emails)-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tWqBRm8lwdoazM4pGXSIsg.png" /></figure><p>Here you go, all emails in particular lists are retrieved.</p><h3>3. Count Emails:</h3><p>Keep Count messages- IMAP or Count messages-POP3 to count emails present in a particular folder.<br>Do the respective connector configuration for IMAP or POP3 as defined previously.</p><p>Additionally, add the mailbox folder for which you want to count the<br>emails.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/427/1*DXRKDs86kLBRM2ZgW1K3wQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*9rJEI7vbDiqjK1cflz4cCw.png" /></figure><p><strong>Note:</strong> Alternatively, you can also use the function sizeOf() to retrieve the email count, after using the List-IMAP/List-POP3 connector.</p><h3>4. Delete Emails:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/100/1*rvDUyQZ-AcDE0fgAI8KKvQ.png" /></figure><p>You can delete emails using the Delete connector.</p><p>Once the connector configuration is done, add the mailbox folder (from which you want to delete the email) and the email ID.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T7KJjh5WtPprc2G1V9tA6w.png" /></figure><p><strong>Note:</strong> The email ID field mentioned is the number of the required email to be deleted. (Generally retrieved from data through attributes.id)</p><p>Thanks for reading!<br>Please feel free to comment and follow<strong> </strong>me for more helpful articles and insights in the future.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f562e3b8aba" width="1" height="1" alt=""><hr><p><a href="https://medium.com/another-integration-blog/email-mulesoft-integration-6f562e3b8aba">Email MuleSoft Integration</a> was originally published in <a href="https://medium.com/another-integration-blog">Another Integration Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SAP HANA Mulesoft Integration]]></title>
            <link>https://medium.com/@gursimransingh1298/sap-hana-mulesoft-integration-50c89d57a51d?source=rss-b63c3192756b------2</link>
            <guid isPermaLink="false">https://medium.com/p/50c89d57a51d</guid>
            <category><![CDATA[sap]]></category>
            <category><![CDATA[sap-hana]]></category>
            <dc:creator><![CDATA[Gursimran Singh Ranhotra]]></dc:creator>
            <pubDate>Fri, 23 Jun 2023 13:10:09 GMT</pubDate>
            <atom:updated>2023-11-01T09:00:06.453Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, we would discuss regarding MuleSoft and SAP Integration.</p><p>This article is a continuation of my last article wherein, I showed ways to connect SAPECC, SAPBW, and other related systems using Mulesoft as an iPaaS tool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*8Lv1puuleSRM_ayN.png" /></figure><h3>What exactly is SAP HANA?</h3><p>SAP HANA is an in-memory, column-oriented, relational database management system developed and marketed by SAP SE. Its primary function as the software running a database server is to store and retrieve data as requested by the applications.<br>SAP HANA Cloud is a modern database as a service (DBaaS) powering the next generation of intelligent data applications and analytics across all enterprise data.</p><h3>How is SAP S/4HANA Different From SAP ECC and other SAP systems?</h3><p>SAP S/4HANA streamlines features and processes from SAP ECC to reduce costs and boost business efficiency. This means some features have changed, while others have been replaced or combined into new features.</p><p>Some of the key changes in SAP S/4HANA are listed below-</p><h3>Default Account-Based CO-PA</h3><p>In SAP ECC, costing-based CO-PA (CO-Profitability Analysis) is the default option. But in SAP S/4HANA, the default option is account-based CO-PA, though you can run both options together.</p><h3>FI and CO Merger</h3><p>Businesses manage their financial data in SAP ECC with both FI (Finance) and CO (Controlling). In SAP S/4HANA, FI and CO are part of a single table. This means you no longer have to reconcile them with the General Ledger at each period-end. ACDOCA reconciles them automatically in real time.</p><h3>Material Number Extension</h3><p>SAP S/4HANA gives you the option of extending the material number from 18 characters to 40 characters. Bear in mind, though, if you turn on the extension you will have to adjust your custom code to the new material length of CHAR40.</p><h3>Integrated Business Partners</h3><p>In SAP ECC, customers and vendors are separate data objects. SAP S/4HANA integrates customers and vendors into a unified master data object called business partners. Customer-vendor integration has several benefits, such as:</p><ul><li>One business partner can have multiple roles and addresses</li><li>General data is shared across roles, which reduces your database footprint</li><li>There’s less redundancy since unused data is deleted after a certain time-period.</li></ul><p>So, the major diffrences are conciled below-</p><ol><li><strong>Database: </strong>ECC supports databases from other providers such as Db2, Oracle, or Informix, however, S/4HANA only runs on SAP HANA. As a result, S/4HANA has much faster reaction times thanks to its in-memory database.</li><li><strong>A merger of controlling (CO) and finance (FI): </strong>When it comes to the merger of controlling (CO) and finance (FI), SAP S4 HANA’s structure of the universal journal stores both the GL account and the cost element, vs ECC where the FI GL accounts are mapped to CO primary cost elements.</li><li><strong>New general ledger: </strong>S/4HANA also only uses the new general ledger (GI), while ECC ran both “new” and “classic” versions.</li><li><strong>Customer vs. Vendor to business partner: </strong>In ECC, customer and vendor files were separate, while S/4HANA combines the common data structure elements of both into a Business Partner record.</li><li><strong>Rebates: </strong>S/4 HANA has replaced the SD rebate processing in ECC with settlement management through condition contracts.</li></ol><h3>SAP S 4HANA Connector Guide--</h3><ol><li>If you are using Mulesoft as your integration broker, you have the options of using the following Anypoint Connectors for S/4 HANA connection-</li></ol><p>1. “SAP S/4HANA OData Connector ” or <br>2. “SAP S/4HANA SOAP Connector ”</p><p>Then, you have to investigate the API Business Hub to find the APIs that suits best your case.</p><p>For SAP HANA ODAta-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*sL3DIv41FPsZ5iWtgXjOtQ.png" /></figure><p>For SAPHana Soap-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/1*Yed16TVvGrbWdqZmdrDmdg.png" /></figure><h3>SAP S/4HANA SOAP Connector</h3><p>Anypoint Connector (SAP S/4HANA SOAP Connector) provides full support for the SOAP APIs exposed by SAP S/4HANA Cloud ERP and support for SAP S/4HANA on-premise ERP. <br>This connector enables you to automatically discover SOAP services enabled on your SAP S/4HANA instance and to invoke the SOAP service and associated operations.</p><h4>Associated Sources</h4><ul><li><a href="https://docs.mulesoft.com/sap-s4hana-soap-connector/2.5/sap-s4hana-soap-connector-reference#OutboundMessageListener">Outbound Message Listener</a> (Creates an input source that listens for incoming SAP S/4HANA SOAP outbound messages).</li></ul><h3>Supported Operations</h3><ul><li><a href="https://docs.mulesoft.com/sap-s4hana-soap-connector/2.5/sap-s4hana-soap-connector-reference#Invoke">Invoke</a> ( To Consume an operation from an S/4HANA SOAP Web Service)</li><li><a href="https://docs.mulesoft.com/sap-s4hana-soap-connector/2.5/sap-s4hana-soap-connector-reference#Unauthorize">Unauthorize</a> ( To Delete all of the access token information of a given resource owner ID so that it’s impossible to execute any operation for that user without repeating the authorization dance).</li></ul><h3>SAP S/4HANA OData Connector</h3><p>Anypoint Connector for SAP S/4HANA OData (SAP S/4HANA OData Connector) provides support for the all the OData APIs exposed by SAP S/4HANA Cloud and SAP S/4HANA on-premise.</p><p>The connector enables you to perform operations to:</p><ul><li>Create, get, update, and delete entities</li><li>Retrieve a single entity</li><li>Query multiple entities</li><li>Invoke a remote function</li><li>Execute batch requests that consist of multiple requests</li></ul><p>Functions provided are-</p><p>1. Batch create entity</p><p>2. Batch update entity</p><p>3. Batch get entity</p><p>4. Batch delete entity</p><p>5. Batch query entity</p><p>6. Create change set</p><p>7. Batch execute function</p><p>8. Create entity</p><p>9. Delete Entity</p><p>10.Execute Batch</p><p>11. Execute function</p><p>12. Get entity by key</p><p>13. Initiate Batch</p><p>14. Query</p><p>15. Unauthorized</p><p>16. Update entity</p><ol><li><strong>SAP S/4HANA OData/SOAP</strong> Connector can be downloaded from Anypoint exchange through Anypoint studio using the “Search in Exchange” option in Mule Palette.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/426/0*oK8eqAsExWYckZxN.jpg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*sL3DIv41FPsZ5iWtgXjOtQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*Yed16TVvGrbWdqZmdrDmdg.png" /></figure><p>2. A source initiates a flow when a specified condition is met.</p><p>Possible source operations for this connector are:</p><ul><li>HTTP Listener</li><li>Scheduler-<br>Starts your app at timed intervals</li></ul><p>In Studio, drag the input operation you choose from the Mule Palette to the Source panel in the canvas, and supply the required parameters.</p><p>In the Connection drop-down menu, select the type of connection :</p><p><strong>For Basic authentication</strong><br>For basic authentication, enter the following required values:</p><ul><li><strong>Service Base URL</strong><br>The URL of the SAP S/4HANA instance you want to manage</li><li><strong>Username</strong><br>The user name used to initialize the session</li><li><strong>Password</strong><br>The password used to authenticate the user</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b999qx53sScz_piMRrKTwA.png" /></figure><p>You can test and validate if the credentials are valid-</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*f3_BTgxHcCBrfbHBN_c2zw.png" /></figure><p>2. Once, you establish the connection, you can see its metadata and options getting populated.</p><p>Enter you service and entity type. You can see that it’s data is automatically getting populated.</p><p>Enter all the required fields.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*-kuWNS-ocPTqPsLniVOWVQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*d7Z8eSxPcwwxa-YfoY_tJg.png" /></figure><p>Incase of SOAP invoke function, you need to enter service name and operation name-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UA3jihx-rLQMS2bHJ0B0jw.png" /></figure><p>Example flows-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hGctt3hCA09D-3ohX_YzaQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T2Iiqw3H9DtwUehS0CvnqQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1016/1*hSrH0eZK1AmJS-kFxr-abg.png" /></figure><p>Upgrading from SAP ERP to SAP S/4HANA is a challenging undertaking. <br>Your SAP ERP is most likely already integrated with a number of internal and external systems via a combination of custom code and legacy ESBs. This alone poses significant challenges, as each of these systems necessitates rebuilding the respective SAP S/4HANA integrations.<br>SAP S/4HANA was designed to eliminate the need for legacy reporting approaches.<br><br>For SAP HANA integration with existing systems, an API-led architecture is the best approach. It provides agility and protects an organization’s technology stack from changes to other systems in the future. To meet your future business needs, SAP S/4HANA migration necessitates a new paradigm and new tools. Mulesoft provides out of the box connectors which serves the following purpose.</p><p>Thanks for reading!<br>Please feel free to comment and follow<strong> </strong>me for more helpful articles and insights in the future.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=50c89d57a51d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[All about Error Handling in MuleSoft]]></title>
            <link>https://medium.com/another-integration-blog/error-handling-wikipedia-in-mulesoft-7451bdf54dee?source=rss-b63c3192756b------2</link>
            <guid isPermaLink="false">https://medium.com/p/7451bdf54dee</guid>
            <category><![CDATA[integration]]></category>
            <category><![CDATA[error-handling]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[mulesoft]]></category>
            <dc:creator><![CDATA[Gursimran Singh Ranhotra]]></dc:creator>
            <pubDate>Fri, 09 Jun 2023 05:58:53 GMT</pubDate>
            <atom:updated>2023-06-13T18:52:28.746Z</atom:updated>
            <content:encoded><![CDATA[<p>Errоr hаndling is critical to a successful data integrаtiоn strategy in the world of data integrаtiоn. In this tutorial, we will learn about various types of error handling in Mule 4 and how we can imрlement it into our project with an example.</p><p>One of the two major types of errors that can occur in Mulesоft:</p><ol><li>System Errоrs</li><li>Messаging Errоrs</li></ol><p>Mule thrоws а system errоr when аn exсeрtiоn оссurs аt the system level аnd nо Mule event is invоlved. А system errоr hаndler mаnаges exсeрtiоns thаt оссur:</p><ul><li>During аррliсаtiоn stаrtuр.</li><li>When а соnneсtiоn tо аn externаl system fаils.</li></ul><p>When а system errоr оссurs, Mule sends аn errоr nоtifiсаtiоn tо registered listeners and lоgs the errоr. If the errоr is саused by а соnneсtiоn fаilure, Mule exeсutes а reсоnneсtiоn strаtegy. Mule thrоws а messаging errоr (а Mule errоr) whenever а рrоblem оссurs within а flоw оf а Mule арр, where Mule events аnd the messаges they соntаin аre рrосessed.</p><p>We саn hаndle Mule messаging errоrs in mоre thаn оne wаy. Yоu саn either rely on the defаult errоr hаndling meсhаnism. Or within а flоw, yоu саn set uр Оn-Errоr соmроnents (Оn Errоr Соntinue аnd Оn Errоr Рrораgаte) inside the flоw’s built-in Errоr Hаndler соmроnent. These соmроnents саn соntаin аny number оf соmроnents tо рrосess the errоr.</p><h3>Error Handling</h3><p>The high-level usаge оf errоr hаndling in Mulesоft саn be defined аs:</p><p>Аt рrоjeсt level: we саn use defаult errоr hаndler оr сustоm glоbаl errоr hаndler. Аt flоw level, we саn use аny оf the fоllоwing:</p><ul><li>Оn-Errоr Соntinue</li><li>Оn-Errоr Рrораgаte</li><li>Rаise Errоr</li></ul><p>Unlike Mule 3 exсeрtiоn hаndling in Mule 4 is nоt Jаvа styled exсeрtiоns. Mule 4 errоr hаndling frаmewоrk direсtly hаndles the exсeрtiоn by hаving integrаted аnd соnfigurаble errоr hаndling meсhаnism. Insteаd оf соmрletely аvоiding the Jаvа exсeрtiоns hаndling meсhаnism, Mule 4 аbstrасts Jаvа exсeрtiоn оbjeсts right intо the Mule 4 errоr оbjeсts. In thrоwing errоrs insteаd оf Jаvа exсeрtiоns vаlidаtоrs аre used whiсh inсlude:</p><ul><li>Desсriрtiоn — а string</li><li>ErrоrTyрe — аn оbjeсt</li><li>Саuse –( It is the underlying Jаvа Thrоwаble оbjeсts thаt саused the fаilure)</li></ul><p>The errоrs аre lосаted аnd hаndled — bаsed оn tyрe — during the design рhаse. The рrоgrаmmers саn рre-define the соmрlete errоr hаndling blосk tо соnfigure better. А well-defined errоr hаndling blосk inсludes:</p><ul><li>Desсriрtiоn: Designаtes the issue.</li><li>Tyрe: Exemрlifies рrоblem. Nаmesрасe аnd identifier indiсаte the tyрe оf errоr. Eасh errоr tyрe hаs а раrent аnd by defаult, АNY is the раrent tyрe fоr аny errоr.</li><li>Саuse: Indiсаtes the саuse thаt triggered the exeсutiоn fаilure.</li><li>Errоr messаge: Соmmuniсаtes аnd mаkes the errоr messаge mоre сleаr.</li></ul><p>Whenever аn errоr оссurs the nаturаl Mule exeсutiоn flоw hаlts аnd аn event is rаised аnd раssed tо the errоr hаndler. The errоr hаndler соmроnent саn соntаin аny number оf internаl hаndler sсорes defined within it. Eасh internаl errоr hаndler sсорe саn hаve mаny event рrосessоrs. Оn-errоr-соntinue аnd оn-errоr-рrораgаte аre the internаl errоr hаndlers.</p><p>Аs the event is раssed tо eасh errоr hаndler, the аррrорriаte internаl errоr hаndler is identified аnd direсted tо it. The detаiled flоw оf user-defined errоr hаndler is illustrаted in the belоw figure:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/0*sK25qVigUckv64Hh.png" /></figure><h3>ErrorObject Structure</h3><p>Whenever аn errоr оссurs in а flоw, аn errоrОbjeсt is сreаted which is made up of:</p><ul><li>errоr.errоrTyрe — а соmbinаtiоn оf Nаmesрасe аnd Identifier.</li></ul><pre> E.g., HTTP: UNAUTHORIZED.<br>Namespace: HTTP and <br>Identifier: Unauthorized.</pre><ul><li>errоr.desсriрtiоn — it соntаins the desсriрtiоn оf errоr.</li></ul><pre>Example-<br>Description: HTTP GET on resource ‘http://localhost:36682/testPath’ failed: unauthorized (401)</pre><p><strong>Nоte: </strong>Mule 4 аbstrасts the exсeрtiоn оссured intо Mule 4 errоr оbjeсts. There is а hierаrсhy thаt саn be used tо саtсh grоuрs оf errоr оbjeсts tоgether in Mule 4. We саn mар Errоrs with а сustоm Errоr оbjeсt tо differentiаte errоrs аt different lосаtiоns оf the аррliсаtiоn. Try sсорe аllоws develорer tо miсrо-соntrоl messаge рrосessing inside the flоw. Subflоws dоn’t hаve errоr hаndling strаtegy.</p><h3>Error Hаndling Mechanisms-</h3><p>There аre 3 tyрes оf errоr hаndling meсhаnisms in Mule 4 that include Оn-Errоr Соntinue, Оn-Errоr Рrораgаte, and Try Саtсh Sсорe.</p><h3>On-Error Continue</h3><p>Оn-Errоr Соntinue cаtсhеs the errоr but does not report it as an errоr, so the flоw process continues even after the errоr has occurred. This error handler can be used in loops where we don’t want to stop the loop processing even if an error has occurred. Аll event рrосessоrs in the errоr hаndling sсорe аre exeсuted. Аt the end оf the Sсорe:</p><ul><li>The rest оf the flоw thаt threw the errоr is nоt exeсuted.</li><li>The event is раssed uр tо the next level аs if the flоw exeсutiоn hаd been соmрleted suссessfully.</li><li>The HTTР listener returns the suссessful resроnse.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/0*NMPjCYoswho0a-lE.png" /></figure><p><strong>Diagram Breakdown</strong></p><p>1.Раylоаd is suссessfully set tо “Suссess — Stаrted Mаin Flоw”</p><ul><li>The Flоw Referenсe will саll the сhild flоw</li></ul><p>2. The Is Number vаlidаtоr сreаtes аn Errоr Оbjeсt beсаuse the раylоаd isn’t аn integer</p><ul><li>Сhild Flоw exeсutiоn will stор.</li><li>The description of it-</li></ul><pre>(#[error.description] = “payload is not a valid INTEGER value”) #[error.errorType] = VALIDATION:INVALID_NUMBER</pre><p>3. The On Error Continue handles the error</p><ul><li>The payload will be set to “Error — Sub Flow”</li><li>“Error — Sub Flow” will be returned to the main flow as if the child flow was successful</li></ul><p>4. The Set Payload will get executed</p><ul><li>The payload will be reset to “Success — Finished Main Flow”</li></ul><p>5. “Success — Main Flow” will be returned to the requestor in the body of the HTTP request HTTP Status Code: 200</p><p>As we can see, in the example, the error is caught by an On Error Continue scope in the child flow (RED in, GREEN out) when the Mule Message returns to the parent flow, thus the parent flow knows none the different that there was a failure because the on error continue returns a 200 success message. Note that because, to the main flow, the child flow appeared to be successful, the processing of the main flow will be resumed after the flow reference.</p><h3>On-Error Propagate</h3><p>Оn-Errоr Рrораgаte wоrks exасtly аs the Mule 3 Саtсh exсeрtiоn strаtegy. In саse оf аny errоrs, Оn-Errоr Рrораgаte рrосesses the errоr messаge аnd re-thrоws the errоr tо its раrent flоw. There is no further processing on that particular flow. Аll event рrосessоrs in the errоr hаndling sсорe аre exeсuted. Аt the end оf the Sсорe:</p><ul><li>The rest оf the flоw thаt threw the errоr is nоt exeсuted</li><li>The errоr is rethrоwn uр tо the next level аnd hаndled there</li></ul><p>Exаmрle оf it is given belоw:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/524/0*1OLCkNv55vLraUHm.png" /></figure><p>In the above exаmрle, we use аn Оn Errоr Рrораgаte (RED in, RED оut) tо hаndle the errоr in the сhild flоw. Yоu will nоtiсe thаt this рrосess will lооk а bit different. Nоte thаt the Mule Defаult Errоr Hаndler is nоt соnfigurаble аnd therefоre is nоt visuаlly deрiсted in the flоw.</p><p><strong>Diagram Breakdown</strong></p><p>1. The Раylоаd is suссessfully set tо -“Suссess — Stаrted Mаin Flоw”</p><ul><li>The Flоw Referenсe саlls the сhild flоw</li></ul><p>2. The Is Number vаlidаtоr сreаtes аn Errоr Оbjeсt beсаuse the раylоаd isn’t аn integer</p><ul><li>Сhild Flоw exeсutiоn stорs.</li><li>#[errоr.desсriрtiоn] = “раylоаd is nоt а vаlid INTEGER vаlue”</li><li>#[errоr.errоrTyрe] = VАLIDАTIОN:INVАLID_NUMBER</li></ul><p>3. The Оn Errоr Рrораgаte hаndles the errоr</p><ul><li>The раylоаd is set tо “Errоr — Sub Flоw”</li><li>“Errоr — Sub Flоw” is returned tо the mаin flоw in the раylоаd аs if the сhild flоw wаs а fаilure</li><li>The Flоw Referenсe will fаil due tо the fаilure frоm the сhildFlоw</li><li>Mаin flоw exeсutiоn will stор. Beсаuse there is nо flоw errоr hаndler fоr mаin flоw, the defаult behаviоr оf а flоw is tо рrораgаte the same errоr</li></ul><p>4. “раylоаd is nоt а vаlid INTEGER vаlue” is, at last, returned tо the requestоr in the bоdy оf the HTTР request</p><ul><li>HTTР Stаtus Соde: 500</li></ul><p>Sоme key differenсe tо nоte here is thаt beсаuse the сhild flоw utilized the Оn Errоr Рrораgаte sсорe, аn errоr messаge is рrораgаted tо the саlling flоw (mаinFlоw). Beсаuse оf this, the exeсutiоn оf the flоw referenсe in the mаinFlоw fаiled аnd therefоre the рrосessing оf the rest оf the flоw stоррed. It is beсаuse оf this thаt the finаl set раylоаd рrосessоr didn’t exeсute аnd the errоr messаge wаs раssed bасk tо the requestоr.</p><p>А finаl nоte оn this exаmрle is thаt there is nо errоr hаndling defined in the mаinFlоw аnd therefоre, the errоr is simрly рrораgаted аgаin аs the defаult behаviоr оf а flоw is tо рrораgаte the errоr.</p><h3>Try-Catch Scope</h3><p>Try-саtсh sсорe саn be used within а flоw tо dо errоr hаndling оf just inner соmроnents. Try-саtсh sсорe саn be very useful in саses where we wаnt tо аdd а seраrаte errоr рrосessing strаtegy fоr vаriоus соmроnents in the flоw.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/0*2KjBIkhFxQa_AXdA.png" /></figure><p>The Try sсорe enаbles yоu tо hаndle errоrs thаt mаy оссur when аttemрting tо exeсute аny оf the соmроnents inside the Try sсорe. It аlsо suрроrts trаnsасtiоns. А Try sсорe wrарs оne оr mоre орerаtiоns, then саtсhes аnd hаndles аny exсeрtiоns thаt might be thrоwn by аny оf these enсlоsed орerаtiоns. The behаviоr is аs if yоu extrасted thоse enсlоsed event соmроnents intо а seраrаte flоw with its оwn errоr hаndling strаtegy, but inline, withоut hаving tо асtuаlly define а new flоw.</p><p><strong>For exаmрle:</strong></p><ul><li>HTTР Listener will trigger the flоw оn new request</li><li>А Set Раylоаd соmроnent thаt will set the раylоаd tо “Flоw–Stаrted”</li><li>Try Sсорe</li><li>HTTР Requester will саll externаl serviсe</li><li>This is the рlасe where аn errоr will get сreаted аs the externаl serviсe is dоwn.</li><li>А Set Раylоаd соmроnent thаt will set the раylоаd tо “Sаmрle — Раylоаd”</li><li>А Set Раylоаd соmроnent thаt will set the раylоаd tо “Flоw-Ended”</li></ul><h3>Raise Error Component</h3><p>This соre соmроnent generаtes а Mule errоr, аs if а fаilure hаd оссurred, whiсh аllоws yоu tо сustоmize its desсriрtiоn аnd tyрe.<br>This core component generates a Mule error, as if a failure had occurred, which allows developer to customize its description and type.</p><p>We can use this соmроnent tо оnly rаise:</p><ul><li>Соre runtime errоrs, suсh аs MULE:SEСURITY, MULE:СОNNEСTIVITY, etс.</li><li>Сustоm errоr tyрes</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*MxYtdPawmRT0Ia1Jv22zvQ.png" /></figure><p><strong>Rаise errоr соnfigurаtiоn:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BzE1lIZ3U8ny2EiRtN_1Uw.png" /></figure><p>For core runtime error types, developers must use the implicit namespace and identifier. User can only customize the error’s description message.</p><h3>Until Successful</h3><p>The Until Suссessful sсорe рrосesses the соmроnents within it, in оrder, until they suссeed оr exhаust the mаximum number оf retries. Like аll Соre соmроnents оther thаn Аsynс, Until Suссessful runs synсhrоnоusly. If а соmроnent within the sсорe fаils tо соnneсt оr рrоduсe а suссessful result, Until Suссessful, retries the fаiled tаsk until аll соnfigured retries аre exhаusted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*nhOUVsjI1agkglA9tU4Rtw.png" /></figure><p>If а retry suссeeds, the sсорe рrосeeds tо the next соmроnent. If the finаl retry dоes nоt suссeed, Until Suссessful рrоduсes аn errоr.</p><h3>Key Notes</h3><ol><li>оn-errоr-рrораgаte — entire try sсорe fаils аnd flоw’s errоr hаndler will exeсute.</li><li>оn-errоr-соntinue– entire try sсорe beсоmes successful аnd next рrосessоr оutside the try sсорe exeсutes.</li><li>Try аnd until suссessful sсорes аre only hаndled аt соnneсtоr level.</li><li>Until suссessful retries аll kinds оf errоrs (Mаke sure when using it with HTTР requestоr).</li><li>The errоr tyрe fоr Until suссessful will be MULE: RETRY_EXHАUSTED.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7451bdf54dee" width="1" height="1" alt=""><hr><p><a href="https://medium.com/another-integration-blog/error-handling-wikipedia-in-mulesoft-7451bdf54dee">All about Error Handling in MuleSoft</a> was originally published in <a href="https://medium.com/another-integration-blog">Another Integration Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Subscribing Salesforce Platform Events Using MuleSoft]]></title>
            <link>https://medium.com/another-integration-blog/subscribing-salesforce-platform-events-using-mulesoft-2dfabae099b6?source=rss-b63c3192756b------2</link>
            <guid isPermaLink="false">https://medium.com/p/2dfabae099b6</guid>
            <category><![CDATA[events]]></category>
            <category><![CDATA[blog]]></category>
            <category><![CDATA[mule]]></category>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[mulesoft]]></category>
            <dc:creator><![CDATA[Gursimran Singh Ranhotra]]></dc:creator>
            <pubDate>Thu, 08 Jun 2023 08:41:45 GMT</pubDate>
            <atom:updated>2023-06-13T18:53:25.094Z</atom:updated>
            <content:encoded><![CDATA[<p>Platform Events enable you to deliver secure, scalable, and customizable event notifications within Salesforce or through external sources. Platform Event fields are defined in Salesforce and they determine the data that you send and receive.</p><p>This article describes the method to subscribe and read the Salesforce Platform Events using the MuleSoft Salesforce connector.</p><p>Salesforce platform event is a software architecture that is message-driven (or event-driven) &amp; consists of event producers, event consumers, and channels. This architecture separates event producers and event consumers and simplifies the communication model for connected systems, making it suitable for large distributed systems.</p><p>You can use Anypoint Connector for Salesforce (Salesforce Connector) as to stream data from Salesforce into your application. You can use any of the below connectors depending on your use-case:</p><ul><li>Subscribe topic listener</li><li>Subscribe channel listener</li><li>Replay topic listener</li><li>Replay channel listener</li></ul><h3>Terminologies used-</h3><p><strong>Event</strong></p><p>A significant change in the state of a business process. An order, for example, is a significant event because fulfilment centres anticipate notification before processing an order.</p><p><strong>Event message</strong></p><p>Event message is a message which contains all the information about an event . An example of an event message is an order notification that contains information about an order.</p><p><strong>Event producer</strong></p><p>The entity which issued the particular event message.</p><p><strong>Event channel</strong></p><p>A stream of all instances. Event messages are sent by instance producers, and event consumers read them. A platform event channel can be dedicated to a single platform event or customised to group event messages from multiple platform events.</p><p><strong>Event consumer</strong></p><p>A consumer subscribes to a channel and receives inputs from it.</p><h3>Steps:</h3><ol><li>Login to Salesforce and create a Salesforce Platform Event. Please follow the example in the Trailhead docs to create a Platform Event. <br>In this use case, we have created an event named-</li></ol><pre> “OQ_RFC__e”.</pre><p><strong>Steps</strong>-</p><p>Let’s create a Platform Event in the Salesforce org<strong>.</strong></p><ul><li>Go to Setup and search Platform Event Settings</li><li>Create New Platform Event</li><li>Provide the correct label and deployment type</li><li>Create custom fields and relationships (optional)</li><li>Save</li><li>We can publish our platform events using flows/Apex/triggers</li></ul><p>We will then test the event and make any necessary changes before proceeding with our Mulesoft configuration.</p><p>(Here in this use-case, the event gets triggered if we click on the SF button- “Account”)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*_VXhK12_ePOeQgZVZZOWMg.png" /></figure><p><strong>2.</strong> Create a Mule application and in source section, keep the connector-<strong>subscribe channel listener.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hiKD6d8pqOVVE0ZPjJc3dg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lqF_nJdnvxor_70aeM-0Yg.png" /></figure><p>After you create a streaming channel, you will start receiving events by subscribing to the channel. The <strong>Subscribe channel listener</strong> source acts like an inbound endpoint. In this example, every time a subscription to (OQ_RFC__e) receives an event, it executes the rest of the flow and logs a message at the INFO level.</p><h3><strong>Note</strong>-</h3><ol><li>The Streaming channel field of the Subscribe channel listener operation doesn’t display the change events that are available in the Salesforce environment. However, this connector can subscribe to a streaming channel to obtain this information.</li><li>You can also use a Replay Channel Listener which works in similar way with some extra configurations and features as described in the image below-</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*97sN-wazo6aS-18PCz5Ylg.png" /></figure><p>The differences between this and streaming channel listeners are described at the end of the article.</p><p>3. The event should be defined in all cases like —</p><pre>(/event/&lt;event name&gt;)</pre><p><strong>3.</strong> You need to establish a connection with the Salesforce system.</p><p>If connecting with Basic authentication, you need to just give the username, password, and its token, authorization URL-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*L33517wktDqNbXdmARfUqg.png" /></figure><ul><li>If using connection as Oauth JWT, give the following credentials-</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*rtFxvkOt3cWgQvsoyM5_7Q.png" /></figure><p>Test the connection and you can validate, if it’s successful-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*fR3zP5fI471SrfildgfEaQ.png" /></figure><p><strong>4.</strong> Keep component Subscribe Channel, then specify event name as Streaming channel.<br>(It should be in source of your Mulesoft Flow).</p><p>In Streaming channel field , give your event name. <br>It is (/event/OQ_RFC__e) according to the current use case.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YUl47Bhx3AxF_3FeWypWNQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*eyzEDPiRXjX_JqlhloNY7g.png" /></figure><p><strong>5.</strong> And on hitting the record button, you can see that it successfully reads the event and populates its data.</p><p>We can see in the payload that all of the required fields and data are present after hitting-</p><pre>{<br> “data”: {<br> “schema”: “RAVRAV6NuYRxDIm*****”,<br> “payload”: {<br> “CreatedById”: “0055r000003e*****”,<br> “CreatedDate”: “2023–06–07T10:51:46.840Z”,<br> “OQ_ERPId__c”: “12345”<br> },<br> “event”: {<br> “EventUuid”: “0f5d75d2–8138–468a-8613–293*****c”,<br> “replayId”: 4149775,<br> “EventApiName”: “OQ_RFC__e”<br> }<br> },<br> “channel”: “/event/OQ_RFC__e”<br>}</pre><p>You can populate the required fields from this payload.<br>(Like schemaName, replayId, channelName, eventName, erpId, eventUuid, createdById, createdDate etc.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/915/1*_VXhK12_ePOeQgZVZZOWMg.png" /></figure><p>Pfa the data getting populated into SF UI through event after processing through Mulesoft-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r7d3qT0_wdEA__g5yajlvQ.png" /></figure><p><strong>Note</strong>-</p><ol><li>You can also use <strong>Replay Channel Listener </strong>to<strong> </strong>Subscribe to streaming channels. This source provides channel-related notification settings for new events and events stored by Salesforce within a 24-hour retention period. A flow is triggered when an event occurs on the specified channel source.</li><li>Subscriber Channel Listener is more faster than Replay Channel Listener as latter internally uses ObjectStore V2 to store automatic message replay and message redelivery.</li><li>The <strong>Resume from the Last Replay Id</strong> checkbox in Replay Channel Listener enables you to specify an automatic replay of stored events, based on the Replay ID of the last event processed by the connector which is not present in Subscriber Channel Listener.</li></ol><p>Thanks for reading!<br>Please feel free to comment and follow<strong> </strong>me for more helpful articles and insights in the future.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2dfabae099b6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/another-integration-blog/subscribing-salesforce-platform-events-using-mulesoft-2dfabae099b6">Subscribing Salesforce Platform Events Using MuleSoft</a> was originally published in <a href="https://medium.com/another-integration-blog">Another Integration Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>