BassemE/mulesoft-documentation-embeddings huggingface dataset:
Configuring Sentiment Operations | MuleSoft Documentation
# Configuring Sentiment Operations
## Configure the Sentiment Analyzer Operation
Use the **Sentiment analyzer** operation to send a simple prompt request to the configured LLM. This operation uses a plain text prompt as input and responds with a sentiment for the input text. The sentiment value can be NEUTRAL, POSITIVE, or NEGATIVE.
To configure the **Sentiment analyzer** operation:
  1. Select the operation on the Studio canvas.
  2. In the **General** properties section, enter plain text to analyze for its sentiment in the **Prompt** field.


This is the XML configuration for this operation:
```
<ms-aichain:sentiment-analyze
 doc:name="Sentiment analyze"
 doc:id="cad4ef27-5c85-47f7-a68c-f666809b0846"
 config-ref="MAC_AI_Llm_configuration"
 data="#[payload.inputText]"
/>
```

### Output Configuration
This operation responds with a JSON payload that contains the sentiment of the input text. Additionally, attributes such as token usage and sentiment details are included as part of the metadata (attributes) but not within the main payload.
This is an example response of the JSON payload:
```
{
  "response": "POSITIVE"
}
```

Along with the JSON payload, the operation returns attributes, which include information about token usage, for example:
```
{
 "tokenUsage": {
   "outputCount": 2,
   "totalCount": 39,
   "inputCount": 37
 },
 "additionalAttributes": {
   "isPositive": "false"
 }
}
```

## See Also
  * Using Anypoint Code Builder to Configure a Connector
  * Using Studio to Configure a Connector
  * MuleSoft AI Chain Connector Overview
  * MuleSoft AI Chain Connector Reference
  * MuleSoft Help Center
Text Java Properties Format | MuleSoft Documentation
# Text Java Properties Format
MIME type: `text/x-java-properties`
ID: `properties`
The Text Java Properties format parses any Java properties file. This format represents simple key-value pairs. DataWeave represents these pairs as an object with string values.
## Example: Represent a properties File in the DataWeave Format (dw)
This example shows how DataWeave represents a properties file.
### Input
The following `text/x-java-properties` data is from a properties file. The file contains key-value pairs that provide host and port values. This content serves as the input payload to the DataWeave script.
```
host=localhost
port=1234
```

### Source
The DataWeave script transforms the `text/x-java-properties` input payload to the DataWeave (dw) format and MIME type. It returns a string.
```
%dw 2.0
output application/dw
---
payload
```

### Output
The output is an object in the DataWeave (dw) format. The object contains a collection of key-value pairs that match the `text/x-java-properties` input. Notice that the output wraps the values in quotation marks.
```
{
  host: "localhost",
  port: "1234"
}
```

## Configuration Properties
DataWeave supports the following configuration properties for this format.
### Reader Properties
There are no reader properties for this format.
### Writer Properties
This format accepts properties that provide instructions for writing output data.
Parameter | Type | Default | Description  
---|---|---|---  
`bufferSize` |  Size of the buffer writer, in bytes. The value must be greater than `8`.  
Generates the output as a data stream when set to `true`, and defers the script’s execution until the generated content is consumed. Valid values are `true` or `false`.  
The encoding to use for the output, such as UTF-8.  
## Supported MIME Types
This format supports the following MIME types.
`*/x-java-properties`  
---  
`*/properties`
CloudHub Notifications on Runtime Manager | MuleSoft Documentation
# CloudHub Notifications on Runtime Manager
## Overview
**Notifications** are standard messages that appear in the Runtime Manager console to provide status information about your applications. You can access them via the bell icon on the top-right corner of the console. When you have new notifications, the bell turns red.
You can also set up email alerts that can be sent to any email address to warn whenever a certain event has occurred. Notifications are currently only produced by applications deployed to CloudHub, for applications deployed on-premises, you should use Alerts.   
---  
## Manage Notifications
Each notification has a priority level and a message associated with it. If the notification is associated with a specific application, the application name is also provided.
Click **Show All Notifications** to view all notifications including those that have already been read.
## Standard Notifications
For applications deployed to CloudHub, certain events that may occur to one of your applications automatically produces a notification:
Worker will restart |  A worker `<ip>` has become unresponsive. Restarting the worker.  
---|---  
Worker has restarted |  Restart SUCCEEDED for worker `<ip>`.  
Worker restart failed |  Restart FAILED for worker `<ip>`.  
Maximum Restarts attempted for a worker |  We’ve reached the maximum amount of restart attempts.  
Worker needs restarting, but restarts are disabled |  A worker `<ip>` has become unresponsive. Restarts are disabled.  
## Custom Notifications
On applications that are deployed to CloudHub, you can create custom notifications using the CloudHub connector that must exist in your application.
  1. Download the CloudHub connector from Anypoint Exchange.
  2. Place an instance of the CloudHub connector in one of your project’s flows, to be triggered when something meaningful happens.
  3. Configure the connector. In the **Operation** field select **Create Notification** and then set the **Domain** , **Message** and **Priority** for it.
