BassemE/mulesoft-documentation-embeddings huggingface dataset:
Install and Configure | MuleSoft Documentation
# Install and Configure
Anypoint API Community Manager is composed of a Salesforce organization with Experience Cloud and a managed package that is installed in this organization. The managed package contains the components and data objects that interact with your Anypoint Platform organization. The usage of data objects in the managed package may change or deprecate without notice.
An instance of API Community Manager connects to only one Anypoint Platform organization. The Anypoint user can connect to one or more instances of API Community Manager, possibly including sandbox instances and instances in other Salesforce organizations.
The API Community Manager package is installed in a Salesforce organization that is independent of any other Salesforce organizations that your company might already have, so that the API community data is isolated from your company operational data, such as ERP or CRM data.
The Salesforce organization with Experience Cloud is provisioned through and included in the Anypoint API Community Manager license from MuleSoft. You don’t need to procure this Salesforce organization separately, and you cannot reuse existing Salesforce licenses for API Community Manager. Find more information about API Community Manager licenses in the Licensing Overview section.
Installing, updating, or configuring API Community Manager must be done by a user account with the **System Administrator** profile in the API Community Manager Salesforce organization.   
---  
If your Anypoint Platform organization is hosted in the EU region you must replace all occurrences of the `anypoint.mulesoft.com` domain with `eu1.anypoint.mulesoft.com` in all the steps in this section.   
---  
The following sections guide you through installing and configuring API Community Manager:
  * Installation Prerequisites
  * Install API Community Manager Package
  *   *   * Configure the Platform Cache
  * Create a Community
  * Verify the Installation
  * Optionally Configure Search in CMS Content
  * Optionally Configure Branded Emails
  * MuleSoft Government Cloud Data Control
Mule API Analytics | MuleSoft Documentation
# Mule API Analytics
**Mule API Analytics** does not support Flex Gateway APIs. For Flex Gateway Analytics, see Viewing Key Metrics in API Manager for Flex Gateway in Connected Mode.   
---  
Mule API Analytics can provide insight into how your Mule APIs are being used and how they are performing. From API Manager, you can access the Mule API Analytics dashboard, create a custom dashboard, create and manage charts, and create reports. From API Manager, you can get following types of analytics:
  * API viewing analytics
  * API events analytics
  * Charted metrics in API Manager


You can view data from a policy perspective in the Mule API Analytics dashboard, Mule API Analytics chart, or API Manager by including policy violations. This action tracks traffic rejected, or not rejected, by a policy.
The **Mule API Analytics** tab is visible only to users who have `Read API` permission. Charts are visible for users who have `View Analytics` permission.
API Analytics isn’t available on Hyperforce deployments.   
---  
## See Also
  * Reviewing Analytics usage
  * Reviewing API Manager Analytics charts usage
  * Reviewing Analytics Event API
  * Reviewing Analytics Event Forwarding
Database Connector 1.14 | MuleSoft Documentation
# Database Connector 1.14
Anypoint Connector for Database (Database Connector) establishes communication between your Mule app and a relational database. Database Connector can connect to almost any Java Database Connectivity (JDBC) relational database and run SQL operations. An application can support multi-tenant scenarios using the same configuration element, changing the connection attributes based on, for example, information coming from each request.
Database Connector has connection providers that automatically set the driver class name and create JDBC URLs with given parameters for the following databases:
  * Derby
  * Microsoft SQL Server
  * MySQL
  * Oracle


You can set up other JDBC databases using a generic JDBC configuration. Database Connector is JDBC compliant. Ensure that for the connection configuration, you use a driver that is compliant with JDBC to avoid compatibility issues. Additionally, you can reference a JDBC `DataSource` object or an `XADataSource` object, which is required for XA transactions, by creating the object in Anypoint Studio using Spring.
## 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 the database target resource, Anypoint Platform, and have downloaded the proper database driver for your database.
## Common Use Cases for the Connector
Database Connector enables you to:
  * Perform predefined queries, dynamically constructed queries, and template queries that are self-sufficient and customizable.
  * Specify DataWeave expressions in connector fields and configure attributes dynamically, depending on the database configuration you use.
  * Use a source listener operation to read from a database in the data source section of a flow.
  * Execute other operations to read and write to a database anywhere in the process section.
  * Perform multiple SQL requests in a single bulk update.
  * Make Data Definition Language (DDL) requests that alter the data structure rather than the data itself.
  * Execute stored procedures and SQL scripts.


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 provide one or more use cases for the connector


## Using Exchange Templates and Examples
Anypoint Exchange provides templates that you can use as starting points for your apps and examples that illustrate a complete solution.
  * Database Connector Examples
  * Database Connector Templates


## 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
Configuring Firewall Rules to Manage Traffic to and from a Private Space | MuleSoft Documentation
# Configuring Firewall Rules to Manage Traffic to and from a Private Space
By default, all traffic to your private space is blocked unless it is explicitly allowed in a firewall rule.
Creating a private space automatically creates these firewall rules:
  * Two rules to allow inbound connections from any host:
    * HTTPS: port 443
    * HTTP: port 80
  * Two rules to allow outbound connections from within your private space to any host:
    * TCP: All ports
    * HTTPS: 443


