BassemE/mulesoft-documentation-embeddings huggingface dataset:
Allow Addresses for API Platform Proxies | MuleSoft Documentation
# Allow Addresses for API Platform Proxies
By default, proxy requests are enabled for the domain name where the platform is running.
To allow addresses:
  1. Log in to Ops Center and select **Kubernetes** on the left side-bar.
  2. Select the `api-manager` namespace from the drop-down menu on the top, and then select **Configmaps**. Find the `api-platform-web-env` configmap and then click on `Edit Config Map`.
  3. Select the **APW_FEATURES_PROXYWHITELIST** tab and ensure that value is set to `true`. (You’ll have to hover your mouse over the tabs to get a tooltip with the full name to find the right tab)
If not, set it to `true` and then select `Apply`.
  4. Select the **APW_PROXYWHITELIST_RULES** tab.
  5. Write your rules separated by commas.
The following example defines regular expressions that allow requests to be made to the `**.somewhere.com/**`and`**.somewhereelse.com/**`domains, where`*` is any part of a DNS name or URL:


```
.*\.somewhere\.com,.*\.somewhereelse\.com
```

  1. Select **Apply** to save changes to the `api-platform-web-env` config map.
  2. Re-create the pods to ensure that each node in the cluster uses the most recent configuration:
```
kubectl delete pod -n api-manager -l component=api-platform-web
```
decodeURI | MuleSoft Documentation
# decodeURI
## decodeURI(text: String): String
Decodes the escape sequences (such as `%20`) in a URI.
The function replaces each escape sequence in the encoded URI with the character that it represents, but does not decode escape sequences that could not have been introduced by `encodeURI`. The character `#` is not decoded from escape sequences.
### Parameters
Name | Description  
---|---  
The URI to decode.  
### Example
This example decodes a URI that contains the URL percent encoding `%20`, which is used for spaces.
#### Source
```
%dw 2.0
import * from dw::core::URL
output application/json
---
{
 "decodeURI" : decodeURI('http://asd/%20text%20to%20decode%20/text')
}
```

#### Output
```
{
 "decodeURI": "http://asd/ text to decode /text"
}
```
flatMap | MuleSoft Documentation
# flatMap
## flatMap<T, R>(@StreamCapable items: Array<T>, mapper: (item: T, index: Number) -> Array<R>): Array<R>
Iterates over each item in an array and flattens the results.
Instead of returning an array of arrays (as `map` does when you iterate over the values within an input like `[ [1,2], [3,4] ]`), `flatMap` returns a flattened array that looks like this: `[1, 2, 3, 4]`. `flatMap` is similar to `flatten`, but `flatten` only acts on the values of the arrays, while `flatMap` can act on values and indices of items in the array.
### Parameters
Name | Description  
---|---  
The array to map.  
Expression or selector for an `item` and/or `index` in the array to flatten.  
### Example
This example returns an array containing each value in order. Though it names the optional `index` parameter in its anonymous function `(value, index) → value`, it does not use `index` as a selector for the output, so it is possible to write the anonymous function using `(value) → value`. You can also use an anonymous parameter for the value to write the example like this: `[ [3,5], [0.9,5.5] ] flatMap $`. Note that this example produces the same result as `flatten([ [3,5], [0.9,5.5] ])`, which uses `flatten`.
#### Source
```
%dw 2.0
output application/json
---
[ [3,5], [0.9,5.5] ] flatMap (value, index) -> value
```

#### Output
```
[ 3, 5, 0.9, 5.5]
```

## flatMap<T, R>(@StreamCapable value: Null, mapper: (item: Nothing, index: Nothing) -> Any): Null
Helper function that enables `flatMap` to work with a `null` value.
AS2 Connector 6.8 | MuleSoft Documentation
# AS2 Connector 6.8
Mule runtime engine (Mule) supports the AS2 protocol through Anypoint Connector for AS2 (AS2 Connector).
AS2 Connector enables trading partners to transmit and receive AS2 messages with EDI-X12, EDIFACT, XML, or binary payloads, for example:
  * Send messages, signed or unsigned, over HTTP or HTTPS, using the AS2 protocol
  * Receive messages over HTTP or HTTPS, using the AS2 protocol
  * Receive asynchronous MDN for sent messages


For compatibility information and fixed issues, see the AS2 Connector Release Notes.
For a major or minor release, see Upgrading and Migrating.
## Before You Begin
To use this connector, you must be familiar with:
  * The AS2 target resource
  * Anypoint Connectors
  * Mule runtime engine (Mule)
  * Elements and global elements in a Mule flow
  * How to create a Mule app using Anypoint Studio (Studio)


Before creating an app, you must have access to:
  * Credentials to access the AS2 target resource
  * Anypoint Platform
  * Anypoint Studio version 7.6 or later


## Common Use Cases for the Connector
Common use cases for AS2 Connector include the following:
  * Send with sync MDN


Sends a message through HTTP or HTTPS using the AS2 protocol requesting the partner for a synchronous MDN (receipt)
  * Send with async MDN


Sends a message through HTTP or HTTPS using the AS2 protocol requesting the partner for an asynchronous MDN (receipt)
  * Listener


Source that receives messages via HTTP or HTTPS using the AS2 protocol
  * MDN Listener


Source that receives asynchronous MDN receipts via HTTP or HTTPS using the AS2 protocol
  * Non repudiation Listener