You should now be receiving notifications.
  4. Optionally, set up email alerts to inform you when one of these custom events occurs. To set up email alerts, see Alerts on Runtime Manager. You must create an alert of type **Custom Notification Alert** that matches your custom notification.


See the tutorial.
## Notification Retention
Notifications are retained by Anypoint Platform within the bounds of the following limits, whatever happens first:
  * for 30 days
  * up to 1000 notifications per application


## See Also
  * Custom Application Alerts tutorial.
  * Manage Deployed Applications
  *   * CloudHub Overview
  * Develop Applications for CloudHub
  *   * Monitor Applications
  *   *   * Manage Application Data with Object Stores
  * Anypoint Platform Command-Line Interface
  * Secure Application Properties
  * Virtual Private Cloud
  * Penetration Testing Policies
Agentforce Connector 1.1 | MuleSoft Documentation
# Agentforce Connector 1.1
Agentforce Connector provides MuleSoft developers with the ability to seamlessly integrate with AI agents running in Salesforce’s Agentforce platform.
Agentforce Connector offers a group of capabilities that simplify agent integration in MuleSoft applications.
Use this connector to:
  * Build AI agents in a low-code environment.
  * Authenticate with a Salesforce org and discover active agents.
  * Start a new session with an AI agent application.
  * Extend the power of Agentforce by surfacing prompts from external applications to AI agents running in Salesforce.
  * Orchestrate new, innovative experiences for your customers, partners and employees.


For information about compatibility and fixed issues, see the Agentforce 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
  * How to create a Mule app using Anypoint Code Builder or Anypoint Studio


Before creating an app, you must have:
  * Java 8, 11, or 17
  * Apache Maven
  * Anypoint Platform
  * Credentials to connect with your Salesforce org
  * The latest versions of Anypoint Code Builder or Anypoint Studio


To configure the connector, you must create a Connected App in Salesforce. For more information, see Get Started with the Agent API .
## Common Use Cases for the Connector
These are some common use cases for the connector:
  * Customer Service
Increase human agents' productivity by having AI agents complete time-consuming tasks such as reviewing case history, analyzing reported issues, and looking up other related information.
  * Sales
Improve sales team efficacy by accelerating prospect research, generating customized collateral, and preparing contracts.
  * Marketing
Support marketing teams by drafting social media copy, executing market research, and completing campaign analysis.


## Next Step
After you complete the prerequisites, you are ready to create an app and configure the connector using Anypoint Studio or Anypoint Code Builder.
## See Also
  * Anypoint Connectors Overview
  * Using Anypoint Code Builder to Configure a Connector
  * Using Anypoint Studio to Configure a Connector
  * Agentforce Connector Reference
  * MuleSoft Help Center
Troubleshooting NFS Errors | MuleSoft Documentation
# Troubleshooting NFS Errors
Setting up and configuring an NFS server should be performed by your infrastructure team. If you experience problems with any of the following instructions, contact your infrastructure team for assistance.   
---  
You must have a connection from each node to NFS.
## “Server Not Responding”
Use a tool such as ping, traceroute, or tracepath to verify that the client and server machines can communicate with each other. If communication fails between the client and server machines, examine the network interface card (NIC) settings using either `ifconfig` or `ethtool` to verify the IP settings.
## “Access Denied” or "Permission Denied"
Check the export permissions for the NFS file system. You can do this from the client or from the server.
From the client:
`showmount -e server_name`
From the server:
`exportfs -a`
## "rpc mount export: RPC: Timed out"
The error message `Unable to access file system at [NFS SERVER]: rpc mount export: RPC: Timed out` is caused by a DNS name resolution issue. NFS (RPC) needs reverse name resolution. If the NFS server or client cannot resolve their name, this error occurs. Check the DNS configuration and the `/etc/hosts` configuration.
## Mounting the NFS Server Fails
If the mount fails, you are probably missing some NFS-required libraries. If this happens, install them by running: `yum install nfs-utils nfs-utils-lib`
### "mount failed: Not Permitted"
The error message `mount failed: exit status 32. Mounting command …​ not permitted` might occur when trying to mount using the `noresvport` option because the ports might be limited. If this happens, remove the `noresvport` option and add the `insecure` flag to the mount command.
## See Also
  * Verify NFS Server Communication
Rename File | MuleSoft Documentation
# Rename File
This action step renames a file. If the renamed file already exists in the destination folder, the workflow is interrupted with an error message.
## Properties
**File Operation Settings:**
  * **Directory path** Enter the path to the directory where the file to be renamed is located. You can specify an absolute or relative path. If a relative path is used, then the path relates to the Base Path variable.
  * **File Name** Enter the name here of the file that is to be renamed.
  * **New File Name** Here you enter he new name of the file to be renamed.