You can also configure inbound firewall rules that use TCP as the protocol.
To support Anypoint MQ, API Manager, and ObjectStore v2, you must allow outbound traffic on port 443 (HTTPS).
## Configure Firewall Rules
  1. From Anypoint Platform, select **Runtime Manager** > **Private Spaces**.
  2. Click the name of the private space to manage.
  3. Click the **Firewall rules** tab.
  4. Configure default rules for inbound traffic by selecting the **Protocol** and **Source** from the drop-down lists: 

Protocol
    
Protocol type: 

Source
    
Source IP address:
     * **Anywhere (0.0.0.0/0)**
     * **Local private network**
This option is available only if a private network exists in the private space. 

Ports
    
Ports for inbound traffic are not configurable:
     * Port 80 is reserved HTTP.
     * Port 443 is reserved for HTTPS.
     * Other ports below 1024 are not allowed. Ports 1024 and above are allowed for plain TCP connections, but not for additional HTTP/HTTPS ingress endpoints.
  5. Configure default rules for outbound traffic by selecting the **Protocol** and **Destination** from the drop-down lists: 

Protocol
    
Protocol type: 

Destination
    
Destination IP address:
     * **Anywhere (0.0.0.0/0)**
     * **Local private network**
This option is available only if a private network exists in the private space. 

Ports
    
Port ranges for outbound traffic are configurable.
  6. Click **Add rule** to add more rules.
  7. To remove a firewall rule, click the trash can icon (**Delete**) for the entry.
  8. Click **Save Changes** or **Discard changes**.


You can’t configure duplicate firewall rules. If you attempt to do so, an error shows prompting you to delete any duplicated firewall rules.   
---
Assert That Event Processor | MuleSoft Documentation
# Assert That Event Processor
Anypoint Code Builder 
Anypoint Studio 
The Assert That event processor allows you to run assertions to validate the state of a Mule event’s content. You can use the Assert That processor to validate the Mule event after the production code runs.
The Assert That processor uses a set of DataWeave functions called `MUnit matchers` to define the assertion conditions for any value in an expression.
For example, to assert that a payload is equal to a certain value, configure the Assert That processor using the `equalTo()` matcher.
```
<munit-tools:assert-that
 expression="#[payload]"
 is="#[MunitTools::equalTo('example')]"
 message="The payload should be ‘example’"/>
```

Or you can also check if the payload is null using the `nullValue()` matcher.
```
<munit-tools:assert-that
 expression="#[payload]"
 is="#[MunitTools::nullValue()]"
 message="The payload should be null"/>
```

See MUnit Matchers for more information.
If these assertion fails, the processor throws a `java.lang.AssertionError`.
## See Also
  *
Verify the Installation | MuleSoft Documentation
# Verify the Installation
To verify your installation and configuration:
  1. Open the Salesforce App Launcher.
  2. Use the search bar to find and open **API Community Manager Diagnostics**.
  3. Check the information about your Salesforce organization in the **Organization** section.
    1. Confirm that **Package Version** shows the version of your currently installed API Community Manager package.
    2. Confirm that **Connectivity with Anypoint** shows the URL your API community uses to access Anypoint Platform and a green check.
If **Connectivity with Anypoint** does not show the URL and a green check, perform the prerequisite steps and then repeat the installation.
    3. Confirm that **Cache** shows that the cache is configured.
If **Cache** shows that the cache is not configured, configure the platform cache.
  4. Check the information about each of your communities in the **ACM Communities** section.
Each community shows **Community status** , whether the community is **Public** , the **Published assets status** , and options to open the community or open the community builder. If some of your communities are not public, or some of your communities are not yet implemented, then this information is visible here.
If your list of communities is empty, create a community.
  5. Open a community and verify that the API console is rendered correctly.
    1. Add any of your Exchange APIs to your community.
    2. In the Community Builder preview mode, navigate to the console.
    3. Verify that the console is rendered correctly for your API.


If any of these checks is not successful, refer to the Troubleshooting section.
Installing OData V4 Tooling | MuleSoft Documentation
# Installing OData V4 Tooling
To install the APIkit for OData v4 plugin in Anypoint Studio:
  1. Select **Help** > **Install New Software** and then click **Add**.
  2. In **Name** , type `APIkit for ODATA v4 Update Site`.
  3. In **Location** , type the URL of the site: `https://studio.mulesoft.org/s4/apikit-for-odata4/`.
  4. Select **Anypoint ODATA Plugin** and then click **Next**.
  5. Accept the terms and conditions of the product and click **Finish**.
  6. Restart Studio to complete the installation.


## See Also
  * Building, Implementing, and Testing an OData V4 API
location | MuleSoft Documentation
# location
## location(value: Any): Location
Returns the location of a given value, or `null` if the location can’t be traced back to a DataWeave file.
_Introduced in DataWeave version 2.4.0._
### Parameters
Name | Description  
---|---  
A value of any type.  
### Example
This example returns the location that defines the function `sqrt` in the `dw::Core` module.
#### Source
```
%dw 2.0
import location from dw::Runtime
output application/json
---
location(sqrt)
```

