Posts

Showing posts with the label Mulesoft

Dataweave 2.0 - Pluck

Image
 Pluck is useful converting HashMap/Object into array of Objects.  pluck  iterates over an object and returns an array of keys, values, or indices from the object.

Dataweave 2.0(2.7) - typeOf

Image
 How to determine if the variable or payload type is String, Array, Number , Boolean or Object  using typeOf Object: String Number: Boolean: Array:

Mule4 - Resolving Database Date and DateTime Type Error while Inserting.

Let's see how to resolve error while inserting database date and datatime errors in Mule4 while inserting data into database. Column Declared as Date in database for the table example as follows: TRANDATE DATE DEFAULT '1970-01-01' NOT NULL, Dataweave : ( assuming the incoming  billing_date is coming as DateTime( example: "2024-02-06T11:02:05.237Z") and converting to Date in String format "yyyy-MM-dd" %dw 2.0 output application/json --- "billing_date": $.billing_date as DateTime {format: "yyyy-MM-dd'T'HH:mm:ss.SSSX"} as String {format : "yyyy-MM-dd"} , to convert RAML datetime type DB date time %dw 2.0 output application/json --- "date_updated" : $.date_updated as DateTime {         format : "yyyy-MM-dd'T'HH:mm:ss.SSSX"     } as DateTime {         format : "yyyy-MM-dd HH:mm:ss"     } error while executing :  "reason": "DB:QUERY_EXECUTION", "message&q

Salesforce Certified MuleSoft Platform Architect - Level1 - Reference Notes

Image
 I have passed my "Salesforce Certified Mulesoft Platform Architect - Level1" on 4th Dec 2022 and would like to share the reference study notes with Mulesoft community. Here is my certificate My Score in the exam My study reference material Topic/chapter wise. Once Reference links are completed, strongly recommend taking free practice exam from mulesoft @  https://training.mulesoft.com/certification/architect-platform-level1/practice-exam practice this exam until you get all correct answers and why they are correct by referring to mulesoft documentation and based on your experience. Please leave a comment if you want me to add any references that would help or links that are broken. Explaining application network basics  https://blogs.mulesoft.com/learn-apis/api-led-connectivity/what-is-api-led-connectivity/ https://www.mulesoft.com/resources/api/what-is-full-lifecycle-api-management . https://docs.mulesoft.com/monitoring/ https://www.infomentum.com/mulesoft-plain-language

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