Other Properties that are the same in all action steps are described in the section on **Common Properties**. For reasons of clarity they are not shown here.
## Inbound Variables
**Directory path** Enter the path to the directory where the file to be renamed is located. You can specify an absolute or relative path. If a relative path is used, then the path relates to the Base Path variable.
**File Name** Enter the name here of the file that is to be renamed.
**New File Name** Here you enter he new name of the file to be renamed.
## Outbound Variables
**IsRenamed** The _Rename File.IsRenamed_ variable indicates whether the file could be renamed or not (True/False).
**New File Name** The _Rename File.New file Name_ provides the file’s new name.
**File name** The _Rename File.File Name_ variable provides the name of the file that is to be renamed.
**Directory path** The _Rename File.Directory Path_ variable provides the path that is used.
## Wizard
  * **Directory path** Specify the path to the file that is to be renamed. You can create an absolute path or a path relative to the _Base Path_. The initial value is %STWS_BASEPATH%. Select an existing path. You can also insert variables from the _Workflow_ in order to construct the path. To do so, click on the pin and select one of the available variables.


  * **File name** Enter the name of the file here that is to be renamed. You can also insert a variable from the Workflow as the _File Name_. To do so, click on the pin and select one of the available variables.
  * **New file name** Enter the new name for the file here. You can also insert a variable from the Workflow as the _New file name_. To do so, click on the pin and select one of the available variables.
Managing Public Portal Resources | MuleSoft Documentation
# Managing Public Portal Resources
You can upload up to 100 resources to a public portal. Each image is one resource. Attempting to add more will result in an error. You can delete resources to reduce the number and then add more up to the limit.
These examples show how to list, retrieve, and delete resources from a public portal with the Exchange Experience API.
## Authentication
Log in to Anypoint Platform and get an authentication token. Begin every request with the header `Authorization: bearer ACCESS_TOKEN`.
```
ACCESS_TOKEN=$(curl https://anypoint.mulesoft.com/accounts/login \
-XPOST -d "username=YOUR_USERNAME&password=YOUR_PASSWORD" | \
jq -r ".access_token")
```

## Using the API
To list all resources:
```
 curl https://anypoint.mulesoft.com/exchange/api/v2/portals/:organizationDomain/draft/resources \
 -H 'Authorization: bearer YOUR_ACCESS_TOKEN'
```

To get a specific resource:
```
 curl https://anypoint.mulesoft.com/exchange/api/v2/portals/:organizationDomain/draft/resources/:resourceId \
 -H 'Authorization: bearer YOUR_ACCESS_TOKEN'
```

To delete a specific resource:
```
 curl -X DELETE \
 https://anypoint.mulesoft.com/exchange/api/v2/portals/:organizationDomain/draft/resources/:resourceId \
 -H 'Authorization: bearer YOUR_ACCESS_TOKEN'
```

With:
```
organizationDomain: Your organization's domain
resourceId: The image file name.
```
A2A Prompt Decorator Policy | MuleSoft Documentation
# A2A Prompt Decorator Policy
**Policy Name** | A2A Prompt Decorator  
---|---  
Decorates prompts with context information  
**First Flex Gateway version available**  
**Returned Status Codes** | No return codes exist for this policy.  
This policy supports Agent2Agent Protocol (A2A) versions v0.2.3 and earlier. To learn more about A2A versions, see A2A Releases.   
---  
## Summary
The A2A Prompt Decorator policy injects additional content into provided prompts before they are sent to the upstream server. You can specify the content to inject either as a DataWeave string parameter or by referencing a file. Additionally, you can use a DataWeave expression to filter which requests should have prompts decorated.
## Configuring Policy Parameters
### Flex Gateway Local Mode
The A2A Prompt Decorator policy isn’t supported in Local Mode.
### Managed Flex Gateway and Flex Gateway Connected Mode
When you apply the policy to your API instance from the UI, the following parameters are displayed:
Element | Description  
---|---  
Text Decorators |  List of text decorations you want to add to the prompts.  
Prompt Text |  DataWeave Expression that generates the prompt text injected into the request. For example: `#['Use Imperial metric units']`.  
DataWeave Expression that filters which prompts to decorate. For example: `#[attributes.headers['id']==1]`.  
File Decorators |  List of file decorations to add to the prompts.  
DataWeave Expression that filters which prompts to decorate. For example: `#[attributes.headers['id']==1]`.  
DataWeave Expression with the File Name. For example: `#['Decorator name']`.  
File Mime Type |  DataWeave Expression with the Mime Type of the file to inject. For example: `#['application/json']`.  
File Source |  Select **Base64** if the file Content is base64-encoded data, or **Uri** if the file Content is a URL to an external file.  
DataWeave Expression containing either base64-encoded file content or a URL to download the content file. For example: #['https://domain/file-location'] or #['QmFzZTY0IGVuY29kZWQgZmlsZSBjb250ZW50'].
Upgrading and Migrating Java Module to Version 2.0 | MuleSoft Documentation
# Upgrading and Migrating Java Module to Version 2.0
Upgrade Java Module to version 2.x.
## Supported Upgrade Paths
From Version | To Version  
---|---  
## Changes in This Release
Java Module 2.0 includes these changes.
  * Java Module (and its dependencies) are now compilable and compatible only with Java 17.
  * To align with modern development practices and ensure continued compatibility with secure and supported libraries, Java Module is upgraded from Spring 5.x to the latest stable Spring 6.x version (Spring Framework 6.4.6).