#### Output
```
{
 "uri": "/dw/Core.dwl",
 "nameIdentifier": "dw::Core",
 "startLine": 5797,
 "startColumn": 36,
 "endLine": 5797,
 "endColumn": 77
}
```
Distributed File Polling | MuleSoft Documentation
# Distributed File Polling
**_Enterprise Edition_**
Some connectors, such as the File connector or FTP connector, poll directories and read certain files as they are created in the directories polled. These files can reside on a remote file system, including file systems of nodes belonging to a Mule High Availability (HA) Cluster.
In Mule 4, distributed file polling makes it possible to poll files in all cluster nodes. Enabled by default, this feature is used by the following connectors:
  *   *   * 

You can configure connectors to only poll from the primary node, `@PrimaryNodeOnly`, which ignores the default setting set by the Mule runtime engine. This feature is only available in Mule 4.x
## See Also
  * Creating and Managing a Cluster Manually
  * Mule High Availability (HA) Cluster
  * Migrating File Connector
  * Migrating FTP and SFTP Connectors
Zendesk Connector 1.0 | MuleSoft Documentation
# Zendesk Connector 1.0
Anypoint Connector for Zendesk enables you to connect to the Zendesk Support API.
For information about compatibility and fixed issues, see the Zendesk Connector Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
  * The Zendesk Connector’s API
  * Anypoint Connectors
  * Mule runtime engine (Mule)
  * Elements and global elements in a Mule flow
  * How to create a Mule app using Anypoint Studio


Before creating an app, you must have access to:
  * The Zendesk target resource
  * Anypoint Platform
  * Anypoint Studio version 4.2.1 or later


## Common Use Cases For the Connector
Common use cases for Zendesk Connector include the following:
  * Integrating Salesforce with Zendesk to automate actions
For example:
    * Keep your organization data in Zendesk in sync with your account data in Salesforce, and avoid deduplication on either side.
    * Sync data between your case data in Salesforce with your ticket data in Zendesk.
    * Sync contact data in Salesforce with your user data in Zendesk. When a new user is created or updated in Zendesk, a corresponding record is created or updated in Salesforce.
  * Communicating with Slack
Send case data from Zendesk as a message in Slack to drive effective collaboration and resolution.


## Authentication Types
Zendesk connections can use the following authentication types:
  * Basic authentication
Uses an email address and password for authentication
  * API token
Uses your email address with an API token for authentication
  * OAuth2
Delegates user authentication to the service hosting the user account


## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * MuleSoft Help Center
Mule OAuth 2.0 Access Token | MuleSoft Documentation
# Mule OAuth 2.0 Access Token
To secure an API in Anypoint Platform using OAuth, using one of the following policies and the matching OAuth provider is recommended.
  * OpenAM OAuth Token Enforcement policy
  * PingFederate OAuth Token Enforcement policy
  * OpenID Connect Access Token Enforcement Policy


You need to set up an OpenAM, PingFederate, or Dynamic Client Registration-compliant identity provider to use a recommended policy. If for some reason, you cannot use a recommended provider, use OAuth 2.0 Access Token Enforcement Using External Provider Policy. You must then use a Mule Provider.
None of the token enforcement policies work with a Mule client app to access OAuth 2.0-protected resources outside Anypoint Platform. Instead, configure the Anypoint Connector for HTTP (HTTP Connector) for this purpose.
An authorization enforcement policy, which you apply to an API in Anypoint Platform, connects to an OpenAM authorization server, PingFederate authorization server, OpenID Connect Token Introspection endpoint, or custom OAuth 2.0 provider.
**Important:** To use the OAuth 2.0 Access Token Enforcement Using External Provider policy, you need a Mule OAuth 2.0 provider to provide an access token. You _cannot use_ any other OAuth 2.0 provider, such as Facebook, Google, or Azure.
Like other API Manager-enforced policies, the API needs to be registered in API Manager to apply and use any OAuth 2.0 access token policy.
## Prerequisites
  * You are an Anypoint Platform organization administrator or have permission to create or manage APIs in an environment.
  * You set up your Anypoint Platform organization as a federated organization using either OpenAM, OpenID Connect, or PingFederate. See link below. Alternatively, you have a Mule OAuth 2.0 provider configured and running.


## See Also
  * Configure HTTP Request Authentication
  *   * OpenAM OAuth Token Enforcement
  * About Client Management for federated users and OpenID Connect introspection endpoint
