Contact Us 1-800-596-4880

p

p(String): String

This function returns a string that identifies the value of one of these input properties: Mule property placeholders, System properties, or Environment variables.

The p function returns a null value if the property is not set or if the function does not find the property.

For more on this topic, see Configure Properties.

Parameters

Name Description

propertyName

A string that identifies property.

Example

This example logs the value of the property http.port in a Logger component.

Source

<flow name="simple">
 <logger level="INFO" doc:name="Logger"
   message="#[Mule::p('http.port')]"/>
</flow>

Example

This example shows the password configuration for an Amazon S3 Connector connection to get an image from Amazon S3. The p function returns a string that identifies the value of secure::accessKey and secure::secretKey properties. The secure:: prefix is used to access Mule secure configuration properties.

Source

<flow name="simple">
 <s3:config name="Amazon_S3_Configuration" doc:name="Amazon S3 Configuration">
     <s3:basic-connection
       accessKey="#[Mule::p('secure::accessKey')]"
       secretKey="#[Mule::p('secure::secretKey')]"/>
   </s3:config>
 <s3:get-object config-ref="Amazon_S3_Configuration" bucketName="myBucket" key="maxImages/maxthemule.jpg"
     doc:name="Get object"/>
</flow>