## Upgrade Prerequisites
Before you perform the upgrade, you must create a backup of your files, data, and configurations in case you need to restore them.
## Upgrade Steps
Follow these steps to perform the upgrade:
  1. In Anypoint Studio, right-click the project and select **Manage Dependencies** > **Manage Modules**.
  2. Select `Java Module - Mule 4` and click **Update version**.
  3. Click **Apply and Close**.
  4. Verify that the Java Module dependency version is `2.0.0` in the `pom.xml` file in the Mule project.


Alternatively, you can manually update the Java Module dependency version in the `pom.xml` file in the Mule project, or simply add the updated module to the project.
### Verify the Upgrade
After you upgrade the connector, follow these steps to verify the upgrade:
  1. In Studio, verify that there are no errors in the **Problems** or **Console** views.
  2. Verify that there are no problems in the project `pom.xml` file.
  3. Test the connection to verify that the operations work.


## Troubleshoot
If there are problems with caching the parameters and caching the metadata, try restarting Anypoint Studio.
### Revert the Upgrade
If it is necessary to revert to the previous version of Java Module, change the Java Module dependency version `2.0.0` in the project’s `pom.xml` to the previous version.
You must update the project’s `pom.xml` in Anypoint Studio.
## See Also
  * Introduction to Anypoint Connectors
  * Java Module Reference
  * MuleSoft Help Center
API Functional Monitoring in Anypoint Monitoring | MuleSoft Documentation
# API Functional Monitoring in Anypoint Monitoring
API Functional Monitoring enables you to monitor responses to requests sent to API resources at their endpoints. You monitor APIs by accessing the **Functional Monitoring** section of Anypoint Monitoring, which you select from the home page of Anypoint Platform.
The **Functional Monitoring** section contains tools for creating and editing monitors. Additionally, you can upload custom test suites written in BAT, a Behavior Driven Development (BDD) language.
The following image illustrates the components of a monitor:
A monitor includes a test and one or more schedules for running tests.
A monitor test includes the following:
  * The endpoints to verify
  * Optional assertions to verify at the endpoints (for example, a 200 status code)
  * Optional HTTP headers to include when sending requests to the endpoints
  * Optional tools, such as SumoLogic and Slack, used to send test reports


A monitor test schedule includes the following:
  * The location from which to run the test
Locations can be public or private. For details, see Monitoring the Endpoints of Public APIs and Monitoring the Endpoints of Private APIs.
  * The time interval between tests


The Functional Monitoring page with a monitor selected is shown in the following image:
Duration of the test for the selected monitor.  
---  
Daily average response time in milliseconds of all tests to all endpoints. The colors in each bar indicate the breakdown of the average time for each of the steps in a test. Hover over the bar to see the breakdown details.  
Schedule information, including when the next run is scheduled, the schedule interval, and information about the location where the tests are scheduled to run.  
Details about the previous execution, including the method executed and the assertions.  
A summary list of the last few executions.  
Option to add schedules to the selected monitor.  
The bar graph shows the daily average response time in milliseconds of all tests to all endpoints. The colors in each bar indicate the average time for each of the steps in a test. Hover over the bar to see the details.
## See Also
  *   *
Google Calendar Connector 1.1 | MuleSoft Documentation
# Google Calendar Connector 1.1
Anypoint Connector for Google Calendar (Google Calendar Connector) synchronizes data and automates business processes between Google Calendar and third-party applications, either on-premises or in the cloud.
Google Calendar is a calendar and task planning application that focusses on enhancing personal and team productivity. Using Google Calendar, individuals can easily schedule tasks and meetings. They can also share events with colleagues through an easy-to-use calendar interface.
For compatibility information and fixed issues, see the Google Calendar Connector Release Notes.
## Before You Begin
To use this connector, you should be familiar with:
  * The Google Calendar API
  * 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:
  * Credentials to access Google Calendar
  * Anypoint Studio version 4.2.1 or later


## Common Use Cases for the Connectors
Common use cases for Google Calendar Connector include the following:
  * Improve scheduling efficiency


Remove the manual effort of scheduling events that are part of established processes. For example, you can create a 15-minute triage meeting automatically whenever a high-severity customer issue is received.
  * Enhance employee productivity


Sync event details, such as customer calls, from external systems like Trello, Asana, and other task planning apps into Google Calendar so that individuals have all of their scheduled engagements in one place.
  * Streamline collaboration


Integrate your team calendar with your team channel on messaging systems like Slack and Teams so that anytime you schedule a new event on your team calendar, your team receives a notification.
## Authentication Types
Google Calendar Connector uses the OAuth 2.0 authentication type, which uses access tokens provided by the authorization server to get access to protected data.
## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * MuleSoft Help Center
date | MuleSoft Documentation
# date
## date(parts: DateFactory): Date
Creates a `Date` value from values specified for `year`, `month`, and `day` fields.
_Introduced in DataWeave version 2.4.0._
### Parameters
Name | Description  
---|---  
`Number` values for `year`, `month`, and `day` fields. The `month` must be a value between 1 and 12, and the `day` value must be between 1 and 31. You can specify the name-value pairs in any order, but the output is ordered by default as a Date value, such as `2012-10-11`. The input fields are parts of a `DateFactory` type.  
### Example
This example shows how to create a value of type `Date`.
#### Source
```
%dw 2.0
import * from dw::core::Dates
output application/json
---
{
  newDate: date({year: 2012, month: 10, day: 11})
}
```