Math (dw::util::Math) | MuleSoft Documentation
# Math (dw::util::Math)
A utility module that provides mathematical functions.
To use this module, you must import it to your DataWeave code, for example, by adding the line `import * from dw::util::Math` to the header of your DataWeave script.
_Introduced in DataWeave version 2.4.0._
## Functions
Name | Description  
---|---  
Returns an arc cosine value that can range from `0.0` through pi.  
Returns an arc sine value that can range from `-pi/2` through `pi/2`.  
Returns an arc tangent value that can range from `-pi/2` through `pi/2`.  
Returns the trigonometric cosine of an angle from a given number of radians.  
Returns the logarithm base 10 of a number.  
Returns the natural logarithm (base `e`) of a number.  
Returns the trigonometric sine of an angle from a given number of radians.  
Returns the trigonometric tangent of an angle from a given number of radians.  
Converts an angle measured in radians to an approximately equivalent number of degrees.  
Converts a given number of degrees in an angle to an approximately equivalent number of radians.  
## Variables
  *
Flex Gateway Release Notes | MuleSoft Documentation
# Flex Gateway Release Notes
Anypoint Flex Gateway is an Envoy-based, ultrafast lightweight API gateway designed to manage and secure APIs running anywhere. Built to seamlessly integrate with DevOps and CI/CD workflows, Flex Gateway delivers the performance required for the most demanding applications and microservices while providing enterprise security and manageability across any environment.
The following release notes are provided for Flex Gateway:
  * Anypoint Flex Gateway Release Notes


## See Also
  * Flex Gateway Overview
Configuring Ingress in Runtime Fabric | MuleSoft Documentation
# Configuring Ingress in Runtime Fabric
To configure ingress in Runtime Fabric, review these topics:
  * Configuring Ingress Resource Template in Runtime Fabric
  * Configuring Ingress with HTTP Route Template Custom Resource In Runtime Fabric
  * Configuring Ingress Endpoints for Mule App Deployment
Backend Server Response Time | MuleSoft Documentation
# Backend Server Response Time
To troubleshoot performance issues, first determine whether flow performance is heavily constrained by the latency of the remote hosts to which the flow connects.
Failure to acknowledge the performance overhead added to a flow by the underlying complexities of the communication between the application and a remote host might mislead your optimization efforts and result in negligible improvement.
Therefore, it is important that, before you begin any optimization in the Mule app, you first characterize the backend servers' average latency and throughput to determine if this is what is limiting your application’s scalability or performance.
Some of the factors to consider are:
  * Average size of the payload exchanged between the app and the remote host
  * Network latency because of the application and remote host physical location Check if these are in the same network, same geographical region, same country, or the other side of the world.
  * Remote host response time.


The throughput and response time of your application can improve if the remote host is located within the same network boundaries as the application. However, if the remote host is outside of your application’s local network, you may experience an increased latency which will be directly proportional to the remote host response time, regardless of the payload size.
Other factors that affect application throughput include external dependencies, concurrency, flow complexity, deployment characteristics, and machine configuration.
lastIndexOf | MuleSoft Documentation
# lastIndexOf
## lastIndexOf(array: Array, value: Any): Number
Returns the index of the _last_ occurrence of the specified element in a given array or `-1` if the array does not contain the element.
_Introduced in DataWeave version 2.4.0._
### Parameters
Name | Description  
---|---  
The array of elements to search.  
The value to search.  
### Example
This example shows how `indexOf` behaves given different inputs.
#### Source
```
%dw 2.0
output application/json
---
{
 present: ["a","b","c","d"] lastIndexOf "c",
 notPresent: ["x","w","x"] lastIndexOf "c",
 presentMoreThanOnce: ["a","b","c","c"] lastIndexOf "c",
}
```

#### Output
```
{
 "present": 2,
 "notPresent": -1,
 "presentMoreThanOnce": 3
}
```

## lastIndexOf(array: String, value: String): Number
Takes a string as input and returns the index of the _last_ occurrence of a given search string within the input. The function returns `-1` if the search string is not present in the input.
_Introduced in DataWeave version 2.4.0._
### Parameters
Name | Description  
---|---  
The string to search.  
A string value to search for within the input string.  
### Example
This example shows how the `indexOf` behaves given different inputs.
#### Source
```
%dw 2.0
output application/json
---
{
 present: "abcd" lastIndexOf "c",
 notPresent: "xyz" lastIndexOf "c",
 presentMoreThanOnce: "abcdc" lastIndexOf "c",
}
```

#### Output
```
{
 "present": 2,
 "notPresent": -1,
 "presentMoreThanOnce": 4
}
```

## lastIndexOf(array: Null, value: Any): Number
Helper function that enables `lastIndexOf` to work with a `null` value.
_Introduced in DataWeave version 2.4.0._
Math Operations | MuleSoft Documentation
# Math Operations
You can use this action step to perform mathematical calculations. You can enter a formula with fixed values or add values using mapped variables. The result can be reused in the course of the workflow.
The following mathematical operations are available:
  * Addition
  * Subtraction
  * Multiplication
  * Division
  * Absolute value
  * Maximum value
  * Minimum value
  * Exponentiation
  * Round value


