Posts

Mule4- Create Custom Policy , Configuration and Deploy to Exchange

Image
1. Mule4 Generate Custom policy template using maven Archetype. Add the following profile to settings.xml(.m2/settings.xml), this is to recognize the maven archetype repo location. < profiles > < profile > < id > archetype-repository </ id > < repositories > < repository > < id > archetype </ id > < name > Mule Repository </ name > < url > https://repository-master.mulesoft.org/nexus/content/repositories/public </ url > < releases > < enabled > true </ enabled > < checksumPolicy > fail </ checksumPolicy > </ releases > < snapshots > < enabled > true </ enabled > < checksumPolicy > warn </ checksumPolicy > </ snapshots > </ repository > </ repositories > </ profile > &

12 factors app for MicroServices

  1 – Codebase One codebase per service, tracked in revision control; many deploys 2 – Dependencies Explicitly declare and isolate dependencies. 3 – Config Store configuration in the environment 4 – Backing Services Treat backing services as attached resources 5 – Build, Release, Run Strictly separate build and run stages 6 – Processes Execute the app in one or more stateless processes 7 – Data Isolation Each service manages its own data 8 – Concurrency Scale out via the process model 9 – Disposability Maximize robustness with fast startup and graceful shutdown 10 – Dev/Prod Parity Keep development, staging, and production as similar as possible 11 – Logs Treat logs as event streams 12 – Admin Processes Run admin and management tasks as one‑off processes

Anypoint SSO Authentication with TwoFactorAuthentication(2FA) leading to Blank Page

Image
 If you are setting up Anypoint studio and trying to setup Anypoint plaform credentials in Studio with external Identity and 2FA leading to blank page. Resolution:  Ensure that you clear browsing history of Microsoft edge(if this is your native browser) then change the browser option in anypoint studio under Window -->Preferences-->Anypoint Studio -->Browser  choose option  from built-in to Native .( as shown in screenshot)

Mule4- Salesforce Connector- Version-10.4.2 - Create job bulk api v 2 - ClientInputError:LineEnding is invalid on user data. Current LineEnding setting is LF

Image
 Problem: When using Salesforce Connector in Mule4 - Component - " Create job bulk api v2 " - when job is crated, return error: ClientInputError:LineEnding is invalid on user data. Current LineEnding setting is LF Resolution: to resolve the issue, try adding lineSeparator="\n" in dataweave while building csv payload for bulk job. Screenshot:

Mule4 - How to skip adding port to the http requestor - to resolve 503 service unavailable

Image
 In  Mule4 port is appended automatically 80 for http and 443 for https when using http requestor component.  if the backend api is not accepting port as part of the url, backend endpoint may return 503 service unavailable. To resolve the issue, try adding "host" header to the http requestor, the value for the host header is endpoint host name, when added mulesoft will remove adding port to the http requestor call. Example: if the endpoint url is "api.abc.com/api" then add "host" header value as "api.abc.com"

MuleSoft ESB

Image
MuleSoft AnyPoint Studio Build failed when (i.e unable to download mule runtime and mule dependencies) running mule project with Anypoint studio for first time  using  RunAs-->Mule Application with Maven. Resolved the build issue by navigating to Mule-->Populate Maven Repository above action downloaded all mule dependencies to local repo(.m2 folder) Sharing Common/Custom code or Flows in different Mule applications Referring common  core mule flows/subflows or Java classes ( example: reading common header, cookies, logging ) across different mule applications. Create common core mule project(candidate  flows/subflows and java classes used across different domains, like security, logging, headers etc). Example: core project defining “set Payload” to demonstrate usage.                       Build common core as jar file.                 Add common core as dependency in any API/domain that requires c

WSO2 ESB

WSO2 ESB Learnings To get HTTP Status code in a sequence <property name="httpSc"  expression="$axis2.HTTP_SC" /> Custom  Make Fault in WSO2 1. Build payload factory with ERROR_CODE and ERROR_MESSAGE set by ESB when error occurs in mediation. <payloadFactory media-type="xml">    <format>       <Errors xmlns="http://wso2.com/make/fault">          <Error>             <ErrorCode>$1</ErrorCode>             <ErrorMessage>$2</ErrorMessage>          </Error>       </Errors>    </format>    <args>       <arg evaluator="xml" expression="get-property('ERROR_CODE')" />       <arg evaluator="xml" expression="get-property('ERROR_MESSAGE')" />    </args> </payloadFactory> 2.Extract the "Errors" node and store in property as of type "OM" element. <property xm