#### Output
```
{
  "newDate": "2012-10-11"
}
```
Salesforce Composite Connector 2.7 | MuleSoft Documentation
# Salesforce Composite Connector 2.7
Anypoint Connector for Salesforce Composite enables you to work with the Salesforce Batch and SObject Tree APIs. The connector exposes convenient methods for preparing subordinate requests, executing them in one batch, and parsing the results.
Salesforce Composite Connector also enables you to create SObject trees using the **Create sobject tree** operation, which is separate from the batch operations.
This connector provides DataSense for execution and to:
  * Prepare subordinate requests and then parse the responses
  * Create SObject trees


For compatibility information and fixed issues, see the Salesforce Composite Connector Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
  * The Salesforce Composite API
  * 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:
  * Credentials to access the Salesforce Composite target resource
  * Anypoint Studio version 7.0 or later


## Authentication Types
Salesforce Composite Connector connections use the following authentication types:
  * OAuth v2.0
  * OAuth JWT
  * OAuth SAML
  * OAuth Username and Password


For information about configuring these authentication types, see Using Anypoint Studio to Configure Salesforce Composite Connector
## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * MuleSoft Help Center
Aggregators Module Examples | MuleSoft Documentation
# Aggregators Module Examples
To fully benefit from using Aggregators Module, see the following examples of configuring the module scopes, source, and fields:
  * Configure Size-Based Aggregator Scope Configure the **Size based aggregator** scope to aggregate elements until a predefined size number of elements completes the aggregation.
  * Configure Time-Based Aggregator Scope Configure the **Time based aggregator** scope to aggregate elements within a predefined time limit.
  * Configure Group-Based Aggregator Scope Configure the **Group based aggregator** scope to aggregate elements into groups by group ID.
  * Configure Size-Based Aggregator Timeout and Max Size Fields Configure the **Timeout** and **Max size** fields for the **Size based aggregator** scope to understand the timeout behavior of the aggregator.
  * Aggregators Module Multiple Examples Configuration Configure the **Size based aggregator** and **Group based aggregator** scopes to aggregate elements and then process them in batch.


## See Also
  * Introduction to Anypoint Connectors
  * MuleSoft Help Center
JMS Connector XML and Maven Support | MuleSoft Documentation
# JMS Connector XML and Maven Support
Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio.
If you manually code a Mule runtime engine (Mule) app in XML, either from the Anypoint Studio XML editor or from a text editor, you can get access to the connector in your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file.
When you add the connector in Studio, Studio automatically populates the XML code with the connector’s namespace and schema location. It also adds a dependency to the `pom.xml` file.
## Add a Namespace for the Connector
Paste the following code inside the `<mule>` tag of the header of your configuration XML:
```
http://www.mulesoft.org/schema/mule/jms
http://www.mulesoft.org/schema/mule/jms/current/mule-jms.xsd
```

This example shows how the namespace statements are placed in the `<mule>` XML block:
```
<mule xmlns:jms="http://www.mulesoft.org/schema/mule/jms"
	xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
	xmlns:http="http://www.mulesoft.org/schema/mule/http"
	xmlns:file="http://www.mulesoft.org/schema/mule/file"
	xmlns="http://www.mulesoft.org/schema/mule/core"
	xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core
	http://www.mulesoft.org/schema/mule/core/current/mule.xsd
	http://www.mulesoft.org/schema/mule/file
	http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd
	http://www.mulesoft.org/schema/mule/http
	http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
	http://www.mulesoft.org/schema/mule/ee/core
	http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd
	http://www.mulesoft.org/schema/mule/jms
	http://www.mulesoft.org/schema/mule/jms/current/mule-jms.xsd">
```

## Add a POM File Dependency
The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app. If you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector:
```
<dependency>
 <groupId>org.mule.connectors</groupId>
 <artifactId>mule-jms-connector</artifactId>
 <version>x.x.x</version>
 <classifier>mule-plugin</classifier>
</dependency>
```

Replace `x.x.x` with the version that corresponds to the connector you are using.
To obtain the most up-to-date `pom.xml` file information:
  1. Go to Anypoint Exchange.
  2. In Exchange, click **Login** and supply your Anypoint Platform username and password.
  3. In Exchange, search for `jms`.
  4. Select the connector.
  5. Click **Dependency Snippets** near the upper right of the screen.


## See Also
  * Introduction to Anypoint Connectors
  * MuleSoft Help Center