Source that receives a signed copy of a receipt or a message for persistent non-repudiation storage
## Non-Repudiation Storage of AS2 Messages and MDNs
If needed, you can configure non-repudiation storage for your AS2 operations to support regulatory or compliance requirements.
Only signed messages and MDNs are eligible for non-repudiation.
The following AS2 Connector sources and operations support the non-repudiation feature:
  * AS2 Send Sync operation
  * AS2 Send Async operation
  * AS2 Listener source
  * AS2 MDN Listener source


### Before You Begin for Non-Repudiation Storage
To enable non-repudiation of a message in AS2 Connector, you must implement and configure a separate Mule flow that acts as a non-repudiation flow:
  * The non-repudiation flow must have access to the signed MIME message that is passed to it, along with appropriate non-repudiation specific attributes.
  * This non-repudiation-specific Mule flow is responsible for receiving, storing, and acting upon the messages and attributes it receives.
  * The name of this non-repudiation flow must be configured on an appropriate listener or operation that has non-repudiation storage enabled.


## Next Step
After you complete the prerequisites, you are ready to create an app and configure the connector using Anypoint Studio.
## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * MuleSoft Help Center
Automated Policies | MuleSoft Documentation
# Automated Policies
Use automated policies to enforce security and logging requirements by applying the same policies to all APIs running in Mule. With policy automation, you can quickly design, build, and deploy secure and consistent APIs.
Automated policies enable you to deploy APIs with confidence because the target environment automatically enforces critical policies, resulting in reduced errors. An administrator no longer needs to remember to insert a policy to enforce common standards manually.
You can configure all included policies and custom policies as automated policies and apply them to the APIs running in an environment.
## Automated Policies in Mule
The following rules apply to automated policies in Mule runtime engine (Mule):
  * Automated policies are available only for Mule 4 APIs using a MuleSoft-hosted control plane.
  * Automated policies support all runtime deployment targets (CloudHub, Runtime Fabric, and hybrid).
  * Automated policies have priority over the same types of policies already applied to a specific API proxy.
For example, if an API proxy running Mule 4.1.2 has an IP Allowlist policy to allow only the IP range 192.168.100.0/22 (from 192.168.100.0 to 192.168.103.255), and a new IP Allowlist automated policy is created to only allow the IP range 192.168.100.14/24 (from 192.168.100.0 to 192.168.100.255) and is applied to all supported Mule versions (4.1.1 and above), then this latter automated policy prevails.
Note that in the above example, the IP range changed when the automated policy was applied.
Additionally, if there is an automated policy already applied, you cannot apply that specific type of policy as a provided policy in a specific API proxy.
  * As an administrator, you can apply policies specific to external identity providers (IdPs, such as OpenID) if the environment to which you want to apply policies includes them.
The policy is then enforced only on those APIs that have the same IdPs configured. For example, if you apply the PingFederate Access Token Enforcement policy, the policy is enforced on only those APIs that are configured to use PingFederate as the IdP.


Alerts cannot be added to API instances protected by automated policies.  
---  
## See Also
  * Applying Automated Policies
Runtime Fabric Release Notes | MuleSoft Documentation
# Runtime Fabric Release Notes
  * **Runtime Fabric**
    * Runtime Fabric 2.x.x Release Notes
    * Runtime Fabric 1.x.x Release Notes
    * Runtime Fabric Command Line Tool (rtfctl) Release Notes
  * **Runtime Fabric Appliance**
    * Runtime Fabric Installer Release Notes
    * Runtime Fabric Install Scripts Release Notes
    * Runtime Fabric Command Line Tool (rtfctl) Release Notes
  * **Mule Runtime Engine Patch Updates**
    * Mule Runtime Patch Updates Release Notes for Runtime Fabric


For versions of Runtime Fabric that have reached end of life, see the Anypoint Runtime Fabric Release Notes Archive
Conditionally Reduce a List through a Function | MuleSoft Documentation
# Conditionally Reduce a List through a Function
This DataWeave example flattens the input to something simpler. For each element in the input, it conditionally includes a `contentTypes` field only in case it has any values. It then rearranges this content into a more readable shape.
The examples use these functions:
  * `map` to go through every element in the input array.
  * `reduce` to aggregate the multiple elements in the `tags` array into one field.
  * `splitBy` to parse the values in the "tags" array, so as to only select the first part of each string (through `[0]`) and discard the second.
  * `++` to concatenate these elements into one single string, with commas as separators.
  * `if` include the last field only if the `contentTypes` array is bigger than 0.


DataWeave Script:
```
%dw 2.0
output application/json
fun reduceMapFor(data) = data reduce(($$ splitBy ":")[0] ++ "," ++ ($ splitBy ":")[0])
---
payload.results map
  {
    email: $.profile.email,
    name: $.profile.firstName,
    tags: reduceMapFor($.data.interests.tags[0]),
    (contenttypes: reduceMapFor($.data.interests.contenttypes[0])) if (sizeOf($.data.interests.contenttypes[0]) > 0)
  }
```

Input JSON Payload:
```
{
 "results": [
  {
   "profile": {
    "firstName": "john",
    "lastName": "doe",
    "email": "johndoe@demo.com"
   },
   "data": {
    "interests": [
     {
      "language": "English",
      "tags": [
       "digital-strategy:Digital Strategy",
       "innovation:Innovation"
      ],
      "contenttypes": []
     }
    ]
   }
  },
  {
   "profile": {
    "firstName": "jane",
    "lastName": "doe",
    "email": "janedoe@demo.com"
   },
   "data": {
    "interests": [
     {
      "language": "English",
      "tags": [
       "tax-reform:Tax Reform",
       "retail-health:Retail Health"
      ],
      "contenttypes": [
       "News",
       "Analysis",
       "Case studies",
       "Press releases"
      ]
     }
    ]
   }
  }
 ],
 "objectsCount": 2,
 "totalCount": 2,
 "statusCode": 200,
 "errorCode": 0,
 "statusReason": "OK"
}
```