## Properties
**Calculate Expression Result as** Here, you can specify whether the result should be calculated and displayed as a whole number (integer) or as a number with decimals (floating point/double-precision floating point).
**Math Expression** The formula entered is shown here.
## Inbound Variables
**Math Expression** Here, you can enter a formula with fixed values (for example (42+84)/3), or insert variables via _Insert Available Variables_ for use in performing the mathematical operations (for example, ({a}+{b})/{c}).
## Outbound Variables
**ResultAsFloat** The result is displayed as a floating-point value.
**ResultAsInt** The result is displayed as a whole number (integer).
## Wizard
Enter the formula in the _Math Expression_ text field. Clicking _Insert Mathematical Operation_ opens a drop-down list with all available mathematical operations.
Under _Insert Available Variables,_ you will find all variables previously added using the Pin button.
Up to ten variables can be mapped. These are displayed in the Wizard and can be selected for the calculation.
You can enter test values in the _Test Values_ field to test whether or not the formula is valid. Then click the _Test_ button. If the formula is valid, the result will be displayed. Otherwise, an error message will appear. The values of the mapped variables are not important until the production run of the workflow.
If you want to output the result as a floating-point value, select _Calculate Expression Result as Floating-Point Value_ ; if you want to display the result as a whole number, select _Calculate Expression as Integer Value_.
Please note that implied multiplication also applies when you enter the _Math Expression_ and you must put in the parentheses yourself.
Amazon Kinesis Data Streams Connector 1.0 XML and Maven Support | MuleSoft Documentation
# Amazon Kinesis Data Streams Connector 1.0 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 access the connector from 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 and 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/amazon-kinesis
http://www.mulesoft.org/schema/mule/amazon-kinesis/current/mule-amazon-kinesis.xsd
```

This example shows how the namespace and schema statements are placed in the XML:
```
<mule xmlns:kinesis="http://www.mulesoft.org/schema/mule/kinesis"
	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/kinesis>
	http://www.mulesoft.org/schema/mule/kinesis/current/mule-kinesis.xsd".
```

## Add a POM File Dependency
The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app. When you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector:
```
<dependency>
 <groupId>com.mulesoft.connectors</groupId>
 <artifactId>amazon-kinesis-data-streams-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 `amazon kinesis`.
  4. Select the connector.
  5. Click **Dependency Snippets** near the upper right of the screen.


## Next Step
After completing your namespace and `pom.xml` file, you can try the Examples, which provides one or more use cases for the connector.
## See Also
  * Introduction to Anypoint Connectors
  * MuleSoft Help Center
Editing, Enabling, or Disabling API Alerts | MuleSoft Documentation
# Editing, Enabling, or Disabling API Alerts
When creating an alert, you can select if the alert will be enabled or disabled. You can also edit an existing alert and enable or disable the alert.
  1. Navigate to **Anypoint Platform** > **API Manager**..
  2. In **API Administration** , click the API instance whose alert you want to edit.
  3. Click **Alerts**.
  4. Click the **Edit** button on the alert you want to edit.


## See Also
  * Reviewing Alerts concepts
  * Testing an API Alert
MuleSoft Accelerator for Life Sciences | MuleSoft Documentation
# MuleSoft Accelerator for Life Sciences
The MuleSoft Accelerator for Life Sciences helps pharmaceuticals, medical device companies, and contract research organizations (CROs) seamlessly integrate their digital operations and get their products to market faster. The expertly designed foundational assets for this accelerator are tailored to propel an organization’s top integration and business initiatives so that its IT teams can spend more time innovating and less time building solutions from the ground up.
## Use Cases
The MuleSoft Accelerator for Life Sciences supports these use cases:
  * Clinical trial analytics - Run more intelligent, data-driven trials with pre-built assets that surface relevant study and stakeholder information from Veeva. Easily consolidate this information into data lakes for analysis in business intelligence platforms like Tableau.
  * Site payment modernization - Streamline the clinical trial site payment process by integrating relevant study data from CTMS systems, like Veeva, to generate and transmit payments to sites.


## Other Related Solutions
For solutions related to healthcare, the MuleSoft Accelerator for Healthcare helps organizations enable interoperability, simplify EHR connectivity, and power Patient 360 initiatives.
## References
The following are links to related and supporting documentation:
  * Veeva Vault Developer Guide
  * Vault CDMS Rest API Guide


## See Also
  *   *   *   * MuleSoft Accelerator for Life Sciences on Exchange
Add a Product License Using Ops Center | MuleSoft Documentation
# Add a Product License Using Ops Center
When your product license expires, Ops Center displays a message stating that the system is under maintenance. It continues to display this message until you add a valid license.
To add a new Anypoint Platform Private Cloud Edition license in Ops Center:
  1. Sign into Ops Center.
  2. Select the **Admin** tab.
  3. Under **License** , add your new license in the text area.
  4. Select **Update License**.


## See Also
Confluent Schema Registry Connector | MuleSoft Documentation
# Confluent Schema Registry Connector
Anypoint Connector for Confluent Schema Registry (Confluent Schema Registry Connector) enables interaction with Confluent’s Schema Registry to save and retrieve avro schemas to reduce the size of an avro message while it transports through the network.
For information about compatibility and fixed issues, see the Confluent Schema Registry Connector Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
  * The Confluent Schema Registry Connector’s API
  * Anypoint Connectors
  * Mule runtime engine (Mule)
  * Elements and global elements in a Mule flow
  * How to create a Mule app using Anypoint Studio