Virtual Private Cloud | MuleSoft Documentation
# Virtual Private Cloud
The Anypoint Virtual Private Cloud (VPC) offering allows you to create a virtual, private, and isolated network segment in the cloud to host your CloudHub workers.
Connecting to your Anypoint VPC extends your corporate network and allows CloudHub workers to access resources behind your corporate firewall. You can connect on-premises data centers through a secured VPN tunnel or a transit gateway attachment, or connect a private AWS VPC to your Anypoint VPC through VPC peering or AWS Direct Connect.
The base Anypoint VPC subscription includes two Anypoint VPCs and each Anypoint VPC can be associated with multiple environments. This allows you, for example, to have one isolated network for your production environment, and another for your non-productions environments, for example, QA and staging. Your licensing requirements depend on your specific deployment scenario.
Anypoint VPC supports different Amazon regions. During setup, you need to specify which Amazon region you want. You can even have multiple Anypoint VPCs inside a single Amazon region.
Each Anypoint VPC allows you to configure firewall rules to apply to your workers. You can choose to expose or block your custom ports and even block requests to your apps coming from CloudHub’s shared load balancer.
If you use dedicated load balancers, you can configure one or more dedicated load balancers to validate requests using your own SSL certificates, and to map input URLs to call to different CloudHub applications.
Combining firewall rules and dedicated load balancers configurations, enables you to fine tune how external services reach your applications.
## See Also
  * Anypoint VPC Network Architecture
  * Provision an Anypoint VPC
  * CloudHub Dedicated Load Balancer
  * Anypoint VPC Firewall Rules
  * CloudHub Architecture
unionItems | MuleSoft Documentation
# unionItems
## unionItems(t: Type): Array<Type>
Returns an array of all the types that define a given Union type. This function fails if the input is not a Union type.
_Introduced in DataWeave version 2.3.0._
### Parameters
Name | Description  
---|---  
The type to check.  
### Example
This example shows how `unionItems` behaves with different inputs.
#### Source
```
%dw 2.0
import * from dw::core::Types
type AType = String | Number
output application/json
---
{
  a: unionItems(AType)
}
```

#### Output
```
{
 "a": ["String","Number"]
}
```
Operate Your API Community | MuleSoft Documentation
# Operate Your API Community
These pages explain how to publish APIs and content to your Anypoint API Community Manager community and how to manage forums, members, and support cases.
In an API Community, APIs and API documentation are published from Anypoint Exchange, and articles are published from the Salesforce content management system (CMS).
API documentation in Exchange includes detailed descriptions of each API version. This documentation is updated with the API release cycle, usually with close involvement from the development team.
Salesforce CMS articles include event, marketing, and vision information. These articles typically have their own release cycle and process, usually with close involvement from the marketing team.
All of these actions are performed in the API Community Manager control panel:
To open the API Community Manager control panel at any time, open the Salesforce **App Launcher** and select **API Community Manager**.
## Community Operations
  *   * Configure API Visibility
  * Publish Content and CMS Articles
  *   * Manage Client Applications and Contracts
  *
Migrating the Security Filters | MuleSoft Documentation
# Migrating the Security Filters
Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.  
---  
In Mule 3, the Security Filters where part of the Mule Module Security. In Mule 4, this where migrated to the Mule Validation Module.
## IP filters
In mule 3 we had three different options to filter by IP: * `<filters:filter-by-ip>` * `<filters:filter-by-ip-range>` * `<filters:filter-by-ip-range-cidr>`
### Filtering By one IP
Example: Filtering by one IP in Mule 3
```
<filters:filter-by-ip regex="127.0.0.1"/>
```

This will filter those IPs that matches the regex. In mule4:
Example: Filtering by one IP in Mule 4
```
<validation:is-blacklisted-ip blacklist="iplist" ip="#[vars.ip]">
<validation:ip-filter-list>
	<validation:ips>
		<validation:ip value="127.0.0.1"/>
	</validation:ips>
</validation:ip-filter-list>
```

Where is necessary to set that `ip` variable (or whichever variable suits).
### Filtering by range of IPs
In mule 3, we had two ways of defining subnet mask to filter with:
Example: Filtering by IP range in Mule 3
```
<filters:filter-by-ip-range net="127.0.0.1" mask="255.255.255.0"/>
<!-- or -->
<filters:filter-by-ip-range-cidr cidr="127.0.0.1/24"/>
```

Both are replaced by:
Example: Filtering by IP range in Mule 4
```
<validation:is-blacklisted-ip blacklist="iplist" ip="#[vars.ip]">
<validation:ip-filter-list>
	<validation:ips>
		<validation:ip value="127.0.0.1/24"/>
	</validation:ips>
</validation:ip-filter-list>
```

Where is necessary to set that `ip` variable (or whichever variable suits).
  1. _Are there other similar validations added in mule 4?_
Yes, there is also a WhiteList validation, which only allows IPs from a IP Filter List.


## Time Expiration Filters
In mule 3 we could filter the message if it had elapsed some defined time from a starting date. For example:
Example: Filtering by elapsed time in Mule 3
```
<filters:filter-expired dateTime="#[vars.startingTime]" expiresIn="1000"/>
```

In Mule 4, this validation is in the validations module:
Example: Filtering by elapsed time in Mule 4
```
<validation:is-not-elapsed time="1" timeUnit="SECONDS" since="#[vars.startingTime]"/>
```

  1. _Are there other similar validations added in mule 4?_
Yes, there is also a Time Elapsed validation, which validates if the time elapsed has exceeded a certain amount of time.