Output JSON:
```
[
 {
  "email": "johndoe@demo.com",
  "name": "john",
  "tags": "digital-strategy,innovation"
 },
 {
  "email": "janedoe@demo.com",
  "name": "jane",
  "tags": "tax-reform,retail-health",
  "contenttypes": "News,Analysis,Case studies,Press releases"
 }
]
```

## Related Examples
  * Exclude Fields from the Output
  * Output a Field When Present
  * Use Constant Directives
  * Define a Function that Flattens Data in a List
  * Pass Functions as Arguments


## See Also
  * DataWeave Selectors
  *
Delete API Instances | MuleSoft Documentation
# Delete API Instances
You can delete an API instance and its version if you no longer need to manage it from API Manager. Deleting an instance from API Manager does not delete its referenced asset from other locations, such as Anypoint Exchange (Exchange) or file system.
You cannot delete an API specification that is currently used in one or more API instances or versions being managed in API Manager.
To delete API instances from API Manager:
  1. Navigate to **Anypoint Platform** > **API Manager**.
  2. In **API Administration** , click the name of the API instance you want to delete.
  3. Select **Actions** > **Delete API**.
  4. Click **Delete** to confirm.
Your API instance is now successfully deleted.
ServiceNow Connector 6.15 | MuleSoft Documentation
# ServiceNow Connector 6.15
Anypoint Connector for ServiceNow (ServiceNow Connector) provides connections between Mule runtime engine (Mule) and ServiceNow apps. Use the ServiceNow operations with the custom ServiceNow tables, along with any operations available through the installed plugins.
For compatibility information and fixed issues, see the ServiceNow Connector Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
  * Anypoint Connectors
  * Mule runtime engine (Mule)
  * Elements in a Mule flow and global elements
  * How to create a Mule app using Anypoint Studio


Before creating an app, you must have access to the ServiceNow target resource and Anypoint Platform.
## Common Use Cases for the Connector
Common use cases for ServiceNow Connector include:
  * **IT Service Management (ITSM)**
Sync ServiceNow data and extend IT service management (ITSM) capabilities to SaaS and on-premises applications, such as Salesforce, SAP, Workday, and Microsoft Dynamics 365, to help with data migration and replication, application integration, and consolidation. For example, you can bidirectionally sync workers data between Workday and ServiceNow or aggregate employees from Workday and users from ServiceNow into a CSV file.
  * **Integrated Business Processes**
Fully integrate business processes across HR, legal, procurement, operations, marketing, and facilities departments.
  * **Record Creation and Retrieval**
Transform enterprise IT by automating and managing IT service relationships to create a single system of records that you can retrieve.


For examples of these use cases, refer to ServiceNow Connector Examples.
## Audience
  * New users, read:
    * Using Anypoint Studio to Configure the Connector to create your Mule app
  * Advanced users, read:
    * XML and Maven Support
    * Examples, which provides one or more use cases for the connector


## Connection Types
The following authentication types are supported:
  * Basic
  * OAuth 2.0 Authorization Code


### Limitations
  * OAuth 2.0 Authorization Code authentication works only with the following versions of Mule:
    * 4.1.5
    * 4.2.1 and later
  * Metadata does not work with OAuth 2.0 Authorization Code authentication.


## Use Exchange Templates and Examples
Anypoint Exchange provides templates you can use as a starting point for your app, as well as examples that illustrate a complete solution.
  * Workday and ServiceNow Worker Bidirectional Sync
  * Workday Worker to ServiceNow Service Request Migration
  * Workday and ServiceNow Employee Aggregation
  * Workday to ServiceNow Service Worker Migration
  * Workday Worker to ServiceNow Service Request Broadcast


## Next Step
After you complete the prerequisites and experiment with templates and examples, you are ready to create an app with Anypoint Studio.
## See Also
  * Introduction to Anypoint Connectors
  * Use Anypoint Exchange to Discover Connectors, Templates, and Examples
  * ServiceNow Connector Release Notes
  * ServiceNow Connector on Exchange
  * MuleSoft Help Center
Managing Connected Apps | MuleSoft Documentation
# Managing Connected Apps
Connected apps are applications that allow external applications to securely interact with the Anypoint Platform APIs by providing controlled access to its resources using OAuth 2.0 authentication protocols, without the need to share user credentials directly. For more information, see Secure API Integration with Connected Apps.
When an asset is created using a connected app and is published to Exchange, the creator of the asset is automatically set as the owner of the connected app.
Control whether or not to assign owner roles when creating assets using a connected app to avoid going over the maximum role limit.
When enabled, when creating new assets using a connected app, roles aren’t assigned to connected app owners. When disabled, roles are assigned by default.
  1. From the navigation bar, select **Settings** and select **Asset Deletion & Connected Apps Management**.
  2. In **Connected Application Owner Configuration** , enable or disable the option.


## See Also
Connected Application Authentication
Disable Pooling in the SFTP Connector Configuration | MuleSoft Documentation
# Disable Pooling in the SFTP Connector Configuration
Disable connection pooling in the Anypoint Connector for SFTP (SFTP Connector) configuration to make sure no connection is active if there is nothing to transfer.
  1. In Studio, navigate to the **Global Elements** tab.
  2. Select the **SFTP Connector** config.
  3. Click **Edit**.
  4. In the Global Elements properties tab, click the **Advanced** tab.
  5. Set **Pooling profile** to **Edit inline**.
  6. Set the values of **Max active** , **Max idle** , and **Max wait** to `0` to ensure that no connection is active if there is nothing to transfer.