Before creating an app, you must have:
  * Credentials to access the Confluent Schema Registry target resource
  * Anypoint Platform
  * Anypoint Studio version 7.3.5 or later


## Common Use Cases For the Connector
Some possible uses for this connector include:
  * Send an avro message to a Kafka broker.
  * Consume an avro message with a schema ID.
  * Send a schema to Confluent Schema Registry using authentication.


## Connection Types
Confluent Schema Registry connections use the following authentication types:
  * Basic auth Basic HTTP authentication supported by the API.
  * Unsecured Unauthenticated.


For information about configuring authentication types, see Using Anypoint Studio to Configure Confluent Schema Registry Connector.
## 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
  * Confluent Schema Registry Connector Reference
  * MuleSoft Help Center
isAlpha | MuleSoft Documentation
# isAlpha
## isAlpha(text: String): Boolean
Checks if the `text` contains only Unicode digits. A decimal point is not a Unicode digit and returns `false`.
Note that the method does not allow for a leading sign, either positive or negative.
_Introduced in DataWeave version 2.2.0._
### Parameters
Name | Description  
---|---  
The input string.  
### Example
This example shows how `isAlpha` behaves with different inputs and sizes.
#### Source
```
%dw 2.0
import isAlpha from dw::core::Strings
output application/json
---
{
 "a": isAlpha(null),
 "b": isAlpha(""),
 "c": isAlpha(" "),
 "d": isAlpha("abc"),
 "e": isAlpha("ab2c"),
 "f": isAlpha("ab-c")
}
```

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

## isAlpha(text: Null): Boolean
Helper function that enables `isAlpha` to work with a `null` value.
_Introduced in DataWeave version 2.2.0._
Network | MuleSoft Documentation
# Network
Network action steps enable you to perform network operations as sending pings, making REST calls or perform checks using the FTP and HTTP protocols.
  * This action step is used for sending a ping to a computer or network device.
  * You can use the REST Call action step to fetch data directly from a server and to collect the required information in a simple way.
  * The Service Check plug-in allows you to perform checks using various protocols and services, such as Ping, FTP, HTTP, etc., to see if a service is running and available on a particular server.
Obtaining the Config and Connection in a Message Source | MuleSoft Documentation
# Obtaining the Config and Connection in a Message Source
## Obtaining the Config Object
Just like operations, a source might reference a configuration to obtain parameters about its behavior. To obtain such a configuration, a field must be annotated with the `@Config` annotation (the same used in operation arguments):
```
public class HttpListener extends Source<InputStream, HttpRequestAttributes> {
 @Config
 private HttpListenerConfig config;
}
```

## Obtaining a Connection
If the source requires a connection (and 99% of connectors do unless you are implementing a Scheduler), you need to obtain a connection. As with operations, the `@Connection` annotation is used but with two major differences:
  * It is used in a field instead of a method argument.
  * Instead of the connection object, a `ConnectionProvider` is injected.


```
public class HttpListener extends Source<InputStream, HttpRequestAttributes> {
  @Config
  private HttpListenerConfig config;
  @Connection
  private ConnectionProvider<HttpServer> serverProvider;
  @Parameter
  @Optional(defaultValue = "/")
  private String path;
  private HttpServer httpServer;
  @Override
  public void onStart(SourceCallback<InputStream, HttpRequestAttributes> sourceCallback) throws MuleException {
    httpServer = serverProvider.connect(); **(1)**
    httpServer.listen(path).onRequest(request -> { **(2)**
      processRequest(request, sourceCallback); **(3)**
    });
  }
  @Override
  public void onStop() {
    if (httpServer != null) { **(4)**
      serverProvider.disconnect(httpServer); **(5)**
    }
  }
}
```

The example uses the `ConnectionProvider` to obtain an `HttpServer`. The typical connection provider has already configured the server with the proper host and port.  
---  
HTTP requests are pushed into the server by the remote clients, and the `HttpServer` component notifies the source of every request. The source then uses the `SourceCallback` to push the message into the flow.  
The source should define the `processRequest` method to transform the HTTP request into a message that can be pushed to the flow. The documentation will show how to do that later, but to keep the example simple, you can assume that this works.  
The `onStop()` method releases resources, in this case, the `HttpServer`. It checks for null in case the `onStart()` method fails before the server is created.  
The example uses the `disconnect()` method of the `ConnectionProvider` to release the server.  
The example above is pseudocode. It oversimplifies the real HTTP connector to keep the example clear and concise.   
---  
## Next Step
  * Pushing Messages to a Flow from a Message Source
Azure Event Hubs Connector 1.2 | MuleSoft Documentation
# Azure Event Hubs Connector 1.2
Support Category: Select
Anypoint Connector for Azure Event Hubs (Azure Event Hubs Connector) enables support for event producing and consuming.
Azure Event Hubs is a big data streaming platform and event ingestion service. It can receive and process millions of events per second. Data sent to an event hub can be transformed and stored by using any real-time analytics provider or batching/storage adapters.
For information about compatibility and fixed issues, refer to the Azure Event Hubs Connector Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
  * Azure Event Hubs
  * Anypoint Connectors
  * Mule runtime engine (Mule)
  * Elements and global elements in a Mule flow
  * How to create a Mule app using Anypoint Studio