## See Also
Validation Connector Technical Reference
Apply a Policy | MuleSoft Documentation
# Apply a Policy
For Mule Gateway, you apply included policies via **API Manager**. The following steps demonstrate this.
You can apply a policy either to the entire API (default) or to specific methods and resources of an API.
To apply a policy for Mule Gateway, a Mule application must first be deployed with an HTTP-based or HTTPS-based flow that is linked to the API through autodiscovery.  
---  
To apply a policy:
  1. Go to **Anypoint Platform > API Manager**.
  2. In **API Administration** click the name of the API to which to apply a policy.
  3. From the left navigation menu, click **Policies**.
  4. Click **+ Add policy**.
  5. Select the policy to apply.
  6. Configure the required configuration parameters.
For policy configuration parameters, see Included Policies Directory.
  7. Click **Apply**
Remove Objects Containing Specified Key-Value Pairs | MuleSoft Documentation
# Remove Objects Containing Specified Key-Value Pairs
This DataWeave example removes all objects that contain a set of key-value pairs from an array of objects.
This example uses the following functions:
  * `filter` iterates over the objects within the input array to return an array with the objects that return `true` as the result of an expression. Each object in the input array contains a set of key-value pairs. The expression uses the `contains` function and the `not` operator.
  * `contains` identifies the key-value pairs specified in the `dropThese` variable. This variable is an array of objects containing the key-value pairs to remove.
`not` negates the result of the `contains` function to make `filter` remove the key-value pairs identified in `dropThese` from the final output. (Without `not`, the result is an array of objects containing only the _undesired_ key-value pairs.)


DataWeave Script:
```
%dw 2.0
var dropThese = [
{"type" : "secondary", "space" : "rgb"},
{"type" : "primary", "space" : "cmyk"}
]
output application/json
---
payload filter (not (dropThese contains {"type": $."type", "space": $."space"}))
```

Input JSON Payload:
```
[
  {"sequence": "1", "color": "red", "type": "primary", "space": "rgb"},
  {"sequence": "2", "color": "green", "type": "primary", "space": "rgb"},
  {"sequence": "3", "color": "blue", "type": "primary", "space": "rgb"},
  {"sequence": "4", "color": "yellow", "type": "secondary", "space": "rgb"},
  {"sequence": "5", "color": "magenta", "type": "secondary", "space": "rgb"},
  {"sequence": "6", "color": "cyan", "type": "secondary", "space": "rgb"},
  {"sequence": "7", "color": "cyan", "type": "primary", "space": "cmyk"},
  {"sequence": "8", "color": "magenta", "type": "primary", "space": "cmyk"},
  {"sequence": "9", "color": "yellow", "type": "primary", "space": "cmyk"},
  {"sequence": "10", "color": "red", "type": "secondary", "space": "cmyk"},
  {"sequence": "11", "color": "green", "type": "secondary", "space": "cmyk"},
  {"sequence": "12", "color": "blue", "type": "secondary", "space": "cmyk"}
]
```

Output JSON:
```
[
 {
  "sequence": "1",
  "color": "red",
  "type": "primary",
  "space": "rgb"
 },
 {
  "sequence": "2",
  "color": "green",
  "type": "primary",
  "space": "rgb"
 },
 {
  "sequence": "3",
  "color": "blue",
  "type": "primary",
  "space": "rgb"
 },
 {
  "sequence": "10",
  "color": "red",
  "type": "secondary",
  "space": "cmyk"
 },
 {
  "sequence": "11",
  "color": "green",
  "type": "secondary",
  "space": "cmyk"
 },
 {
  "sequence": "12",
  "color": "blue",
  "type": "secondary",
  "space": "cmyk"
 }
]
```

## See Also
  * DataWeave Selectors
  *
Updating Nodes | MuleSoft Documentation
# Updating Nodes
Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.  
---  
## Before You Begin
  * Set up and test the backup procedure on all clusters.
  * Perform a backup before attempting node maintenance to preserve data in the event of a failure.


## Update Nodes for Clusters
See the following topics for details on each provider:
  * Rancher Kubernetes Engine (RKE2) OS Upgrade Process
  * OpenShift: Starting with version 4.16, the Machine Config Operator manages the node’s OS updates as part of the cluster update process. For more on node updates and the Machine Config Operator, see:
    *     *     * Machine Config Operator Functionality


## See Also
  * Managing Anypoint Platform PCE
isStringType | MuleSoft Documentation
# isStringType
## isStringType(t: Type): Boolean
Returns `true` if the input is the String type.
_Introduced in DataWeave version 2.3.0._
### Parameters
Name | Description  
---|---  
The type to check.  
### Example
This example shows how `isStringType` behaves with different inputs.
#### Source
```
%dw 2.0
import * from dw::core::Types
type AString = String
output application/json
---
{
  a: isStringType(AString),
  b: isStringType(String),
  c: isStringType(Boolean),
}
```