## See Also
  * SFTP Connector Examples
  * MuleSoft Help Center
Object Store Connector Examples | MuleSoft Documentation
# Object Store Connector Examples
To fully benefit from using Anypoint Connector for Object Store (Object Connector), see the following examples of configuring the connector operations:
  * Define Object Stores Define a global or private object store configuration to use in your Mule application.
  * Store and Retrieve information in Object Stores Configure the **Store** and **Retrieve** operations to store and retrieve information in an object store.
  * Set up Watermarks with an Object Store Configure Object Store Connector parameters to set up watermarking technique in order to store and retrieve the point at which a periodic synchronization should resume the next time it’s executed.


## See Also
  * Introduction to Anypoint Connectors
  * MuleSoft Help Center
Fork a Project in the Text Editor | MuleSoft Documentation
# Fork a Project in the Text Editor
You can separate new iterations of a project from previous iterations by branching.
## About this Task
A new branch is a fork of your project and cannot be merged back into the main branch. Anybody who has access to your project can also create branches.
Even when there are forks of a project, when you open that project the editor opens it to the main branch. If you want to return to a fork that you were working in, you must select that fork.
You can publish any fork of an API specification to Anypoint Exchange.
## Procedure
  * To fork a project:
    1. Open the project.
    2. Click the name of your branch at the top of the text editor.
    3. Type a name in the search field and type **Enter**.
**Result:** The text editor automatically switches to the new fork.
  * To work in a fork of a project:
    1. Open the project.
    2. Click the name of your branch at the top of the text editor.
    3. Select the name of the fork that you want to work in.
isDateType | MuleSoft Documentation
# isDateType
## isDateType(t: Type): Boolean
Returns `true` if the input is the Date type.
_Introduced in DataWeave version 2.3.0._
### Parameters
Name | Description  
---|---  
The type to check.  
### Example
This example shows how `isDateType` behaves with different inputs.
#### Source
```
%dw 2.0
import * from dw::core::Types
type ADate = Date
output application/json
---
{
  a: isDateType(ADate),
  b: isDateType(Date),
  c: isDateType(String),
}
```

#### Output
```
{
 "a": true,
 "b": true,
 "c": false
}
```
Determining API Instance ID on API Manager | MuleSoft Documentation
# Determining API Instance ID on API Manager
API Manager generates the `apiId` of new API instances managed by API Manager and displays the ID on the API instance dashboard. The API Instace ID cannot be changed.
To find the API instance ID:
  1. Navigate to **Anypoint Platform** > **API Manager**.
  2. In **API Administration** , click the name of the API instance whose ID you want.
The API instance ID is displayed under **API Instance ID**.
Anypoint API Governance Release Notes | MuleSoft Documentation
# Anypoint API Governance Release Notes
The following release notes are provided for API Governance:
  * Anypoint API Governance Release Notes


## See Also
  * Anypoint API Governance Overview
Change the Target Output of a Transformation (Anypoint Studio) | MuleSoft Documentation
# Change the Target Output of a Transformation (Anypoint Studio)
By default, the Transform Message component outputs to the message payload. You can change this target, so that the result of your transformation populates another part of the output such as a property or variable.
  1. Click **Edit Current Target** above the DataWeave code editor.
  2. Specify where in the output Mule message to place the result of your DataWeave transform. In case you’re creating a new variable or property, you must also set a name for it.


## See Also
Transform Message Component
Add Another Output to the Transform Message Component
Mule Message Structure
DataWeave Language
Automation Credits Usage and Rates | MuleSoft Documentation
# Automation Credits Usage and Rates
Your MuleSoft Automation subscription plan includes a quota of Automation Credits that depletes as you create and execute automations.
Credit usage rates differ for different subscription plans. Refer to the article that corresponds to your subscription plan as shown in the following table:
Subscription Plan | Conversion Rate Sheet  
---|---  
  * Automation Starter
  * Automation Advanced
  * Automation for vCore/Core
  * Additional Automation Credits

| MuleSoft Automation Credits 2.0  
  * MuleSoft - Automation
  * MuleSoft - Automation - (Gold, Platinum, Titanium Edition)
  * MuleSoft - Automation for Salesforce
  * MuleSoft - Automation for Salesforce - (Gold, Platinum, Titanium Edition)
  * MuleSoft - Automation - Additional Credits (100)
  * MuleSoft - Automation - Additional Credits (100) - (Gold, Platinum, Titanium)

| MuleSoft Automation Credits 1.0  
## Create a Usage Report
Follow these steps to create a usage report in RPA Manager:
  1. Open the **Process Operations** module.
  2. Click **Usage Summary**.
  3. Specify the desired date range and click **Create Usage Summary**.
  4. Optionally, click **Print** () to print or download the report.


