Set to alias or copy paste to terminal to keep session alive.
while true; do echo "hello" > /dev/null; sleep 25; done
Adding timer variables in Mule flows to check for performance bottlenecks.
<set-variable value="#[%dw 2.0 import currentMilliseconds from dw::util::Timer --- currentMilliseconds()]"
variableName="http_before" doc:name="http_before" mimeType="application/java"/>
Try it out here: https://developer.mulesoft.com/learn/dataweave/
{
"name": "apple",
"birthYear": "1950"
If you are having trouble running Munit in Anypoint Studio, try updating your Studio version and application's munit dependencies to latest versions.
After doing updating to below updates, I could run & debug Munit tests in my Anypoint Studio.
Prior to that, I was getting all kind of weird internal errors.
My Setup (as of 14th October 2022):
<munit:execution> | |
<munit:set-event doc:name="Set Event - Payload and Query Params"> | |
<munit:payload value="#[MunitTools::getResourceAsString('some-api/api-request.json')]" mediaType="application/json" /> | |
<munit:attributes value='#[ | |
{ | |
"queryParams": { | |
"doc_type": "abcd" | |
}, | |
"uriParams": { |
The APIs to list appliations deployed to an environment in Mulesoft depends on the type of application - Cloudhub, On-prem, or RTF.
$ClientId = "<enter connect app client id>" | |
$ClientSecret = "<enter connect app client secret>" | |
## Step 1: Login to get Token | |
$Props = @{ | |
Uri = "https://anypoint.mulesoft.com/accounts/api/v2/oauth2/token" | |
Method = "POST" | |
Headers = @{ |
steps: | |
- task: PowerShell@2 | |
displayName: Validate - Build branch is not behind master | |
condition: or(eq(variables['Build.SourceBranchName'], 'develop'),startsWith(variables['Build.SourceBranchName'], 'release-'),startsWith(variables['Build.SourceBranchName'], 'bugfix-'),startsWith(variables['Build.SourceBranchName'], 'hotfix-')) | |
inputs: | |
targetType: 'inline' | |
failOnStderr: true | |
script: | | |
$Uri = "$(System.TeamFoundationCollectionUri)$(System.TeamProject)/_apis/git/repositories/$(Build.Repository.ID)/stats/branches?name=$(Build.SourceBranchName)&api-version=6.0" |