#### Output
```
{
 "a": true,
 "b": true,
 "c": false
}
```
Asana Connector 1.0 | MuleSoft Documentation
# Asana Connector 1.0
Anypoint Connector for Asana (Asana Connector) synchronizes data and automates business processes between Asana and third-party applications, either on-premises or in the cloud.
Asana is a SaaS project management tool that enhances team collaboration. Employees can easily manage projects and tasks through one integrated collaborative project management interface when using Asana.
For compatibility information and fixed issues, see the Asana Connector Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
  * The Asana APIs
  * 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:
  * Credentials to access the target resource
  * Anypoint Studio version 7.3.5 or later


## Common Use Cases for the Connector
Automate powerful business processes by integrating Asana with other IT tools and systems in your enterprise such as messaging, calendar, and issue triaging systems. Possible uses include:
  * Improve cross-team communication by automating a workflow where users get notified (via a messaging system such as Slack) anytime a task or comment is created in Asana.
  * Enhance sales collaboration by automating the lead tracking and nurturing process where any time a new lead or opportunity is created in your CRM system (such as Salesforce), a task is created and assigned to a user via your Asana dashboard for triaging and tracking.
  * Help teams stay organized by integrating the team’s calendar with an Asana workspace so that anytime a new team event is created, it gets posted to the Asana workspace.


## Authentication Types
Asana Connector connections use the following authentication methods:
  * OAuth 2.0
  * Unsecure connection provider


## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  *   * MuleSoft Help Center
Removing Offline Custom Policies | MuleSoft Documentation
# Removing Offline Custom Policies
To remove an offline policy, you need to delete the JSON file you created in the offline-policies directory. Deleting the automatically created folder in the policies directory does _not_ remove the offline policy.
## See Also
  * Applying Offline Custom Policies
Upload an API Specification Created Outside of API Designer | MuleSoft Documentation
# Upload an API Specification Created Outside of API Designer
You cannot publish an API specification to Anypoint Exchange without going through API Designer. If you want to publish a specification that you have already authored outside of API Designer, you must create an API-specification project in API Designer, import your specification, and then publish to Anypoint Exchange.
File uploads are restricted to supported formats.   
---  
## Before You Begin
Within Anypoint Platform, your user ID must be assigned the Design Center Developer permission.
## Procedure
  1. Open Design Center from the homepage of Anypoint Platform.
  2. Create an API-specification project that you can work in.
    1. On the **Projects** page in Design Center, click **Create** and then click **New API Specification**.
    2. In the **New API Specification** dialog, name your project. You can change the name later, if you want to.
    3. Select **I’m comfortable designing it on my own**.
    4. In the **Specification Language** field, select the language in which your API specification is written.
    5. Click **Create API**. + **Result** : Design Center creates an API-specification project. In that project are two files:
       * A default, blank specification that has the same name as the project.
You can delete this file in a later step. Currently, it is set as the root file of the project, and it is not possible to delete a file that is set as the root file.
       * A file named `exchange.json` that includes metadata that is required for Anypoint Exchange.
This file is read-only.
  3. Import your API specification.
    1. Click the gear icon in the top-right corner of the text editor and select **Import**.
    2. In the **Import** dialog, select **File or Zip**.
    3. Browse to your file or ZIP file and select it. + **Result:** The file or files are listed in the left pane of the editor. If you imported a ZIP file that contains files that are in a folder structure, the folder structure is represented in the pane.
  4. Set the root file of the project by right-clicking the specification and selecting **Set as root file**.
  5. Delete the blank specification that API Designer created by default.


## What To Do Next
Publish the API-specification project to Anypoint Exchange. See Publish an API Specification.
## See Also
Map and Flatten an Array | MuleSoft Documentation
# Map and Flatten an Array
The `flatMap` function calls `map` on an input and wraps the results in a call to `flatten`.
The `flatMap` function is useful for refactoring uses of `flatten` on the results of a call to `map`. For example, review the following DataWeave script:
DataWeave Script:
```
%dw 2.0
output application/json
var myData = [{name:1},{name:2},{name:3}]
fun myExternalFunction(data): Array =
  if(data.name == 1)
    []
  else if(data.name == 2)
    [{name: 3}, {name:5}]
  else
    [data]
---
//flatten(myData map ((item, index) -> myExternalFunction(item)))
myData flatMap ((item, index) -> myExternalFunction(item))
```

The header of the script creates a variable `myData` to define an array of objects, each with the key `name`. It also defines a function with a set of if-else statements that act on name-value pairs with the key `name`.
The body of the DataWeave script contains the following expressions, each of which produces the same result:
  * `flatten(myData map ((item, index) → myExternalFunction(item)))`
  * `myData flatMap ((item, index) → myExternalFunction(item))`


Whether you use the `flatMap` expression or explicitly use `flatten` to wrap the `map` expression, the following takes place:
  1. The expression maps the items in the input array according to if-else conditions in the function `myExternalFunction()`, which is defined in the header.
The mapping produces the following output:
```
[
 [
 ],
 [
  { "name": 3 },
  { "name": 5 }
 ],
 [
  { "name": 3 }
 ]
]
```

  2. The expression flattens the mapped results by consolidating the elements from the subarrays into a single array, removing the parent array and eliminating the empty child array.
Flattening produces the following output:
Output JSON:
```
[
 {
  "name": 3
 },
 {
  "name": 5
 },
 {
  "name": 3
 }
]
```



## See Also