<?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 Ekta Sehgal on Medium]]></title>
        <description><![CDATA[Stories by Ekta Sehgal on Medium]]></description>
        <link>https://medium.com/@ekta2108?source=rss-e1b7beac0b6f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*BWAT3FV3_aQC8_9U</url>
            <title>Stories by Ekta Sehgal on Medium</title>
            <link>https://medium.com/@ekta2108?source=rss-e1b7beac0b6f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 02:16:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ekta2108/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[MuleSoft Vibes — The Future of AI-Powered Integration Development]]></title>
            <link>https://ekta2108.medium.com/mulesoft-vibes-the-future-of-ai-powered-integration-development-a73966dce415?source=rss-e1b7beac0b6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/a73966dce415</guid>
            <dc:creator><![CDATA[Ekta Sehgal]]></dc:creator>
            <pubDate>Fri, 08 May 2026 16:09:07 GMT</pubDate>
            <atom:updated>2026-05-08T16:09:07.368Z</atom:updated>
            <content:encoded><![CDATA[<p>MuleSoft Vibes is an AI-powered development assistant integrated into:</p><ul><li>Anypoint Platform</li><li>Anypoint Code Builder (ACB)</li></ul><p>Instead of manually creating everything, developers can now type prompts and Vibes can:</p><ul><li>Generate RAML</li><li>Create flows</li><li>Add error handling</li><li>Generate test cases</li><li>Suggest reusable APIs</li><li>Build DataWeave mappings</li></ul><p>This dramatically reduces development effort.</p><h3>Why MuleSoft Vibes Feels Different</h3><p>Most generic AI tools understand coding.</p><p>But MuleSoft Vibes understands:</p><ul><li>Integration architecture</li><li>Mule flows</li><li>API-led connectivity</li><li>DataWeave</li><li>MUnit</li><li>API governance</li><li>Reusable enterprise assets</li></ul><h3><strong>Key Features of MuleSoft Vibes</strong></h3><p>1.Natural Language Development : Developers can simply describe requirements.</p><p>2. RAML Generation: Instead of manually designing APIs, Vibes can generate RAML specifications automatically.</p><p>3. DataWeave Generation: Vibes can generate mappings instantly.</p><p>4. MUnit Test Generation: Vibes can generate MUnit tests, Create mock payloads, Validate assertions, Improve test coverage.</p><p>5. MCP Server Support: MuleSoft Vibes supports MCP servers.</p><h3>Steps to Configure MuleSoft Vibes</h3><h4>Step 1: Install Anypoint Code Builder</h4><p>Download:</p><ul><li>VS Code (download from <a href="https://code.visualstudio.com/download">https://code.visualstudio.com/download</a>)</li><li>Anypoint Code Builder Extension</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/967/1*tFJAgTwIdJk4StHQKrHQSw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*MHQJuYN2xADra5299PcBcA.png" /><figcaption>Install Anypoint Extension Pack in VS Code.</figcaption></figure><h4>Step 2: Login to Anypoint Platform</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*1flNzYJZKCE6OCndZU3NdA.png" /><figcaption>Login using your Anypoint platform credentials</figcaption></figure><h4>Step 3: Connecting your Salesforce org to Anypoint Platform, enabling Einstein, and configuring permissions.</h4><p>Login to Anypoint platform &gt; Access Management &gt; Users &gt; Click on User name and assign below permissions to your business group</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xavrA3epEXo9acUN11mFOg.png" /></figure><p>Now Login to your salesforce developer account &gt; go to Setup ,search for Einstein setup and turn on below options.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wnUhTF62ExGHTM3uAmNJkg.png" /></figure><p>Now search for Agentforce Vibes Extension and turn on option as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jPs1lh5C4beBbG1RiykP9A.png" /></figure><p><strong>Generate Tenant Key: </strong>Now Search for “MuleSoft” in Setup, go to “Anypoint Platform Setup,” and copy the generated Salesforce org tenant key.</p><p><strong>MuleSoft Anypoint Platform Setup</strong></p><ul><li>Add Salesforce Connection: In Anypoint Platform, navigate to Access Management &gt; Salesforce.</li><li>Pair Organizations: Paste the Salesforce org tenant key to connect the platforms, you will get anypoint platform org Id copy it and paste into Salesforce from where tenant key was copied.</li><li>Enable Agentforce: Within the Salesforce tab in Access Management, check the box to “Enhance Anypoint Platform with Agentforce”.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D9z7YMxyY2ZePScfL0waBg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aMptOIHVXp5laGsOPJofvg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4epBtEU3m63BdSnuD5iqeQ.png" /></figure><p>Once above setup is done, Mulesoft Vibes is enabled in VS code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WWRUo4ViwIGsV5_qECb9hg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a73966dce415" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Integrating MuleSoft APIs with Dynatrace]]></title>
            <link>https://ekta2108.medium.com/integrating-mulesoft-apis-with-dynatrace-f17c45fd922a?source=rss-e1b7beac0b6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/f17c45fd922a</guid>
            <dc:creator><![CDATA[Ekta Sehgal]]></dc:creator>
            <pubDate>Sun, 21 Sep 2025 14:51:08 GMT</pubDate>
            <atom:updated>2025-09-21T14:51:08.525Z</atom:updated>
            <content:encoded><![CDATA[<p>Dynatrace is a software intelligence platform designed to help organizations monitor, optimize, and manage the performance of their applications, infrastructure, and digital experiences. It provides real-time insights into the performance of complex environments, including cloud-native applications, microservices, and hybrid infrastructures.</p><p><strong>Benefits of Dynatrace for MuleSoft Integrations</strong></p><ul><li><strong>End-to-End Visibility: </strong>Gain full visibility into your MuleSoft integration flows, from entry points to backend services.</li><li><strong>Faster Troubleshooting: </strong>Quickly pinpoint and resolve performance bottlenecks and errors within your MuleSoft applications.</li><li><strong>Improved Performance: </strong>Optimize network traffic and application responsiveness by understanding performance patterns.</li><li><strong>Holistic Monitoring: </strong>Monitor MuleSoft alongside other technologies and platforms, providing a unified view of your entire integration ecosystem.</li></ul><p>In this article, i will discuss steps to integrate MuleSoft logs to Dynatrace with help of POC.</p><p><strong>Register for Dynatrace Trial account and generate API access Token for authorization</strong></p><p>1.Login to Dynatrace&gt; search for access Token and click on “Generate new token”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r1EnBMz-PyNa3Jxf_D4NeA.png" /></figure><p>2. Type Token name, search for scopes and select appropriate scope and click “Generate token”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zmDlhVRcncbFOflgpmMznQ.png" /></figure><p>3. Copy generated token and save it for future use.</p><p><strong>How to integrate logs to Dynatrace.</strong></p><p>Add <strong>mule-opentelemetry-module</strong> and <strong>tracing module</strong> dependency to mule project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/511/1*3LdS-SvjSKe_XwqwP8z6Bg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*-nTQVlDRtVoZYvi4c3DxSQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/341/1*Oc9G06UgRs4L3KyThIZ7eA.png" /></figure><p>add openTelemetry config to global elements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*ZpDqEOLcp24_LYSySje8BQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*F2stm_GjYswGdTfgIchOxw.png" /></figure><p>Drag and drop set logging variable component to your flow , we need to set logging variable traceId for log4j to recognize traceId.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iPpe9aIVletZZlm3iD4QTA.png" /></figure><p>vars.<strong>OTEL_TRACE_CONTEXT </strong>is an auto-generated variable of the mule-opentelemetry-module that contain the traceparent value.</p><p>Modify log4j2 file as below, these changes will allow to enable/disable tracing and also to enable logging of json loggers.</p><p>add dynatrace appender and AppenderRef to AsyncRoot</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*M5CxIukZtyrp76nOSobyHA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*RBnFY80mPz1RAOzzqHAyFg.png" /></figure><p>Now execute your api flow and find your logs using traceId in Distributed tracing explorer tab in Dynatrace.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PJR0PKtlwVGIOmAt-4sU9w.png" /></figure><p>You can read more about dynatrace otel from <a href="https://docs.dynatrace.com/docs/ingest-from/opentelemetry/getting-started/otlp-export">https://docs.dynatrace.com/docs/ingest-from/opentelemetry/getting-started/otlp-export</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f17c45fd922a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating and using Template Project in Mule]]></title>
            <link>https://ekta2108.medium.com/creating-and-using-template-project-in-mule-32797d2ac031?source=rss-e1b7beac0b6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/32797d2ac031</guid>
            <dc:creator><![CDATA[Ekta Sehgal]]></dc:creator>
            <pubDate>Fri, 23 Feb 2024 17:51:53 GMT</pubDate>
            <atom:updated>2024-02-23T17:51:53.735Z</atom:updated>
            <content:encoded><![CDATA[<p>Template projects are great way to define standards of designing applications across organizations and can be used as a prototype to build similar applications and to share and reuse work across organization.</p><p>I have tried to explain the steps to create a template project, publish template project to exchange and reuse it with the help of below POC where i have defined global error handler, global.xml for Global configuration Elements and properties file in template project.</p><p>Steps:</p><ol><li>Create a new Mule Project in Anypoint Studio.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*gGpABSRl1VCLoNGcEYFMdg.png" /></figure><p>2. Open project’s pom.xml and modify groupId as your org’s Id, add description, add classifier as “mule-application-template” under maven plugin configuration and exchange repository under distribution management in order to publish template to exchange as shown and highlighted below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/933/1*smeGRRrknmWkxh11Gsv1qQ.png" /></figure><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;<br> &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;<br><br> &lt;groupId&gt;2b4250b3-0421-4fa9-8e2a-126b5ef25a5a&lt;/groupId&gt;<br> &lt;artifactId&gt;mule-template-project&lt;/artifactId&gt;<br> &lt;version&gt;1.0.0&lt;/version&gt;<br> &lt;packaging&gt;mule-application&lt;/packaging&gt;<br><br> &lt;name&gt;mule-template-project&lt;/name&gt;<br>    &lt;description&gt;This is a sample project template project&lt;/description&gt;<br>    <br> &lt;properties&gt;<br>  &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;<br>  &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;<br><br>  &lt;app.runtime&gt;4.5.1&lt;/app.runtime&gt;<br>  &lt;mule.maven.plugin.version&gt;4.0.0&lt;/mule.maven.plugin.version&gt;<br> &lt;/properties&gt;<br><br> &lt;build&gt;<br>  &lt;plugins&gt;<br>   &lt;plugin&gt;<br>    &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;<br>    &lt;artifactId&gt;maven-clean-plugin&lt;/artifactId&gt;<br>    &lt;version&gt;3.2.0&lt;/version&gt;<br>   &lt;/plugin&gt;<br>   &lt;plugin&gt;<br>    &lt;groupId&gt;org.mule.tools.maven&lt;/groupId&gt;<br>    &lt;artifactId&gt;mule-maven-plugin&lt;/artifactId&gt;<br>    &lt;version&gt;${mule.maven.plugin.version}&lt;/version&gt;<br>    &lt;extensions&gt;true&lt;/extensions&gt;<br>    &lt;configuration&gt;<br>                &lt;classifier&gt;mule-application-template&lt;/classifier&gt;<br>                &lt;/configuration&gt;<br>   &lt;/plugin&gt;<br>  &lt;/plugins&gt;<br> &lt;/build&gt;<br><br> &lt;dependencies&gt;<br>  &lt;dependency&gt;<br>   &lt;groupId&gt;org.mule.connectors&lt;/groupId&gt;<br>   &lt;artifactId&gt;mule-http-connector&lt;/artifactId&gt;<br>   &lt;version&gt;1.8.0&lt;/version&gt;<br>   &lt;classifier&gt;mule-plugin&lt;/classifier&gt;<br>  &lt;/dependency&gt;<br>  &lt;dependency&gt;<br>   &lt;groupId&gt;org.mule.connectors&lt;/groupId&gt;<br>   &lt;artifactId&gt;mule-sockets-connector&lt;/artifactId&gt;<br>   &lt;version&gt;1.2.3&lt;/version&gt;<br>   &lt;classifier&gt;mule-plugin&lt;/classifier&gt;<br>  &lt;/dependency&gt;<br> &lt;/dependencies&gt;<br><br> &lt;repositories&gt;<br>  &lt;repository&gt;<br>   &lt;id&gt;anypoint-exchange-v3&lt;/id&gt;<br>   &lt;name&gt;Anypoint Exchange&lt;/name&gt;<br>   &lt;url&gt;https://maven.anypoint.mulesoft.com/api/v3/maven&lt;/url&gt;<br>   &lt;layout&gt;default&lt;/layout&gt;<br>  &lt;/repository&gt;<br>  &lt;repository&gt;<br>   &lt;id&gt;mulesoft-releases&lt;/id&gt;<br>   &lt;name&gt;MuleSoft Releases Repository&lt;/name&gt;<br>   &lt;url&gt;https://repository.mulesoft.org/releases/&lt;/url&gt;<br>   &lt;layout&gt;default&lt;/layout&gt;<br>  &lt;/repository&gt;<br> &lt;/repositories&gt;<br> &lt;distributionManagement&gt;<br>  &lt;repository&gt;<br>   &lt;id&gt;anypoint-exchange-v3&lt;/id&gt;<br>   &lt;name&gt;Exchange Private Repository&lt;/name&gt;<br>   &lt;url&gt;https://maven.anypoint.mulesoft.com/api/v3/organizations/${project.groupId}/maven&lt;/url&gt;<br>   &lt;layout&gt;default&lt;/layout&gt;<br>  &lt;/repository&gt;<br> &lt;/distributionManagement&gt;<br><br> &lt;pluginRepositories&gt;<br>  &lt;pluginRepository&gt;<br>   &lt;id&gt;mulesoft-releases&lt;/id&gt;<br>   &lt;name&gt;MuleSoft Releases Repository&lt;/name&gt;<br>   &lt;layout&gt;default&lt;/layout&gt;<br>   &lt;url&gt;https://repository.mulesoft.org/releases/&lt;/url&gt;<br>   &lt;snapshots&gt;<br>    &lt;enabled&gt;false&lt;/enabled&gt;<br>   &lt;/snapshots&gt;<br>  &lt;/pluginRepository&gt;<br> &lt;/pluginRepositories&gt;<br><br>&lt;/project&gt;</pre><p>3. Create global.xml and global-error-handler.xml under src/main/mule and properties folder with properties file under src/main/resources as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/1*vP8gnGXw4Pt9aOFAEFewWw.png" /></figure><p>4. under global.xml &gt; Global Elements, add environment specific and common configuration with description so that can be easily understood by template user also add apikit router config as we are creating global error handler for Apikit router in our poc :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1017/1*-9SR29k7-Kt3VPNVosN3yQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*5fSnoQB8MLNt1EaP4HBq7A.png" /><figcaption>adding description for configuration properties in global.xml config</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*CqWFnPK1HDpELnssCtQLuA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*_mvyChkHnXqJnLiNwAkydQ.png" /></figure><p>5. Now under global-error-handler.xml , define common error handler block as shown:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/1*AmmqV95gmap0hj6eq93GBQ.png" /></figure><p>6. Now save changes made and run maven command to publish template project to exchange using command “mvn deploy”:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HW5Xfc-JzdxXyGywb0yl4Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*_uNQCUwk0uG_Nm6kWZHdrg.png" /></figure><p>Since we have published our template project to Exchange, we will now use this template project to create a new Mule project.</p><p>Click New&gt;File&gt; project from Template.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*Pdv38v45ltpWLmTJfLorOw.png" /></figure><p>select published template from exchange:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yuw1bkiL9TAbQ3NFk3Q_ag.png" /></figure><p>click open and project will appear in your studio.</p><p>Now rename project and files as per your requirement.</p><p>Right click on project &gt; Anypoint Platform&gt; Download Raml from design center and select Raml and click ok, flow will be added as shown:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*tIfiAx8A8if0bfnRmvMT_g.png" /></figure><p>Now remove error handling from flow sapi-main and refer global-error-handler:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4Getn1XFqJn6NhsKWp94eg.png" /></figure><p>Remove Http Listener config and apikit config from sapi.xml and paste in global.xml :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mwDvBcTZ3d0z0nN466S7Uw.png" /></figure><p>Similarly we can use configuration properties file.</p><p>Now we will save project, deploy it and test it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rnGWyuGpNvH6CMLvA3dreQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/927/1*6s3QP3ubwKWg-3jjRcummQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=32797d2ac031" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sending Mule Application logs to Splunk]]></title>
            <link>https://ekta2108.medium.com/sending-mule-application-logs-to-splunk-14e2ca108cf9?source=rss-e1b7beac0b6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/14e2ca108cf9</guid>
            <dc:creator><![CDATA[Ekta Sehgal]]></dc:creator>
            <pubDate>Mon, 19 Feb 2024 13:13:38 GMT</pubDate>
            <atom:updated>2024-02-19T13:13:38.005Z</atom:updated>
            <content:encoded><![CDATA[<p>What is Splunk?</p><p>Splunk is known for its capabilities in log management, security information and event management (SIEM), and data analytics.</p><p>Why there is a need to send logs to External Systems?</p><p>CloudHub has a specific log retention policy, the platform stores logs of up to 100 MB per app &amp; per worker or for up to 30 days, whichever limit is hit first also MuleSoft doesn’t have any facility to analyze and generate reports out of the logs so in order to retain application logs for longer time and more defined alerting and analyzing capabilities, these logs are being sent to external systems such as Splunk.</p><p>We can send both On Prem and Cloudhub logs to Splunk.</p><p>In this use case, I have shared steps of creating an index in Splunk and sending application logs to Splunk index:</p><p>Create Splunk Enterprise trial account and download Splunk.</p><p>Go to Settings&gt; Data Inputs as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k2NTXgGVSSU04erqos1DRA.png" /></figure><p>Click on <a href="http://127.0.0.1:8000/en-US/manager/launcher/http-eventcollector">HTTP Event Collector</a> as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k0elNPvwx1qsdu8SOrmXBw.png" /></figure><p>Click on New Token:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ENPCl7m_VT9-01yj8fAFKA.png" /></figure><p>Enter Name and click Next:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DrtXkPtQNddyZHNNYatPSQ.png" /></figure><p>Click select and select log4j and click on Review as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b52b14Ul1M6u1D1vZevYdw.png" /></figure><p>Click Submit</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S-ai7ehMZWgIu1zSpqvVSw.png" /></figure><p>Now under Data Inputs&gt; Http Event Collector, created token is visible as shown below with Token Value, which will be needed in Mule application:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tj2QnI9_yHvLsBgRhuVGdQ.png" /></figure><p>I have created a simple flow for POC as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/1*aBkk8A-OByA59Ku9NdpHQQ.png" /></figure><p>Now add, below dependency to application’s POM.xml:</p><pre>&lt;dependency&gt;<br>  &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;<br>  &lt;artifactId&gt;log4j-core&lt;/artifactId&gt;<br>  &lt;version&gt;2.17.0&lt;/version&gt;<br>&lt;/dependency&gt;<br>&lt;dependency&gt;<br>  &lt;groupId&gt;org.apache.logging.log4j&lt;/groupId&gt;<br>  &lt;artifactId&gt;log4j-api&lt;/artifactId&gt;<br>  &lt;version&gt;2.17.0&lt;/version&gt;<br>&lt;/dependency&gt;<br>&lt;dependency&gt;<br>  &lt;groupId&gt;com.splunk.logging&lt;/groupId&gt;<br>  &lt;artifactId&gt;splunk-library-javalogging&lt;/artifactId&gt;<br>  &lt;version&gt;1.11.4&lt;/version&gt;<br>&lt;/dependency&gt;</pre><p>Add below repository to POM.xml:</p><pre>        &lt;repository&gt;<br>        &lt;id&gt;splunk-artifactory&lt;/id&gt;<br>        &lt;name&gt;Splunk Releases&lt;/name&gt;<br>        &lt;url&gt;https://splunk.jfrog.io/splunk/ext-releases-local&lt;/url&gt;<br>        &lt;/repository&gt;<br></pre><p>Add cofiguration, appender and Asynclogger and highlighted below, we will use index token value created by us earlier under property value:</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&lt;Configuration packages=&quot;com.mulesoft.ch.logging.appender,com.splunk.logging.org&quot; status=&quot;INFO&quot;&gt;<br><br>&lt;Appenders&gt;<br>&lt;Http name=&quot;Splunk&quot; url=&quot;http://localhost:8088/services/collector/raw&quot; &gt;<br>&lt;Property name=&quot;Token&quot; value=&quot;Splunk 5ed04a2c-8221-45e9-9708-7d7b710b0fd7&quot;&gt; &lt;/Property&gt;<br>&lt;PatternLayout pattern=&quot;[%d{MM-dd HH:mm:ss}] %-5p %c{1} [%t]: %m%n&quot;&gt;&lt;/PatternLayout&gt;<br>&lt;/Http&gt;<br><br>&lt;/Appenders&gt;<br><br> &lt;Loggers&gt;<br>  &lt;!-- Http Logger shows wire traffic on DEBUG --&gt;<br>  &lt;!--AsyncLogger name=&quot;org.mule.service.http.impl.service.HttpMessageLogger&quot; level=&quot;DEBUG&quot;/--&gt;<br>  &lt;AsyncLogger name=&quot;org.mule.service.http&quot; level=&quot;WARN&quot;/&gt;<br>  &lt;AsyncLogger name=&quot;org.mule.extension.http&quot; level=&quot;WARN&quot;/&gt;<br>  &lt;!-- Mule logger --&gt;<br>   &lt;AsyncLogger name=&quot;org.mule.runtime.core.internal.processor.LoggerMessageProcessor&quot; level=&quot;INFO&quot;/&gt;<br>   &lt;AsyncRoot level=&quot;INFO&quot;&gt;<br>   &lt;AppenderRef ref=&quot;splunk&quot; /&gt;<br>   &lt;/AsyncRoot&gt;<br>   &lt;/Loggers&gt;<br>&lt;/Configuration&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5LZTk_hgSgOCxAeUnOE3xA.png" /></figure><p>Now Run your application and in Splunk click “Search &amp; Reporting”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J5qPCk8cAA1f-wFwy_KCWw.png" /></figure><p>Under search : search using index reference as index=”Muleapplog”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UN7_pIUjNV3lm4nuYpFnDQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14e2ca108cf9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Parent POM implementation in Mule]]></title>
            <link>https://ekta2108.medium.com/parent-pom-implementation-in-mule-b6d85a39783d?source=rss-e1b7beac0b6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6d85a39783d</guid>
            <dc:creator><![CDATA[Ekta Sehgal]]></dc:creator>
            <pubDate>Thu, 15 Feb 2024 12:29:19 GMT</pubDate>
            <atom:updated>2024-02-15T12:31:50.422Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Why parent POM:</strong> One reason to use a parent POM is to have a central place to store common dependencies, Properties, configuration, version that can be inherited by child POM, it´s just useful to manage shared resources and have a single point of modification to update your projects.</p><p>Example: If you have the DB Connector version specified in a parent pom, then any project depending on that parent pom, can be rebuilt with Maven after changing the parent pom DB connector version, and every project would update their internal DB Connector without actually modifying the API at all.</p><p>In current POC, i will use an application’s POM, create a Parent POM to store versions, common properties, dependencies and refer it in application’s POM.</p><p>Application’s pom.xml:</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;<br> &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;<br><br>&lt;groupId&gt;com.mycompany&lt;/groupId&gt;<br> &lt;artifactId&gt;pombom&lt;/artifactId&gt;<br> &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;<br> &lt;packaging&gt;mule-application&lt;/packaging&gt;<br><br> &lt;name&gt;pombom&lt;/name&gt;<br><br> &lt;properties&gt;<br>  &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;<br>  &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;<br>  &lt;app.runtime&gt;4.5.1&lt;/app.runtime&gt;<br>  &lt;mule.maven.plugin.version&gt;4.0.0&lt;/mule.maven.plugin.version&gt;<br> &lt;/properties&gt;<br><br> &lt;build&gt;<br>  &lt;plugins&gt;<br>   &lt;plugin&gt;<br>    &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;<br>    &lt;artifactId&gt;maven-clean-plugin&lt;/artifactId&gt;<br>    &lt;version&gt;3.2.0&lt;/version&gt;<br>   &lt;/plugin&gt;<br>   &lt;plugin&gt;<br>    &lt;groupId&gt;org.mule.tools.maven&lt;/groupId&gt;<br>    &lt;artifactId&gt;mule-maven-plugin&lt;/artifactId&gt;<br>    &lt;version&gt;${mule.maven.plugin.version}&lt;/version&gt;<br>    &lt;extensions&gt;true&lt;/extensions&gt;<br>    &lt;configuration&gt;<br>     &lt;sharedLibraries&gt;<br>      &lt;sharedLibrary&gt;<br>       &lt;groupId&gt;mysql&lt;/groupId&gt;<br>       &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;<br>      &lt;/sharedLibrary&gt;<br>     &lt;/sharedLibraries&gt;<br>    &lt;/configuration&gt;<br>   &lt;/plugin&gt;<br>  &lt;/plugins&gt;<br> &lt;/build&gt;<br><br> &lt;dependencies&gt;<br>  &lt;dependency&gt;<br>   &lt;groupId&gt;org.mule.connectors&lt;/groupId&gt;<br>   &lt;artifactId&gt;mule-http-connector&lt;/artifactId&gt;<br>   &lt;version&gt;1.8.0&lt;/version&gt;<br>   &lt;classifier&gt;mule-plugin&lt;/classifier&gt;<br>  &lt;/dependency&gt;<br>  &lt;dependency&gt;<br>   &lt;groupId&gt;org.mule.connectors&lt;/groupId&gt;<br>   &lt;artifactId&gt;mule-sockets-connector&lt;/artifactId&gt;<br>   &lt;version&gt;1.2.3&lt;/version&gt;<br>   &lt;classifier&gt;mule-plugin&lt;/classifier&gt;<br>  &lt;/dependency&gt;<br>  &lt;dependency&gt;<br>   &lt;groupId&gt;org.mule.connectors&lt;/groupId&gt;<br>   &lt;artifactId&gt;mule-db-connector&lt;/artifactId&gt;<br>   &lt;version&gt;1.14.6&lt;/version&gt;<br>   &lt;classifier&gt;mule-plugin&lt;/classifier&gt;<br>  &lt;/dependency&gt;<br>  &lt;dependency&gt;<br>   &lt;groupId&gt;mysql&lt;/groupId&gt;<br>   &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;<br>   &lt;version&gt;8.0.30&lt;/version&gt;<br>  &lt;/dependency&gt;<br> &lt;/dependencies&gt;<br> &lt;repositories&gt;<br>  &lt;repository&gt;<br>   &lt;id&gt;anypoint-exchange-v3&lt;/id&gt;<br>   &lt;name&gt;Anypoint Exchange&lt;/name&gt;<br>   &lt;url&gt;https://maven.anypoint.mulesoft.com/api/v3/maven&lt;/url&gt;<br>   &lt;layout&gt;default&lt;/layout&gt;<br>  &lt;/repository&gt;<br>  &lt;repository&gt;<br>   &lt;id&gt;mulesoft-releases&lt;/id&gt;<br>   &lt;name&gt;MuleSoft Releases Repository&lt;/name&gt;<br>   &lt;url&gt;https://repository.mulesoft.org/releases/&lt;/url&gt;<br>   &lt;layout&gt;default&lt;/layout&gt;<br>  &lt;/repository&gt;<br> &lt;/repositories&gt;<br> <br>&lt;pluginRepositories&gt;<br>  &lt;pluginRepository&gt;<br>   &lt;id&gt;mulesoft-releases&lt;/id&gt;<br>   &lt;name&gt;MuleSoft Releases Repository&lt;/name&gt;<br>   &lt;layout&gt;default&lt;/layout&gt;<br>   &lt;url&gt;https://repository.mulesoft.org/releases/&lt;/url&gt;<br>   &lt;snapshots&gt;<br>    &lt;enabled&gt;false&lt;/enabled&gt;<br>   &lt;/snapshots&gt;<br>  &lt;/pluginRepository&gt;<br> &lt;/pluginRepositories&gt;<br>&lt;/project&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*gWyEZi40ceMhGOeA.png" /></figure><p>Application’s POM.xml</p><p>Steps to be followed to create a parent POM:</p><ol><li>Go to your workspace and create a folder know as parent-pom and create pom.xml in it.</li><li>Copy paste content of your application’s pom.xml to parent pom.xml</li><li>Now pom.xml and parent pom. xml has same content.</li><li>Coming on to properties in pom.xml , below sourceEncoding, outputEncoding, runtime, maven.plugin.version are not application specific so can be kept in parent pom and removed from application’s pom.xml</li></ol><pre>  &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;<br>  &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;<br>  &lt;app.runtime&gt;4.5.1&lt;/app.runtime&gt;<br>  &lt;mule.maven.plugin.version&gt;4.0.0&lt;/mule.maven.plugin.version&gt;</pre><p>5. For plugins, we would want plugin and configurations to be inherited from parent pom.xml so will wrap plugins in parent pom under &lt;pluginManagement&gt; tag and remove versions from plugin in application’s pom.xml.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*-iIjVFEs7A0suMN8.png" /><figcaption>Parent POM.xml</figcaption></figure><p>6. For dependencies, we will enclose all dependencies under &lt;dependencyManagement&gt; tag in parent pom.xml and will remove dependency versions for all dependencies from application pom.xml as will be inherited from parent pom.xml</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/0*6-O7SMajg19Qav3n.png" /><figcaption>Parent pom.xml</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/0*mjc7pESb7GwnWw3x.png" /></figure><p>7. repositories and pluginRepositories will be referred from parent pom.xml hence can be removed from application’s pom.xml</p><p>8. For parent pom, packaging type will be pom</p><pre>&lt;groupId&gt;2b4250b3-0421-4fa9-8e2a-126b5ef25a5a&lt;/groupId&gt;<br> &lt;artifactId&gt;parent-pom&lt;/artifactId&gt;<br> &lt;version&gt;1.0.0&lt;/version&gt;<br> &lt;packaging&gt;pom&lt;/packaging&gt;</pre><p>For application’s pom.xml , add below to refer parent pom.xml from maven repository:</p><pre>&lt;parent&gt;<br> &lt;groupId&gt;2b4250b3-0421-4fa9-8e2a-126b5ef25a5a&lt;/groupId&gt;<br> &lt;artifactId&gt;parent-pom&lt;/artifactId&gt;<br> &lt;version&gt;1.0.0&lt;/version&gt;<br> &lt;relativePath&gt;../parent-pom/pom.xml&lt;/relativePath&gt;<br> &lt;/parent&gt;</pre><p>You can get error in application’s pom.xml when its not able to find parent pom.xml , so in that case you have to run mvn clean install for parent pom to be available in local maven repo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*1A3A2qZFJcYLJa7P.png" /></figure><p>Application’s POM.xml post changes:</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;<br> &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;<br> <br> <br> <br> &lt;parent&gt;<br> &lt;groupId&gt;2b4250b3-0421-4fa9-8e2a-126b5ef25a5a&lt;/groupId&gt;<br> &lt;artifactId&gt;parent-pom&lt;/artifactId&gt;<br> &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;<br> &lt;relativePath/&gt;<br> &lt;/parent&gt;<br><br> &lt;groupId&gt;2b4250b3-0421-4fa9-8e2a-126b5ef25a5a&lt;/groupId&gt;<br> &lt;artifactId&gt;demo&lt;/artifactId&gt;<br> &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;<br> &lt;packaging&gt;mule-application&lt;/packaging&gt;<br><br> &lt;name&gt;demo&lt;/name&gt;<br><br> &lt;build&gt;<br>  &lt;plugins&gt;<br>   &lt;plugin&gt;<br>    &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;<br>    &lt;artifactId&gt;maven-clean-plugin&lt;/artifactId&gt;<br>   &lt;/plugin&gt;<br>   <br>  &lt;/plugins&gt;<br> &lt;/build&gt;<br> &lt;dependencies&gt;<br>  &lt;dependency&gt;<br>   &lt;groupId&gt;org.mule.connectors&lt;/groupId&gt;<br>   &lt;artifactId&gt;mule-http-connector&lt;/artifactId&gt;<br>   &lt;classifier&gt;mule-plugin&lt;/classifier&gt;<br>  &lt;/dependency&gt;<br>  &lt;dependency&gt;<br>   &lt;groupId&gt;org.mule.connectors&lt;/groupId&gt;<br>   &lt;artifactId&gt;mule-sockets-connector&lt;/artifactId&gt;<br>   &lt;classifier&gt;mule-plugin&lt;/classifier&gt;<br>  &lt;/dependency&gt;<br>  &lt;dependency&gt;<br>   &lt;groupId&gt;org.mule.connectors&lt;/groupId&gt;<br>   &lt;artifactId&gt;mule-db-connector&lt;/artifactId&gt;<br>   &lt;classifier&gt;mule-plugin&lt;/classifier&gt;<br>  &lt;/dependency&gt;<br>  &lt;dependency&gt;<br>   &lt;groupId&gt;mysql&lt;/groupId&gt;<br>   &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;<br>  &lt;/dependency&gt;<br> &lt;/dependencies&gt;<br> <br>&lt;/project&gt;</pre><p>Parent POM.xml post modification:</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;<br> &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;<br><br>&lt;groupId&gt;2b4250b3-0421-4fa9-8e2a-126b5ef25a5a&lt;/groupId&gt;<br> &lt;artifactId&gt;parent-pom&lt;/artifactId&gt;<br> &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;<br> &lt;packaging&gt;pom&lt;/packaging&gt;<br><br> &lt;name&gt;parent-pom&lt;/name&gt;<br><br> &lt;properties&gt;<br>  &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;<br>  &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;<br>  &lt;app.runtime&gt;4.5.1&lt;/app.runtime&gt;<br>  &lt;mule.maven.plugin.version&gt;4.0.0&lt;/mule.maven.plugin.version&gt;<br> &lt;/properties&gt;<br><br> &lt;build&gt;<br>  &lt;pluginManagement&gt;<br>  &lt;plugins&gt;<br>   &lt;plugin&gt;<br>    &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;<br>    &lt;artifactId&gt;maven-clean-plugin&lt;/artifactId&gt;<br>    &lt;version&gt;3.2.0&lt;/version&gt;<br>   &lt;/plugin&gt;<br>   &lt;plugin&gt;<br>    &lt;groupId&gt;org.mule.tools.maven&lt;/groupId&gt;<br>    &lt;artifactId&gt;mule-maven-plugin&lt;/artifactId&gt;<br>    &lt;version&gt;${mule.maven.plugin.version}&lt;/version&gt;<br>    &lt;extensions&gt;true&lt;/extensions&gt;<br>    &lt;configuration&gt;<br>     &lt;sharedLibraries&gt;<br>      &lt;sharedLibrary&gt;<br>       &lt;groupId&gt;mysql&lt;/groupId&gt;<br>       &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;<br>      &lt;/sharedLibrary&gt;<br>     &lt;/sharedLibraries&gt;<br>    &lt;/configuration&gt;<br>   &lt;/plugin&gt;<br>  &lt;/plugins&gt;<br>  &lt;/pluginManagement&gt;<br> &lt;/build&gt;<br>        <br>&lt;dependencyManagement&gt;<br> &lt;dependencies&gt;<br>  &lt;dependency&gt;<br>   &lt;groupId&gt;org.mule.connectors&lt;/groupId&gt;<br>   &lt;artifactId&gt;mule-http-connector&lt;/artifactId&gt;<br>   &lt;version&gt;1.8.0&lt;/version&gt;<br>   &lt;classifier&gt;mule-plugin&lt;/classifier&gt;<br>  &lt;/dependency&gt;<br>  &lt;dependency&gt;<br>   &lt;groupId&gt;org.mule.connectors&lt;/groupId&gt;<br>   &lt;artifactId&gt;mule-sockets-connector&lt;/artifactId&gt;<br>   &lt;version&gt;1.2.3&lt;/version&gt;<br>   &lt;classifier&gt;mule-plugin&lt;/classifier&gt;<br>  &lt;/dependency&gt;<br>  &lt;dependency&gt;<br>   &lt;groupId&gt;org.mule.connectors&lt;/groupId&gt;<br>   &lt;artifactId&gt;mule-db-connector&lt;/artifactId&gt;<br>   &lt;version&gt;1.14.6&lt;/version&gt;<br>   &lt;classifier&gt;mule-plugin&lt;/classifier&gt;<br>  &lt;/dependency&gt;<br>  &lt;dependency&gt;<br>   &lt;groupId&gt;mysql&lt;/groupId&gt;<br>   &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;<br>   &lt;version&gt;8.0.30&lt;/version&gt;<br>  &lt;/dependency&gt;<br> &lt;/dependencies&gt;<br>&lt;/dependencyManagement&gt;<br> &lt;repositories&gt;<br>  &lt;repository&gt;<br>   &lt;id&gt;anypoint-exchange-v3&lt;/id&gt;<br>   &lt;name&gt;Anypoint Exchange&lt;/name&gt;<br>   &lt;url&gt;https://maven.anypoint.mulesoft.com/api/v3/maven&lt;/url&gt;<br>   &lt;layout&gt;default&lt;/layout&gt;<br>  &lt;/repository&gt;<br>  &lt;repository&gt;<br>   &lt;id&gt;mulesoft-releases&lt;/id&gt;<br>   &lt;name&gt;MuleSoft Releases Repository&lt;/name&gt;<br>   &lt;url&gt;https://repository.mulesoft.org/releases/&lt;/url&gt;<br>   &lt;layout&gt;default&lt;/layout&gt;<br>  &lt;/repository&gt;<br> &lt;/repositories&gt;<br> &lt;pluginRepositories&gt;<br>  &lt;pluginRepository&gt;<br>   &lt;id&gt;mulesoft-releases&lt;/id&gt;<br>   &lt;name&gt;MuleSoft Releases Repository&lt;/name&gt;<br>   &lt;layout&gt;default&lt;/layout&gt;<br>   &lt;url&gt;https://repository.mulesoft.org/releases/&lt;/url&gt;<br>   &lt;snapshots&gt;<br>    &lt;enabled&gt;false&lt;/enabled&gt;<br>   &lt;/snapshots&gt;<br>  &lt;/pluginRepository&gt;<br> &lt;/pluginRepositories&gt;<br>&lt;/project&gt;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6d85a39783d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Munit test for choice router using parameterization]]></title>
            <link>https://ekta2108.medium.com/munit-test-for-choice-router-using-parameterization-fc94bb5603b1?source=rss-e1b7beac0b6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc94bb5603b1</guid>
            <dc:creator><![CDATA[Ekta Sehgal]]></dc:creator>
            <pubDate>Thu, 15 Feb 2024 04:28:45 GMT</pubDate>
            <atom:updated>2024-02-15T04:28:45.806Z</atom:updated>
            <content:encoded><![CDATA[<p>Parameterized choice router is used to avoid creating multiple MUnit test cases for each choice path.</p><p>Below is simple application with a choice router:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*5In77zPva7AFB3KwfTOJuA.png" /></figure><p>Depending on the color sent in payload by user, application will return response:</p><p>If color is Red, response is “color is Red”</p><p>If color is Green, response is “color is Green”</p><p>For any other color or no color, response is “No color”</p><p>Now we will create a blank test suite as below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q7RuWbpJJZ5NOdCmbE-wOg.png" /></figure><p>Now in order to define parameters , we have to go to munit_choice-test-suite.xml&gt; Global elements &gt; MUnit Configuration and define parameters for different routes as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*znAezeFiriZVINdrGHWfdA.png" /></figure><p>Now click on “+” and add Parameterization name as “Red color route” and then define input and output as shown below, similarly do it for other routes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/885/1*Xr3FrumYKNgCGcdYY0M_HQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/911/1*agEqYeon_pIcsQEPI5ziAw.png" /><figcaption>setting input and output for different routes</figcaption></figure><p>After defining parameters, set payload in set event as highlighted below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_BTFz2mDZNmfVD6zMgrmJw.png" /></figure><p>In assert equals, set expected payload as output from parameter as below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1005/1*Yz3eB3j0cWL2vtAnK-v9Yg.png" /></figure><p>Initiate Munit test and see all routes have been covered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*ci5YNEx4uYghuWvtV_EIOA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*krI5lSfp6mBKXKHfYj3fBQ.png" /></figure><p>Note: Instead of defining parameters , we can also use yaml fine in MUnit configuration.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc94bb5603b1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sending logs from Mule application to CloudWatch]]></title>
            <link>https://ekta2108.medium.com/sending-logs-from-mule-application-to-cloudwatch-f7c589235b8e?source=rss-e1b7beac0b6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/f7c589235b8e</guid>
            <dc:creator><![CDATA[Ekta Sehgal]]></dc:creator>
            <pubDate>Wed, 14 Feb 2024 04:34:50 GMT</pubDate>
            <atom:updated>2024-02-14T04:34:50.774Z</atom:updated>
            <content:encoded><![CDATA[<p>Add below dependencies to POM.xml</p><pre>       &lt;dependency&gt;<br>            &lt;groupId&gt;com.kdgregory.logging&lt;/groupId&gt;<br>            &lt;artifactId&gt;log4j2-aws-appenders&lt;/artifactId&gt;<br>            &lt;version&gt;2.4.1&lt;/version&gt;<br>        &lt;/dependency&gt;<br>        &lt;dependency&gt;<br>            &lt;groupId&gt;com.amazonaws&lt;/groupId&gt;<br>            &lt;artifactId&gt;aws-java-sdk-logs&lt;/artifactId&gt;<br>            &lt;version&gt;1.11.495&lt;/version&gt;<br>        &lt;/dependency&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*14GG8xXX_SYS1oP_WSbMHQ.png" /></figure><p>Add the required packages, Appenders, and loggers in the log4j.xml</p><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br>&lt;Configuration packages=&quot;com.mulesoft.ch.logging.appender,com.kdgregory.log4j2.aws&quot; status=&quot;debug&quot;&gt;<br>&lt;Appenders&gt;<br>&lt;CloudWatchAppender name=&quot;CLOUDWATCH&quot;&gt;<br>    &lt;logGroup&gt;mule&lt;/logGroup&gt;<br>    &lt;logStream&gt;mulestream&lt;/logStream&gt;<br>    &lt;rotationMode&gt;daily&lt;/rotationMode&gt;<br>    &lt;PatternLayout<br>        pattern=&quot;[%d{yyyy-MM-dd HH:mm:ss.SSS}] %-5p [%t] %c - %m%n&quot; /&gt;<br>&lt;/CloudWatchAppender&gt;<br><br>&lt;/Appenders&gt;<br>&lt;Loggers&gt;<br><br>&lt;AsyncRoot level=&quot;INFO&quot;&gt;<br>    &lt;AppenderRef ref=&quot;CLOUDWATCH&quot; /&gt;<br>&lt;/AsyncRoot&gt;<br>&lt;/Loggers&gt;<br> <br>&lt;/Configuration&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t-ve2c7QcpzSSGw-TgNCMA.png" /></figure><p>logGroup, logStream will be the log group and log stream created in cloudwatch</p><p>Steps to create log group and log stream in CloudWatch:</p><ol><li>from console home , click on Cloudwatch.</li><li>select logs &gt;log group</li><li>click create log group, enter log group name.</li><li>now click on log group created and create log stream.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QNnyUzZdJW0z4YUdZYiB-A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*shb_dzTIpTcdjto_KOh1Wg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pEqGEVkKivTLQEzhzsj9_g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TRxRbS26FWra1iyioR6nPA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hRTlvaZEHr-8iDYdzy-RIA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3gF-3muRk2HBCsM2PWmfvA.png" /></figure><p>Create IAM access key and secret to access services and download csv to have access key and access secret</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Aqt1nQs6zBSUYE6-v2tQ1g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SGGTAQll_9ebe7WEATTFOw.png" /></figure><p>pass access key Id , region and secret in run configurations:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*BxkeHg82HQYdUV99kNIHfA.png" /></figure><p>Now intiate flow and observe logs in aws cloudwatch</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GzZ3NawnKISaS4MLFnzRWw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7c589235b8e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[RAML Query Parameters requiring either of the two fields]]></title>
            <link>https://ekta2108.medium.com/raml-query-parameters-requiring-either-of-the-two-fields-d98892bbd80d?source=rss-e1b7beac0b6f------2</link>
            <guid isPermaLink="false">https://medium.com/p/d98892bbd80d</guid>
            <dc:creator><![CDATA[Ekta Sehgal]]></dc:creator>
            <pubDate>Tue, 13 Feb 2024 14:28:32 GMT</pubDate>
            <atom:updated>2024-02-13T14:28:32.243Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ui3dz954EPP0s0H5ssm1oQ.jpeg" /><figcaption><a href="https://www.bing.com/ck/a?!&amp;&amp;p=fc986af181f20bfbJmltdHM9MTcwNzc4MjQwMCZpZ3VpZD0zYjAwNGE3Ny03ZDE2LTY5MzAtMDAwZS01OTdjN2NlNDY4YjMmaW5zaWQ9NTI0NQ&amp;ptn=3&amp;ver=2&amp;hsh=3&amp;fclid=3b004a77-7d16-6930-000e-597c7ce468b3&amp;psq=how+to+write+atleast+one+queryparam+required+in+raml&amp;u=a1aHR0cHM6Ly9oZWxwLm11bGVzb2Z0LmNvbS9zL3F1ZXN0aW9uLzBENTJUMDAwMDVVYlFOS1NBMy9yYW1sLXF1ZXJ5LXBhcmFtZXRlcnMtcmVxdWlyaW5nLWVpdGhlci1vZi10aGUtdHdvLWZpZWxkcw&amp;ntb=1">RAML Query Parameters requiring either of the two fields</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d98892bbd80d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>