## Monthly Account Summary Emails
Salesforce sends usage-based billing reports to every MuleSoft RPA customer on the 10th of each month. By default, Salesforce sends these emails to the account’s billing contact.
For additional information about the reports, the list of recipients, and other details, see the Monthly Account Summary Email FAQ.
evalUrl | MuleSoft Documentation
# evalUrl
## evalUrl(url: String, readerInputs: Dictionary<ReaderInput> = {}, inputValues: Dictionary<Any> = {}, configuration: RuntimeExecutionConfiguration = {}): EvalResult
Evaluates the script at the specified URL.
_Experimental:_ This function is an experimental feature that is subject to change or removal from future versions of DataWeave.
### Parameters
Name | Description  
---|---  
Name of the file execute.  
`readerInputs` | Inputs to read and bind to the execution.  
`inputValues` | Inputs to bind directly to the execution.  
`configuration` | The runtime configuration.  
### Example
This example shows how `evalUrl` behaves with different inputs.
#### Source
```
%dw 2.0
import * from dw::Runtime
var jsonValue = {
 value: '{"name": "Mariano"}' as Binary {encoding: "UTF-8"},
 encoding: "UTF-8",
 properties: {},
 mimeType: "application/json"
}
var Utils = "fun sum(a,b) = a +b"
output application/json
---
{
 "execute_ok" : evalUrl("classpath://org/mule/weave/v2/engine/runtime_evalUrl/example.dwl", {"payload": jsonValue }),
 "execute_ok_withValue" : evalUrl("classpath://org/mule/weave/v2/engine/runtime_evalUrl/example.dwl", {}, {"payload": {name: "Mariano"}})
}
```

#### Output
```
{
  "execute_ok": {
   "success": true,
   "value": "Mariano",
   "logs": [
   ]
  },
  "execute_ok_withValue": {
   "success": true,
   "value": "Mariano",
   "logs": [
   ]
  }
 }
```
Runtime Manager Agent API | MuleSoft Documentation
# Runtime Manager Agent API
Private Cloud Edition 
The Runtime Manager agent API enables you to manage your on-premises Mule runtime engine directly using a REST API.
For the majority of use cases, you need only to install and configure the Runtime Manager agent. To use the Runtime Manager agent for more than managing the communication between Runtime Manager and on-premises Mule instances, use the Runtime Manager Agent API.
The Runtime Manager agent REST API enables you to programmatically access these functions of the agent:
  * Deploy Mule applications.
  * Deploy Mule domains.
  * Create a cluster of Mule servers.
  * Monitor JMX beans.
  * Configure system properties.
  * Configure log levels.
  * Configure Mule agent plugins, such as:
    * Event tracking
    * Splunk integration
    * ELK integration


For an interactive reference of all the operations that are supported through the API, see Runtime Manager Agent API on Exchange.
## See Also
  * Install or Update the Runtime Manager Agent
  *   * Runtime Manager Agent Notifications
Troubleshooting Cassandra Connector | MuleSoft Documentation
# Troubleshooting Cassandra Connector
To troubleshoot Apache Cassandra (Apache Cassandra Connector), become familiar with the information about enabling verbose logging and interpreting commonly thrown messages.
## Enable Verbose Logging
To get a better understanding of why an application’s interaction with Cassandra Connector is failing, temporarily enable verbose logging for the module.
Remember to always disable the enhanced verbosity after troubleshooting, because it affects your Mule application performance.
To enable verbose logging in the configuration file:
  1. Access Anypoint Studio and navigate to the **Package Explorer** view.
  2. Open your application’s project name.
  3. Open the `src/main/resources` path folder.
  4. Open the `log4j2.xml` file inside the folder.
  5. Add an `<AsyncLogger>` tag inside the `<Loggers>` tag:
```
			<Loggers>
				...
				<AsyncLogger name="org.mule.extension.cassandradb" level="DEBUG"/>
				<AsyncLogger name="org.apache.commons.cassandradb" level="DEBUG"/>
				...
			</Loggers>
```

  6. Save your application changes.
  7. Click the project name in **Package Explorer** and then click **Run** > **Run As** > **Mule Application**.


## Troubleshoot Prepared Statement Cache Size
If you receive the following warning message when running your Mule application:
WARN com.datastax.driver.core.Cluster [Test-Cluster-worker-23] Re-preparing already prepared query is generally an anti-pattern and will likely affect performance. Consider preparing the statement only once. ---
To avoid the previous message, increase the value of the **Prepared Statement Cache Size** parameter, which enables you to set the cache size for prepared statements. Set a value with at least the number of different statements that you handle in your Mule application.
## See Also
  * MuleSoft Help Center
  *
Approve or Reject Access Requests | MuleSoft Documentation
# Approve or Reject Access Requests
After users request access to your API instance from Anypoint Exchange, you can manually approve or reject requests from API Manager.
## Task Prerequisite
To manually approve or reject requests, you must have:
  * Configured the SLA tier for the application
  * The Organization Administrator, API Manager Environment Administrator, or the Manage Contracts permission


## Manually Approve Requests
To approve or reject requests to access your API:
  1. Navigate to **Anypoint Platform** > **API Manager**.
  2. In **API Administration** , click the name of the API instance to which you are requesting access.
  3. Click **Contracts**.
The request appears.
  4. Click either **Approve** or **Reject** to approve or reject the access request, respectively.


## See Also
  * Request Access to API Instances from Exchange
  * Remove API Instance Contracts
  * Obtain Client ID and Client Secret Credentials of a Client Application
arrayItem | MuleSoft Documentation
# arrayItem
## arrayItem(t: Type): Type
Returns the type of the given array. This function fails if the input is not an Array type.
_Introduced in DataWeave version 2.3.0._
### Parameters
Name | Description  
---|---  
The type to check.  
### Example
This example shows how `arrayItem` behaves with different inputs.
#### Source
```
%dw 2.0
import * from dw::core::Types
type ArrayOfString = Array<String>
type ArrayOfNumber = Array<Number>
type ArrayOfAny = Array<Any>
type ArrayOfAnyDefault = Array
output application/json
---
{
  a: arrayItem(ArrayOfString),
  b: arrayItem(ArrayOfNumber),
  c: arrayItem(ArrayOfAny),
  d: arrayItem(ArrayOfAnyDefault)
}
```