Before creating an app, you must have:
  * Credentials to access the Azure Event Hubs target resource
  * Anypoint Platform
  * Anypoint Studio version 7.3.5 or later


## Common Use Cases for the Connector
Some common use cases for Azure Event Hubs Connector include:
  * Sending an event
  * Sending an event to a specific partition
  * Sending a batch of events
  * Listening to events on Event Hubs
  * Listening to events on a specific partition


## Connection Types
Azure Event Hubs Connector uses the SAS authentication and Active Directory authentication type.
## Security
To get secured authentication to Azure Event Hubs, review the following recommendations:
  * Use Java to send events to or receive events from Azure Event Hubs
  * Authorizing access to Event Hubs resources using Shared Access Signatures
  * Passwordless connections for Azure services


## 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
  * Azure Event Hubs Messaging Connector Reference
  * MuleSoft Help Center
failIf | MuleSoft Documentation
# failIf
## failIf<T>(value: T, evaluator: (value: T) -> Boolean, message: String = 'Failed'): T
Produces an error with the specified message if the expression in the evaluator returns `true`. Otherwise, the function returns the value.
### Parameters
Name | Description  
---|---  
The value to return only if the `evaluator` expression is `false`.  
`evaluator` | Expression that returns `true` or `false`.  
### Example
This example produces a runtime error (instead of a SUCCESS message) because the expression `isEmpty(result)` is `true`. It is `true` because an empty object is passed through variable `result`.
#### Source
```
%dw 2.0
import failIf from dw::Runtime
var result = {}
output application/json
---
{ "result" : "SUCCESS" failIf (isEmpty(result)) }
```

#### Output
```
ERROR 2018-07-29 11:56:39,988 ...
**********************************
Message        : "Failed
```

Alternatively, the function outputs the value.
#### Source
```
%dw 2.0
import failIf from dw::Runtime
var result = {"a":"test"}
output application/json
---
{ "result" : result failIf isEmpty($) }
```

#### Output
```
{
 "result": {
  "a": "test"
 }
}
```
Tuning Recommendations | MuleSoft Documentation
# Tuning Recommendations
Mule 4 provides self-tuning execution, which adjusts itself for optimal performance according to the underlying operating conditions of the environment where you deploy Mule runtime engine (Mule). Self-tuning allows you to focus on the specifics of your application rather than Mule internals, which eases the optimization process. Additionally, Mule comes to you already tuned for optimal performance for most common use cases, and changing any parameter is advised against unless you fully understand the implications of doing so.
There are tuning recommendations that you can apply at the application level and benefit your specific use case.
## Repeatable vs Non-repeatable Streaming
Understand which streaming strategy results in the best flow performance for your use case:
  * A repeatable stream (read payload more than once)
  * A non-repeatable stream (read payload only once)


See Repeatable vs Non-repeatable Streaming for details.
## Back-Pressure and MaxConcurrency
Understand back-pressure and learn how to use the `maxConcurrency` parameter to tune the number of concurrent messages sent to your flow.
See Back-Pressure and MaxConcurrency for details.
## Backend Server Response Time
Understand if the average latency and throughput of backend servers is limiting the scalability or performance of your application.
See Backend Server Response Time for details.
## Caching
Understand when to use cache and which cache-strategy to follow, based on key aspects of your data. Mule offers some customizable mechanisms, such as Cache Scope and the HTTP Caching API Gateway policy, to enable cache according to your needs.
See Caching for details.
## Pooling Profiles
Pooling components helps process simultaneous incoming requests. Understand how to add `pooling-profile` to connectors when performance tests show that it is necessary.
See Pooling Profiles for details.
## Domains
Using domains provides a central repository for all the shared resources, facilitating the class-loading process. Domains enhance performance when you deploy multiple services on the same on-premises instance of Mule runtime engine.
See Domains for details.
## Logging
Understand why asynchronous logging performs better than synchronous logging.
See Logging for details.
## Batch Processing
Mule can process messages in batches, but batch processing requires having enough available memory to process the threads in parallel, which means moving the records from persistent storage into RAM in a fixed-size block. Understand how to configure the batch block size property for your application.
See Batch Processing for details.
## Application Design Best Practices
Following certain practices at the design phase helps you to achieve better performance for your Mule apps.
See Application Design for details.
## See Also
  * Performance Tuning Guide