#### Output
```
{
 "a": "String",
 "b": "Number",
 "c": "Any",
 "d": "Any"
}
```
Configuring CloudHub 2.0 Deployment Settings | MuleSoft Documentation
# Configuring CloudHub 2.0 Deployment Settings
To configure settings for deploying Anypoint Partner Manager to CloudHub 2.0, access the business unit and environment for which you want to deploy Partner Manager and then follow these steps:
  1. From the Access Management **Configure a Partner Manager environment** window, enter these general settings:
Setting | Description | Default  
---|---|---  
Deployment Target Type | Target type for your Partner Manager deployment. Select **CloudHub 2.0**.  
Runtime Version | Mule runtime engine version to run Partner Manager applications. | 4.6.0 LTS using Java 8  
Min Mule Version override | Minimum Mule runtime version required to deploy the runtime applications. Configuring the Min Mule version enables you to apply a feature flagging mechanism for Partner Manager-deployed Mule runtime applications. If you process cXML messages with <DOCTYPE> tags, you must set the `minMuleVersion` to 4.5.0 or higher. If you’re migrating from an earlier version, you must perform end-to-end regression testing on your existing workflows before changing the `minMuleVersion`. |  None (Uses 4.3.0) |  If you select `None`, Partner Manager defaults to using `4.3.0` as the Min Mule version.   
---  
Deployment Target | Shared or private space to which you want to deploy Partner Manager runtime applications. You can change the deployment target after all active message flows are no longer deployed to an existing target. To change the region in these instances, undeploy the message flows, change the region, and then redeploy the message flows.  
  2. Select **Applications** and enter these application settings:
Setting | Description | Default  
---|---|---  
Each B2B endpoint |  Reserved CPU space, CPU space limit, and memory capacity for each Partner Manager endpoint application. Partner Manager deploys a generic Mule app to the runtime for each endpoint protocol and direction (receive or send) combination. |  Partner manager deploys each AS2 and HTTPS inbound endpoint configuration as a separate Mule application. You can reuse the same endpoint configuration across multiple partners and message types.   
---  
0.1 vCores  
B2B API Replication Service | Reserved CPU space, CPU space limit, and memory capacity for the B2B API Replication Service. | 0.2 vCores  
B2B Document Processing Service | Reserved CPU space, CPU space limit, and memory capacity for the B2B Document Processing Service. | 0.2 vCores  
For help with sizing, contact your MuleSoft Account Team.
  3. Click **Save**.


## See Also
Deploying Partner Manager Runtime Apps
Salesforce CDP - Additional Configuration Information | MuleSoft Documentation
# Salesforce CDP - Additional Configuration Information
Configure Anypoint Connector for Salesforce CDP (Salesforce CDP Connector) to generate an OAuth 2.0 keystore file.
## Generate a Keystore File
Salesforce CDP Connector uses the Bouncy Castle cryptographic library to load the certificate from the keystore and sign the payload for the authentication requests.
The library has a vulnerability (CVE-2018-5382) that relates to the BKS-V1 keystore file type. By default, Salesforce CDP Connector uses JKS or PKCS12 keystores. Avoid using BKS-V1 keystore files, as documented in the Bouncy Castle proposed solution.
To generate a JKS keystore file:
  1. Go to your Mule workspace and open the command prompt (for Windows) or Terminal (for Mac).
  2. Enter this command:
```
keytool -genkeypair -alias salesforce-cert -keyalg RSA -keystore salesforce-cert.jks
```

  3. Enter the following information:
     * Password for the keystore
     * Your first name and last name
     * Your organization unit
     * Your city and state, and the two-letter code for your country
The system generates a Java keystore file (JKS format) that contains a private or public key pair in your workspace.
  4. Provide the file path for the keystore in your connector configuration.
Enter this command:
```
keytool -exportcert -alias salesforce-cert -file salesforce-cert.crt -keystore salesforce-cert.jks
```

The system exports the public key from the keystore into the workspace. This is the public key to enter in your Salesforce instance.
  5. Verify that you have both the keystore (`salesforce-cert.jks`) and the public key (`salesforce-cert.crt`) files in your workspace.


## Next Step
After you complete configuring the connector, you can try the Examples.
## See Also
  * Introduction to Anypoint Connectors
  * MuleSoft Help Center
Email Connector 1.5 | MuleSoft Documentation
# Email Connector 1.5
Anypoint Connector for Email (Email Connector) sends and retrieves email messages over standard email protocols. Email Connector configurations share a basic set of parameters that require a connection over the protocols you use.
For compatibility information and fixed issues, see the Email Connector Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
  * Anypoint Connectors
  * Mule runtime engine (Mule)
  * Elements and global elements in a Mule flow
  * Creating a Mule app using Anypoint Studio (Studio)


Before creating an app, you must have access to Anypoint Platform and Anypoint Studio.
## Common Use Cases for the Connector
Email Connector enables you to:
  * Retrieve emails from POP3 mailboxes
  * Retrieve, delete, and store emails from IMAP mailboxes
  * Send emails over the SMTP protocol
  * Support secure connections for all protocols over Transport Layer Security (TLS)


For examples, see Examples.
## Audience
  * New users, read:
    * Using Anypoint Studio to Configure the Connector to create your Mule app
    * Examples, which provide one or more use cases for the connector
  * Advanced users, read:
    * XML and Maven Support
    * Examples, which provides one or more use cases for the connector
    * Troubleshooting Guide


## Next Step
After you complete the prerequisites and try the templates and examples, you are ready to create your own app and configure the connector using Anypoint Studio.
## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * MuleSoft Help Center
Add SLA Tiers to API Groups | MuleSoft Documentation
# Add SLA Tiers to API Groups
You can add multiple SLA tiers to an API Group instance.
To add an SLA tier:
  1. Navigate to **Anypoint Platform** > **API Manager**.
  2. Click **API Groups**.
  3. Expand the **API Group** list and click the API Group instance to which you want to add the SLA tier.
  4. Click **SLA Tiers** and then click **Add SLA tier** on the details page.
  5. Enter a name for the SLA tier, for example `Premium`.
  6. Optionally add a description.
  7. Select either **Manual** or **Automatic** for **Approval** method.
  8. Click **Continue**.
  9. At the top of the SLA tier details page, click the **Default** tab if you want the SLA tier to apply to API instances in the API Group instance.
Otherwise, click **Individual** to apply it to a specific API instance within the API Group instance.
You can copy an SLA tier of an API instance when creating an individual limit for that API instance in the API Group instance. You can modify the copied limit, if required:   
---  
  10. In the **# of Reqs** field, add the number of request that are allowed, for example, `100`.
  11. In the **Time Period** field, specify the amount of time, for example, `60`.
  12. In the **Time Unit** field, select the unit of time from the drop-down list, for example, `Second`.
  13. If you want to display the SLA tier with the contract, select the **Visible** check box.
  14. If you want to create additional SLA tiers, click **Add new limit**.
  15. Click **Save**.


## See Also
  * Remove SLA Tiers from API Groups
  * Manage Group Instance Contracts
Prerequisites for MuleSoft Accelerator for Retail | MuleSoft Documentation
# Prerequisites for MuleSoft Accelerator for Retail
This page provides a summary of the guides available for configuring the various systems and products required to implement the use cases provided by this solution. The individual systems needed, and amount of configuration required, depend on which assets are to be deployed in your target environment(s) - refer to the use case pages for more details.
## Available Guides
The following setup and configuration guides are available for this accelerator:
  * Accelerator Setup Guide
  *   * OFBiz Setup and Configuration
  * SAP S4HANA Setup Guide
  * SAP Custom BAPI Setup Guide
  * Salesforce Customization Guide
  * Salesforce Data Cloud Setup Guide


Most of the implementation templates also contain details on requirements specific to those applications.
## See Also
  *   * MuleSoft Accelerator for Retail
Sharing Data Between Policies | MuleSoft Documentation
# Sharing Data Between Policies
The `StreamProperties` injectable provides an interface to:
  * Consume properties set by other policies that are processing the same request.
  * Broadcast properties so that the other policies can consume them.


To share data, `StreamProperties` implements the `PropertyAccessor` trait:
```
pub trait PropertyAccessor {
  fn read_property(&self, path: &[&str]) -> Option<Bytes>;
  fn set_property(&self, path: &[&str], value: Option<&[u8]>);
}
```

The following example shows a simple filter that reads a property from the stream and then writes another parameter to it:
```
async fn request_filter(stream: StreamProperties) -> Flow<()> {
  let incoming = String::from_utf8(stream.read_property(&["incoming_property"]).unwrap_or_default()).unwrap_or_default();
  logger::info!("Recieved incoming prop {}", incoming);
  let outgoing = "outgoing".as_bytes();
  stream.set_property(&["outgoing_property"], Some(outgoing));
  Flow::Continue(())
}
#[entrypoint]
async fn configure(launcher: Launcher) -> Result<()> {
  let filter = on_request(|stream| request_filter(stream));
  launcher.launch(filter).await?;
  Ok(())
}
```

## See Also
  *
ServiceNow Connector 6.13 | MuleSoft Documentation
# ServiceNow Connector 6.13
Anypoint Connector for ServiceNow (ServiceNow Connector) provides connections between Mule runtime engine (Mule) and ServiceNow apps. Use the ServiceNow operations with the custom ServiceNow tables, along with any operations available through the installed plugins.
For compatibility information and fixed issues, see the ServiceNow Connector Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
  * Anypoint Connectors
  * Mule runtime engine (Mule)
  * Elements in a Mule flow and global elements
  * How to create a Mule app using Anypoint Studio


Before creating an app, you must have access to the ServiceNow target resource and Anypoint Platform.
## Common Use Cases for the Connector
Common use cases for ServiceNow Connector include:
  * **IT Service Management (ITSM)**
Sync ServiceNow data and extend IT service management (ITSM) capabilities to SaaS and on-premises applications, such as Salesforce, SAP, Workday, and Microsoft Dynamics 365, to help with data migration and replication, application integration, and consolidation. For example, you can bidirectionally sync workers data between Workday and ServiceNow or aggregate employees from Workday and users from ServiceNow into a CSV file.
  * **Integrated Business Processes**
Fully integrate business processes across HR, legal, procurement, operations, marketing, and facilities departments.
  * **Record Creation and Retrieval**
Transform enterprise IT by automating and managing IT service relationships to create a single system of records that you can retrieve.


For examples of these use cases, refer to ServiceNow Connector Examples.
## Audience
  * New users, read:
    * Using Anypoint Studio to Configure the Connector to create your Mule app
  * Advanced users, read:
    * XML and Maven Support
    * Examples, which provides one or more use cases for the connector


## Connection Types
The following authentication types are supported:
  * Basic
  * OAuth 2.0 Authorization Code


### Limitations
  * OAuth 2.0 Authorization Code authentication works only with the following versions of Mule:
    * 4.1.5
    * 4.2.1 and later
  * Metadata does not work with OAuth 2.0 Authorization Code authentication.