Avoid Changing the AMQP Topography | MuleSoft Documentation
# Avoid Changing the AMQP Topography
You can set the `createFallbackExchange` and `createFallbackQueue` global config properties so that the declaration of AMQP exchanges and queues is disabled. These parameters have been added for those scenarios where it must be guaranteed that no changes to the AMQP topography will be attempted. In those cases, both the declaration of queues and exchanges which do not previously exist will result in an `AMQP:CREATION_NOT_ALLOWED` error.
For example, in the following flow:
```
<amqp:config name="Amqp_Config" createFallbackExchange="false" >
	<amqp:connection host="localhost" username="guest" password="guest" />
</amqp:config>

<flow name="mule-no-create-fallback-queue">
	<http:listener
		doc:name="Listener"
		config-ref="HTTP_Listener_config"
		path="/"/>
	<amqp:publish
		doc:name="Publish"
		config-ref="Amqp_Config"
		exchangeName="newExchange">
		<amqp:fallback-exchange-definition />
	</amqp:publish>
</flow>
```

If the `newExchange` exchange does not exist and the `createFallbackExchange` is set to `false`, an invocation of the publish operation causes an `AMQP:CREATION_NOT_ALLOWED` error. Notice that the `createFallbackExchange` can be overridden at the operation level and it can get an expression as a value. For example:
```
<flow name="mule-no-create-fallback-queue">
	<http:listener doc:name="Listener"config-ref="HTTP_Listener_config" path="/"/>
	<amqp:publish
		doc:name="Publish"
		config-ref="Amqp_Config"
		exchangeName="newExchange"
		createFallbackExchange="false">
		<amqp:fallback-exchange-definition />
	</amqp:publish>
</flow>
```

The use of `createFallbackQueue` parameter in a consume operation is analogous:
```
<amqp:config
	name="Amqp_Config"
	createFallbackQueue="false" >
	<amqp:connection
		host="localhost"
		username="guest"
		password="guest" />
</amqp:config>

<flow name="mule-no-create-fallback-queue">
	<http:listener
		doc:name="Listener"
		config-ref="HTTP_Listener_config"
		path="/"/>
	<amqp:consume
		config-ref="Amqp_Config"
		queueName="testQueue">
		<amqp:fallback-queue-definition
			removalStrategy="SHUTDOWN"
			exchangeToBind="exchangeToBindToQueue" />
	</amqp:consume>
</flow>
```

You can also use this parameter in the listener:
```
<amqp:config
	name="Amqp_Config"
	createFallbackQueue="false" >
	<amqp:connection
		host="localhost"
		username="guest"
		password="guest" />
</amqp:config>

<flow name="mule-no-create-fallback-queue">
	<amqp:listener
		config-ref="Amqp_Config"
		queueName="testQueue">
		<amqp:fallback-queue-definition
			removalStrategy="SHUTDOWN"
			exchangeToBind="exchangeToBindToQueue" />
	</amqp:listener>
	<amqp:consume
		config-ref="Amqp_Config"
		queueName="testQueue">
		<amqp:fallback-queue-definition
			removalStrategy="SHUTDOWN"
			exchangeToBind="exchangeToBindToQueue" />
	</amqp:consume>
</flow>
```
X12 EDI Connector 2.17 - X12 EDI HIPAA Versions | MuleSoft Documentation
# X12 EDI Connector 2.17 - X12 EDI HIPAA Versions
The following lists the transaction sets supported by the Mule X12 EDI HIPAA connector for each version of the X12 standard.
X12 Version | Supported Transaction Sets  
---|---  
005010X212  
005010X215 | 278RQ, 278RS  
005010X216 | 278RQ, 278RS  
005010X217 | 278RQ, 278RS  
005010X220A1  
005010X221A1  
005010X222A1  
005010X222A2  
005010X223A2  
005010X223A3  
005010X224A2  
005010X224A3  
005010X231A1  
005010X279A1
Ports, IPs, and Hostnames to Allow | MuleSoft Documentation
# Ports, IPs, and Hostnames to Allow
You might need to add the Anypoint Platform hostnames and ports to an allowlist in your network so that the Mule Gateway capabilities of the runtime can communicate with the online Anypoint Platform APIs and services that are managed by MuleSoft.
The following table shows you the ports or IPs/hostnames to add to your allowlists to allow communication between the Runtime Manager Agent and the Runtime Manager console:
**anypoint.mulesoft.com**  
---  
**runtime-manager.anypoint.mulesoft.com**  
**analytics-ingest.anypoint.mulesoft.com**  
**data-authenticator.anypoint.mulesoft.com**  
**exchange-files.anypoint.mulesoft.com**  
**exchange2-asset-manager-kprod.s3.amazonaws.com**  
**runtime-manager.gov.anypoint.mulesoft.com**  
**data-authenticator.gov.anypoint.mulesoft.com**  
**gov.anypoint.mulesoft.com**  
**exchange-files.gov.anypoint.mulesoft.com**  
**exchange2-asset-manager-kgprod.s3.us-gov-west-1.amazonaws.com**  
**eu1.anypoint.mulesoft.com**  
**runtime-manager.eu1.anypoint.mulesoft.com**  
**analytics-ingest.eu1.anypoint.mulesoft.com**  
**data-authenticator.eu1.anypoint.mulesoft.com**  
**exchange-files.eu1.anypoint.mulesoft.com**  
**exchange2-asset-manager-kprod-eu.s3.eu-central-1.amazonaws.com**  
## See Also
  * Ports, IP Addresses, and Hostnames to Allow