## Use Exchange Templates and Examples
Anypoint Exchange provides templates you can use as a starting point for your app, as well as examples that illustrate a complete solution.
  * Workday and ServiceNow Worker Bidirectional Sync
  * Workday Worker to ServiceNow Service Request Migration
  * Workday and ServiceNow Employee Aggregation
  * Workday to ServiceNow Service Worker Migration
  * Workday Worker to ServiceNow Service Request Broadcast


## Next Step
After you complete the prerequisites and experiment with templates and examples, you are ready to create an app with Anypoint Studio.
## See Also
  * Introduction to Anypoint Connectors
  * Use Anypoint Exchange to Discover Connectors, Templates, and Examples
  * ServiceNow Connector Release Notes
  * ServiceNow Connector on Exchange
  * MuleSoft Help Center
Creating a Custom Dashboard | MuleSoft Documentation
# Creating a Custom Dashboard
Create a custom dashboard to configure the metrics and data points you want to view.
To create a custom dashboard:
  1. In **Anypoint Monitoring** , click **Custom dashboards** from the sidebar.
  2. Click **+ New Dashboard**.
  3. Add and configure a chart for your dashboard.
  4. Click **Save Changes**.
  5. In the **Save as** dialog, enter a **New name** , and click **Save**.


## View a Custom Dashboard
You can view custom dashboards for apps deployed to CloudHub and to hybrid targets in **Custom dashboards**.
  1. In **Anypoint Monitoring** , click **Custom dashboards** in the sidebar to display custom dashboards.
  2. Use search to find the dashboard.
  3. In the custom dashboard list, click the dashboard.


## See Also
  * Configuring Custom Dashboards and Charts
  * Save a Built-in Dashboard as a Custom Dashboard
Redis Connector 5.2 | MuleSoft Documentation
# Redis Connector 5.2
Anypoint Connector for Remote Dictionary Server (Redis Connector) is an open source, in-memory data structure store used to cache user profiles, create leader boards, track real-time activities on a website, and filter spam. You can use Redis Connector as a message queue, custom object store, and more.
For compatibility information and fixed issues, Redis Connector Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
  * The Redis API
  * Anypoint Connectors
  * Mule runtime engine (Mule)
  * Elements in a Mule flow
  * Global elements
  * How to create a Mule app using Anypoint Studio


Before creating an app, you must have access to the Redis target resource.
## Audience
  * New user
To create your Mule app, see:
    * Using Anypoint Studio to Configure Redis Connector
    * Examples, which provides use cases for the connector
  * Advanced user
Read the following:
    * XML and Maven Support
    * Examples topics


## Next Step
After you complete the prerequisites and experiment with examples, you are ready to create an app and configure the connector using Anypoint Studio.
## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * Redis in Anypoint Exchange
  * Redis in EU Anypoint Exchange
  * MuleSoft Help Center
JSON Module | MuleSoft Documentation
# JSON Module
JSON Module v2.4
The JSON module provides extra functionality for processing JSON documents. Although DataWeave is the tool that Mule uses to access data in JSON documents, this module provides extra functionality that falls outside of DataWeave’s scope, like schema validation.
Release Notes: JSON Module Release Notes Exchange: JSON Module
## See Also
  * ValidateDocuments against a JSON Schema with the JSON Module
  * JSON Module Reference
  * MuleSoft Help Center
Migrating the For Each Scope | MuleSoft Documentation
# Migrating the For Each Scope
Little changed between For Each scope for Mule 3 and Mule 4 except for the use of DataWeave 2 as the expression language. This little change however has a huge impact in terms of usability of the component.
In Mule 3, foreach required the input collection to be a Java Iterable, Java Iterator or Java array. You were always forced to make sure that the input was in Java format (and therefore, you were forced to know java).
In Mule 4, we support iterating over any array-like structure, regardless of the format. For example, suppose the following JSON is posted through an HTTP request:
```
{
 persons: [
  {
   name: 'John Doe',
   age: 34
  },
  {
   name: 'Jane Doe',
   age: 32
  }
 ]
}
```

Mule 3 requires the json being transformed to Java first:
Mule 3 example
```
<flow name="persons">
 <http:listener path="person" method="POST" config-ref="http">
 <json:json-to-object-transformer />
 <foreach batchSize="10" collection="#[payload.persons]">
  <flow-ref name="processPerson" />
 </foreach>
</flow>
```

In Mule 4, you can just access the persons array in Json format directly:
Mule 4 example
```
<flow name="persons">
 <http:listener path="person" method="POST" config-ref="http">
 <foreach batchSize="10" collection="#[payload.persons]">
  <flow-ref name="processPerson" />
 </foreach>
</flow>
```

## See Also
  * Migrating Exception Strategies
  * Migrating from DataWeave 1.0 to 2.x
isArrayType | MuleSoft Documentation
# isArrayType
## isArrayType(path: Path): Boolean
Returns `true` if the provided `Path` value is an `ARRAY_TYPE` expression.
_Introduced in DataWeave version 2.4.0._
### Parameters
Name | Description  
---|---  
The `Path` value to validate.  
### Example
This example shows how `isArrayType` behaves with different inputs.
#### Source
```
%dw 2.0
import * from dw::util::Tree
output application/json
---
{
 a: isArrayType([{kind: OBJECT_TYPE, selector: "user", namespace: null},
         {kind: ATTRIBUTE_TYPE, selector: "name", namespace: null}]),
 b: isArrayType([{kind: OBJECT_TYPE, selector: "user", namespace: null},
         {kind: ARRAY_TYPE, selector: 0, namespace: null}]),
 c: isArrayType([{kind: ARRAY_TYPE, selector: 0, namespace: null}])
}
```

#### Output
```
{
 "a": false,
 "b": true,
 "c": true
}
```