BassemE/mulesoft-documentation-embeddings huggingface dataset:
DataWeave Overview | MuleSoft Documentation
# DataWeave Overview
DataWeave is the programming language designed by MuleSoft for data transformation. It is also the expression language Mule runtime engine uses to configure components and connectors.
DataWeave enables you to build a simple solution for a common use case for integration developers: read and parse data from one format, transform the data, and write it out as a different format. For example, a DataWeave script can receive a CSV file as input and transform it into an array of complex JSON objects, or receive an XML input and write the data out to a flat file format. DataWeave enables developers to focus on the transformation logic instead of thinking about the specifics of reading, parsing, and writing specific data formats in a performant way.
  * To learn more about DataWeave, visit the language guide.
  * To look up reference information about DataWeave 2.3.0 operators and functions, visit the reference guide.
  * To see sample scripts to solve common transformation scenarios, visit DataWeave examples.
  * To get started with DataWeave 2.3.0 for Mule runtime engine (Mule) version 4.3 and later, visit the quickstart.


## Compatibility
The following table specifies which version of DataWeave is bundled with each Mule runtime engine release:
Mule Version | DataWeave Version  
---|---
Upgrading and Maintaining Flex Gateway | MuleSoft Documentation
# Upgrading and Maintaining Flex Gateway
Refer to these topics to learn about Flex Gateway release channels and Flex Gateway maintenance tasks. 

Flex Gateway Release Cadence and Support
    
  * Flex Gateway Version Lifecycle



Managed Flex Gateway Maintenance
    
  * Upgrade or Delete Managed Flex Gateway



Self-Managed Flex Gateway Maintenance
    
  * Upgrade Self-Managed Flex Gateway
  * Delete an Instance of Self-Managed Flex Gateway
  * Uninstall Self-Managed Flex Gateway
  * Renew Self-Managed Flex Gateway Registration
Microsoft Outlook 365 Connector 1.3 XML and Maven Support | MuleSoft Documentation
# Microsoft Outlook 365 Connector 1.3 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.
  * If 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/outlook-365
http://www.mulesoft.org/schema/mule/outlook-365/current/mule-outlook-365.xsd
```

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

## 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>mule4-outlook365-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 `outlook365`.
  4. Select the connector.
  5. Click **Dependency Snippets** near the upper right of the screen.


## See Also
  * Introduction to Anypoint Connectors
  * MuleSoft Help Center
Apache Kafka 4.10 XML and Maven Support | MuleSoft Documentation
# Apache Kafka 4.10 XML and Maven Support
If you manually code a Mule app in XML either from the Anypoint Studio XML editor or from a text editor, you can get access to the Anypoint Connector for Apache Kafka (Apache Kafka Connector) in your app by adding reference statements to your XML Mule flow and in the Apache Maven `pom.xml` file.
You can avoid this manual process by using Anypoint Studio. When you add the Apache Kafka Connector in Studio, Studio automatically populates the XML code with the Apache Kafka Connector namespace and schema location, and adds a dependency to the pom.xml file.  
---  
## Add a Namespace for the Connector
Paste the following into the header of your configuration XML, inside the `<mule>` tag:
```
http://www.mulesoft.org/schema/mule/kafka
http://www.mulesoft.org/schema/mule/kafka/current/mule-kafka.xsd
```

This example shows how the namespace statements are placed in the `<mule>` XML block:
```
<mule xmlns:kafka="http://www.mulesoft.org/schema/mule/kafka"
	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/kafka
	http://www.mulesoft.org/schema/mule/kafka/current/mule-kafka.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>com.mulesoft.connectors</groupId>
 <artifactId>mule-kafka-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, access the connector in Anypoint Exchange and click **Dependency Snippets**.
## Next
After completing your namespace and `pom.xml` file, you can try out the Apache Kafka Examples.
## See Also
  * Introduction to Anypoint Connectors
  * MuleSoft Help Center
Using Regular Expressions | MuleSoft Documentation
# Using Regular Expressions
Regular Expression or Regex are patterns that provide a means to specify and recognize texts. Some action steps support using Regex in their configuration.
RPA Builder uses C# flavor for Regex and includes the Regex Tester tool, which enables you to test regular expressions.
For specific use cases and examples, see Regex Examples.
If you need further information and references, following are some links to get you started with Regex:
  * Wikipedia on regular expressions: http://en.wikipedia.org/wiki/Regular_expression
  * Regex tutorials, examples, and references: http://www.regular-expressions.info/
  * External Regex tester tool: http://regexstorm.net/tester
SSE Logging Policy | MuleSoft Documentation
# SSE Logging Policy
**Policy Name** | SSE Logging  
---|---  
Logs every SSE event while streaming  
**First Flex Gateway version available**  
**Returned Status Codes** | No return codes exist for this policy.  
## Summary
The SSE Logging policy enables logging for SSE connections. The configured SSE logs appear in Flex Gateway logs.
This policy only provides logs for SSE events. To log non-SSE information, see Message Logging Policy.   
---  
## Configuring Policy Parameters
### Flex Gateway Local Mode
The SSE Logging 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  
---|---  
List of logs executed on every SSE event.  
DataWeave expression for SSE response messages |  DataWeave Expression that extracts information from the SSE Event. Use `[payload]` for the event’s payload, `[vars.data]` for the event data, and `#[vars.id]` for the event ID.  
String prefix to add to each log message.  
Defines the level of message to log: `INFO`, `WARN`, `ERROR`, or `DEBUG`. For more information, see Message Logging Severity Levels.  
## Message Logging Severity Levels
When you configure a Message Logging policy for your API instance, you can assign a severity level. Each severity level includes a specific set of information in the log report.
Log reports include the severity level you select and the following levels on the hierarchy.
For example, if you select DEBUG, the log reports include the DEBUG severity level as well as the INFO, WARN, and ERROR severity levels. However, if you select ERROR, the log reports include only error messages. The following table describes the type of information included in the logs for each severity level:
Log Severity Level | Description  
---|---  
Tracing information used by application developers.  
Informational messages that highlight the progress of the application.  
Potentially harmful situations that indicate potential problems.  
Events that prevent normal program execution but might allow the application to continue running.
API Documentation is Not Displaying in the API Details Page | MuleSoft Documentation
# API Documentation is Not Displaying in the API Details Page
If the API documentation is not displaying in the API Details page, follow these steps:
  1. Go to **Setup** > **Session Settings**.
  2. Scroll to **Lightning Web Security** and uncheck **Use Lightning Web Security for Lightning web components (GA) and Aura components (Beta)**.
Add API Alerts for Mule Gateway or Service Mesh | MuleSoft Documentation
# Add API Alerts for Mule Gateway or Service Mesh
To track and manage APIs, you can add one or more API alerts to your API instances. Add different types of alerts based on your requirements.
For APIs using Mule Gateway or Anypoint Service Mesh as their runtime, follow the steps in this tutorial to add alerts to your APIs.
You cannot add Policy Violation alerts to automated policies.
This tutorial is for Mule Gateway and Anypoint Service Mesh runtimes. To add alerts to APIs using Flex Gateway as their runtime, see Add API Alerts for Flex Gateway.   
---  
## Add API Alerts for Mule Gateway or Anypoint Service Mesh
To add an API alert to a Mule Gateway or Anypoint Service Mesh API:
  1. Navigate to **Anypoint Platform** > **API Manager**.
  2. In **API Administration** , click the API instance to which to add an alert.
  3. Click **Alerts** > **Add alert**.
  4. Specify the alert options:
     * **Name** :
Type an alert name, for example `trial-alert`.
If adding multiple alerts to the same environment, the alerts must have unique names.
     * **Enabled** :
The default option is **Enabled**.
You can delete an alert anytime if not required.
     * **Severity** :
Select a severity for the alert, for example, **Info**.
     * **Alert type** :
Select the type of alert to create, (for example, **Request Count**) and provide appropriate alert configuration values. For information about alert types, see API Alerts.
In the **For at least** and **consecutive period(s) of** fields, enter a value in the range of 1 - 999999999 to specify the time interval as a sliding window.  
---  
  5. Select **Recipients**.
Specify what emails receive the email notification.
  6. Click **Create Alert**.


## See Also
  * Review Alerts Concepts
  * Add API Alerts for Flex Gateway
Process Evaluation | MuleSoft Documentation
# Process Evaluation
A process evaluation comprises the benefits and feasibility of the automation of a real-life business process.
To propose a process candidate for automation, you evaluate the candidate based on pre-configured criteria.
As a project manager or a member of a center of excellence, you approve process candidates eligible for automation.
## Getting Started
### Think
  * What processes does your organization use?
  * Who is responsible for the processes?
  * Which criteria are necessary and suitable for evaluating the processes?
  * How can these criteria be described clearly and comprehensively?
  * Where does the data for evaluating the processes come from?
  * Which systems and data are needed for automating the processes?


### Prepare
In the **User Management** module, give involved users the privileges and properties they need. After making the necessary systems available, define the applications, credentials, and global variables needed to automate the processes in the **Process Automation** module.
### Configure
  1. In the **Evaluation Criteria** view, create the additional criteria needed to evaluate your processes.
  2. In the **Evaluation Templates** view, compile the criteria needed to evaluate certain process types.


### Evaluate
In the **Process Evaluation** view, create an evaluation based on a template for each of your processes.
### Automate
Select the processes to automate and delegate the implementation to a project manager or a center of excellence.
### Administer
Manage the automation projects in the **Process Management** view of the **Process Automation** module.
## Definitions
### Process Candidate
A _process candidate_ is a real-life business process to propose for automation via a process evaluation.
### Project Manager
A _project manager_ is responsible for the automation of a process across all automation phases.
### Center of Excellence
If the users of a user group cover the entire range of competencies that are required for a specific part of the automation, the group is called a _center of excellence (CoE)_. Only user groups that are explicitly designated as centers of excellence can accept process automation tasks.
## See Also
  * Considering Which Processes to Automate
  * Configuring Process Evaluations
  * Proposing a Process Candidate for Automation
  * Approving a Process for Automation
write | MuleSoft Documentation
# write
## write(value: Any, contentType: String = "application/dw", writerProperties: Object = {}): String | Binary
Writes a value as a string or binary in a supported format.
Returns a String or Binary with the serialized representation of the value in the specified format (MIME type). This function can write to a different format than the input. Note that the data must validate in that new format, or an error will occur. For example, `application/xml` content is not valid within an `application/json` format, but `text/plain` can be valid. It returns a `String` value for all text-based data formats (such as XML, JSON , CSV) and a `Binary` value for all the binary formats (such as Excel, MultiPart, OctetStream).
### Parameters
Name | Description  
---|---  
The value to write. The value can be of any supported data type.  
`contentType` | A supported format (or MIME type) to write. Default: `application/dw`.  
`writerProperties` | Optional: Sets writer configuration properties. For writer configuration properties (and other supported MIME types), see Supported Data Formats.  
### Example
This example writes the string `world` in plain text (`text/plain"`). It outputs that string as the value of a JSON object with the key `hello`.
#### Source
```
%dw 2.0
output application/json
---
{ hello : write("world", "text/plain") }
```

#### Output
```
{ "hello": "world" }
```

### Example
This example takes JSON input and writes the payload to a CSV format that uses a pipe (`|`) separator and includes the header (matching keys in the JSON objects). Note that if you instead use `"header":false` in your script, the output will lack the `Name|Email|Id|Title` header in the output.
#### Source
```
%dw 2.0
output application/xml
---
{ "output" : write(payload, "application/csv", {"header":true, "separator" : "|"}) }
```

#### Input
```
[
 {
  "Name": "Mr White",
  "Email": "white@mulesoft.com",
  "Id": "1234",
  "Title": "Chief Java Prophet"
 },
 {
  "Name": "Mr Orange",
  "Email": "orange@mulesoft.com",
  "Id": "4567",
  "Title": "Integration Ninja"
 }
]
```

#### Output
```
<?xml version="1.0" encoding="US-ASCII"?>
<output>Name|Email|Id|Title
Mr White|white@mulesoft.com|1234|Chief Java Prophet
Mr Orange|orange@mulesoft.com|4567|Integration Ninja
</output>
```
Viewing Managed Flex Gateway Runtime and Access Logs in Anypoint Monitoring | MuleSoft Documentation
# Viewing Managed Flex Gateway Runtime and Access Logs in Anypoint Monitoring
Use Anypoint Monitoring to see both runtime and access logs. Use the Anypoint Monitoring filtering to see different detailed logging views.
To access Anypoint Monitoring from the Runtime Manager Flex Gateway UI:
  1. From Anypoint Platform, select **Runtime Manager**.
  2. Select **Flex Gateways** in the navigation menu.
  3. Click the name of the Flex Gateway whose logs you want to view.
  4. Click **Logs**.
  5. Click **View logs in Anypoint Monitoring**.
This action takes you to the Anypoint Monitoring UI.
Add a Certificate | MuleSoft Documentation
# Add a Certificate
Add a Privacy-Enhanced Mail (PEM) certificate to your secret group to use a Base64-encoded DER certificate. This certificate is the "leaf" (end-entity) certificate.
  1. In the Secret Groups list view, select the secret group you need to add a certificate to and click **Edit**.
  2. In the menu on the left, select **Certificate** and then click **Add Certificate**.
  3. In the **Add Certificate** screen, complete these fields:
     * **Name** Enter a name for your certificate.
     * **Type** Select **PEM** from the drop-down menu.
     * **Certificate File** Click **Choose File** and select the certificate file to upload.
     * **Override Expiration Date** If you want to override the current expiration date of the certificate, select a new expiration date.
  4. Click **Save**.


## See Also
  * Create a Secret Group
  *
Write Log | MuleSoft Documentation
# Write Log
This action step can be used to leave a comment or brief description at a certain point in the _Workflow_. The comment will be logged in the _Trace Log_ and be shown in the _Workflow Run Results_. Note that if you set the _Workflow Run Result_ property to _Error_ , it will **not** force the _Workflow_ to enter an error state.
## Properties
**Log Message** The text that will be written into the log. You can use pin variables here.
**Workflow Run Result** If activated, the _Message text_ also shows in the _Workflow Run Results_
## Inbound Variables
**Log Message** * The text that will be written into the log. You can use pin variables here.
## Outbound Variables
The action step _Write Log_ possesses no outbound variables.
Configuring Mule Stack Traces | MuleSoft Documentation
# Configuring Mule Stack Traces
Mule does not display all stack traces by default. When Mule does show stack traces, it filters out some internal class references from to produce a more readable output.
You can control Mule stack trace behavior in two ways:
  * Use command-line arguments
  * Set properties in Mule Studio


## Use Command-Line Arguments
Use `-M-DpropertyName` with the following command-line arguments to control the behavior of stack traces:
  * `mule.verbose.exceptions` - If set to **true** , Mule shows filtered stack traces.
  * `mule.stacktrace.filter` - A comma-separated list of packages and/or classes to remove from the stack traces, which are matched using `string.startsWith()`.


These arguments are available for Mule developers and administrators to use while troubleshooting. They are not intended for use by end users.  
---  
## Set Properties in Anypoint Studio
In Studio, you can set the properties specified above to instruct Mule to provide stack traces and to filter out packages or classes to remove. To adjust these settings:
  1. Select **Run** > **Run Configurations…​**
  2. Define the properties to specify the behavior you want.


In the example below, the `mule.verbose.exceptions` property is set to **true**.
## Obtain the Stack Trace and Thread Dump
Follow these steps to troubleshoot Mule if it stops and you need more information to find the cause:
  1. Identify the Mule process ID (`MULE_PID`).
  2. Retrieve the thread dump.
  3. Retrieve the heap dump if the Mule server throws an Out Of Memory error: `java.lang.OutOfMemoryError: Java heap space`


### Identify the Mule process ID
To identify the Mule process ID, use the Unix/Linux `ps` command, or execute the `jps` command from the terminal. The `jps` tool ships with the JDK used to run Mule. For example, a line containing `MuleContainerBootstrap`, `ApplicationDeployer`, or similar identifies the Mule process.
### Retrieve the Thread Dump
Use the `jstack` tool, which is available in modern JDKs, to retrieve the thread dump:
```
jstack -l MULE_PID > filename.tdump
```

### Retrieve the Heap Dump
Retrieve the heap dump if the Mule server throws an out of memory error: `java.lang.OutOfMemoryError: Java heap space`
The Oracle JVM provides a JVM modifier to gather this information. You must restart the Mule server after applying this change and reproduce the out of memory error one more time.
To apply this modifier to the JVM that Mule uses, set the following parameters in Mule’s `/conf/wrapper.conf` file to automatically trigger the creation of a heap dump:
```
wrapper.java.additional.<n>=-XX:+HeapDumpOnOutOfMemoryError
wrapper.java.additional.<n+1>=-XX:HeapDumpPath=path/to/dumps
```

When you set the parameters, change <n> to a number that follows the sequence in `wrapper.conf`.
By default, Mule includes the `HeapDumpOnOutOfMemoryError` property, but it does not define a path for heap dumps.  
---  
If no path is defined for a heap dump, the file is created in the directory where the java process was launched. The heap dump file is then generated as `java_pid<pid>.hprof.<unique number>`.
User Account Decrypter | MuleSoft Documentation
# User Account Decrypter
The action step _User Account Decrypter_ allows you to accept the activity parameter _User Account_ as an inbound variable and further process it as log-in data in the subsequent action steps.
Please note that the username and password are displayed in plain text in the run results, among other places.
## Properties
The action step _User Account Decrypter_ does not have any properties.
## Inbound Variables
**User Account** Only one activity parameter of the type _User Account_ can be connected to this action step.
## Outbound Variables
**Username** This variable is output as a string.
**Password** This variable is output as a string.
Step 7: Publish the Automation to Exchange | MuleSoft Documentation
# Step 7: Publish the Automation to Exchange
After finishing the testing phase, the process moves to the production phase. It is time to create an invocable run configuration, which publishes the process to Anypoint Exchange and enables MuleSoft Composer to trigger the execution of this process.
Before you can create an invocable run configuration, ensure that you configured your Anypoint Platform settings in RPA Manager. See Configure Anypoint Platform Credentials for instructions.
## Step 7.1: Create an Invocable Run Configuration
To create an invocable run configuration for a process:
  1. In RPA Manager, go to **My RPA** > **My Processes**.
  2. Click the **MuleSoft newsletter sign-up** project.
  3. In the **Production configurations** panel, click **Create invocable run configuration**.
  4. Specify a **Configuration name** , for example, **Invocable RPA Process** , and click **Next**.
  5. Click **Next** (this process has no activity parameters).
  6. Click **Next** (this test has no user tasks).
  7. Select **Run in Secure Session** and click **Next**.
  8. Select the bot to carry out the execution and click **Save**.
  9. In the **Production configurations** table, click **Publish** > **Publish to Anypoint**.


## Next Steps
Now that you’ve published the process to Exchange, it is time to create a Composer flow that triggers the execution of this RPA process.
Continue with Step 8: Integrate the Automation with Composer Flows
## See Also
Remove SLA Tiers from API Groups | MuleSoft Documentation
# Remove SLA Tiers from API Groups
You can remove an SLA tier from an API Group instance if you no longer need it.
To remove an SLA tier:
  1. Navigate to **Anypoint Platform** > **API Manager**.
  2. Click **API Groups**.
  3. Expand the API Group list and click the API Group instance to which you want to add the SLA tier.
  4. Click **SLA Tiers** :
  5. From the API Group instance details page, click the ellipses button in the SLA tier list and click **Delete**.


## See Also
  * Add SLA Tiers to API Groups
tan | MuleSoft Documentation
# tan
## tan(angle: Number): Number
Returns the trigonometric tangent of an angle from a given number of radians.
_Introduced in DataWeave version 2.4.0._
### Parameters
Name | Description  
---|---  
Number of radians in an angle.  
### Example
This example shows how `tan` behaves with different inputs.
#### Source
```
%dw 2.0
import * from dw::util::Math
output application/json
---
{
  "tan0": tan(0),
  "tan13": tan(0.13),
  "tan-1": tan(-1)
}
```

#### Output
```
{
  "tan0": 0.0,
  "tan13": 0.13073731800446006,
  "tan-1": -1.5574077246549023
 }
```
Handle Message Acknowledgment | MuleSoft Documentation
# Handle Message Acknowledgment
Anypoint Connector for AMQP provides different acknowledgment configurations.
## Automatic Acknowledgment On Success
The `AUTO` `ackMode` can be used in the `amqp:listener` component, causing the automatic ACK of the received message **if and only if the flow execution completes successfully**. In case that an error occurs during the flow execution that causes it to terminate prematurely, then the message will not be ACKed and redelivery will occur.
## Immediate Acknowledgment
Setting the `ackMode` to `IMMEDIATE` either in `amqp:listener` or `amqp:consume` operations will cause the Message to be automatically ACKed once it is consumed, and prior to any processing of the Message by the application. Having the Message automatically acknowledged once it is received means that the Message won`t be redelivered if any error occurs during the processing of the Message, so application logic like a dead letter queue has to be created to handle errors without losing Messages.
## Manual Acknowledgment
As you may expect, the `MANUAL` `ackMode` delegates all the responsibility of performing the ACK on the Message to the application logic.
With this configuration, every Message received by either the `listener` or `consume` operations will have an `ackId` available in the MuleMessage `attributes` which identifies this Message uniquely for a given channel.
The `ackId` that identifies the Message will then be passed on to the `amqp:ack` operation:
```
<flow name="consumerWithManualAck">
  <amqp:consume config-ref="config" queueName="${queueName}" ackMode="MANUAL" />
  <!--Do message processing-->
  <logger message="#[payload]">
  <amqp:ack ackId="#[attributes.ackId]" />
</flow>
```

## See Also
  * Listen For New Messages
  * MuleSoft Help Center
APIkit for SOAP | MuleSoft Documentation
# APIkit for SOAP
APIkit for SOAP is a framework for simplifying the development and integration of SOAP-based APIs. SOAP (Simple Object Access Protocol) is a messaging protocol for exchanging structured information between web services. APIkit for SOAP manages SOAP message formats and headers to ensure seamless integration with SOAP infrastructure. With APIkit for SOAP, you can create robust and reliable SOAP-based APIs, accelerating your development workflow and delivering enhanced integration capabilities.
## APIkit for SOAP Features
  * Streamlines SOAP API development, ensuring seamless integration with your existing SOAP infrastructure.
  * Simplifies the handling of SOAP message formats and headers, so you can focus on the core logic of your APIs.
  * Automates the binding to WSDL (Web Services Description Language), reducing manual configuration efforts and ensuring accuracy.
  * Supports data transformations.
  * Defines and exposes SOAP APIs with ease by emphasizing SOAP/WSDL contracts.
  * Supports XML 1.0 characters by default. Supports XML 1.1 C0 characters through the system property.


## See Also
  * Before You Begin Using APIkit for SOAP
Microsoft Dynamics 365 for Finance and Operations Connector 2.3 | MuleSoft Documentation
# Microsoft Dynamics 365 for Finance and Operations Connector 2.3
Anypoint Connector for Microsoft Dynamics 365 for Finance and Operations (Microsoft Dynamics 365 for Operations Connector) enables integration with Microsoft Dynamics 365 for Operations Web API. You can configure this connector using Anypoint Studio. This connector enables connection types for OAuth 2 or OAuth 2 with a username and password.
## Before You Begin
To use this connector, you must be familiar with:
  * The Microsoft Dynamics 365 for Finance and Operations API
  * Anypoint Connectors
  * Mule runtime engine (Mule)
  * Elements in a Mule flow
  * Global elements
  * How to create a Mule app using Anypoint Studio


Before creating an app, you must have access to a Microsoft Dynamics 365 instance (online or on-premises) managed by Azure Active Directory.
## Common Use Cases for the Connector
This connector enables you to perform these operations:
  * Authorize or unauthorize access to a Microsoft Dynamics 365 for Operations server
  * Create a recurring job on Microsoft Dynamics 365 for Operations server
  * Retrieve multiple entries, including retrieval using DataSense Query Language
  * Execute operations


See Examples for use cases.
## Audience
  * New users, read:
    * Using Anypoint Studio to Configure the Connector to create your Mule app
  * Examples, which provides an example use case for the connector
  * Advanced users, read:
    *   * The Examples, which provide one or more use cases for the connector


## Connection Types
Microsoft Dynamics 365 for Finance and Operations Connector uses the OAuth 2.0 connection type, which delegates user authentication to the service hosting the user account.
## Next Step
After you complete the prerequisites and experiment with templates and examples, you are ready to create an app and configure the connector using Anypoint Studio.
## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * Microsoft Dynamics 365 for Finance and Operations Connector Reference
  * MuleSoft Help Center
SAP S/4HANA OData Connector 2.4 | MuleSoft Documentation
# SAP S/4HANA OData Connector 2.4
Anypoint Connector for SAP S/4HANA OData (SAP S/4HANA OData Connector) provides support for the OData APIs exposed by SAP S/4HANA Cloud and SAP S/4HANA on-premise.
The connector enables you to perform operations to:
  * Create, get, update, and delete entities
  * Retrieve a single entity
  * Query multiple entities
  * Invoke a remote function
  * Execute batch requests that consist of multiple requests


For software requirements and compatibility information, see the SAP S4/HANA Connector Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
  * The SAP S/4HANA OData API
  * Anypoint Connectors
  * Mule runtime (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 SAP S/4HANA OData target resource
  * Anypoint Platform
  * Anypoint Studio 7.3 or later
  * Have a developer account or other valid SAP S/4HANA instance
  * Access to the catalog service that allows you to use the service discovery
  * A communication user that is assigned to the corresponding communication arrangements for the desired APIs


## Common Use Case for the Connector
Perform CRUD operations on entity types of SAP S/4HANA’s OData API and process the response.
## Exchange Templates and Examples
Anypoint Exchange provides templates you can use as a starting point for your app, as well as examples that illustrate a complete solution.
## Next Step
After you complete the prerequisites and experiment with templates and examples, you are ready to create an app with Anypoint Studio.
## See Also
  * Introduction to Anypoint Connectors
  * SAP S/4HANA OData Connector Release Notes
  * SAP S/4HANA OData Connector on Exchange
  * MuleSoft Help Center
toRegex | MuleSoft Documentation
# toRegex
## toRegex(str: String): Regex
Transforms a `String` value into a `Regex` value.
_Introduced in DataWeave version 2.4.0._
### Parameters
Name | Description  
---|---  
The `String` value to transform into a `Regex` value.  
### Example
This example shows how `toRegex` behaves with different inputs. It produces output in the `application/dw` format.
#### Source
```
%dw 2.0
import * from dw::util::Coercions
output application/dw
---
{
 toRegexEx1: toRegex("a-Z"),
 toRegexEx2: toRegex("0-9+")
}
```

#### Output
```
{
 toRegexEx1: /a-Z/,
 toRegexEx2: /0-9+/
}
```
AS2 Connector 6.6 | MuleSoft Documentation
# AS2 Connector 6.6
Mule runtime engine (Mule) supports the AS2 protocol through Anypoint Connector for AS2 (AS2 Connector).
AS2 Connector enables trading partners to transmit and receive AS2 messages with EDI-X12, EDIFACT, XML, or binary payloads, for example:
  * Send messages, signed or unsigned, over HTTP or HTTPS, using the AS2 protocol
  * Receive messages over HTTP or HTTPS, using the AS2 protocol
  * Receive asynchronous MDN for sent messages


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


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


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


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


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


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


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


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


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


## Next Step
After you complete the prerequisites, you are ready to create an app and configure the connector using Anypoint Studio.
## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * MuleSoft Help Center
Reviewing Environment Concepts | MuleSoft Documentation
# Reviewing Environment Concepts
The support for environments in strategic components of Anypoint Platform eliminates the need to construct version names to reflect an environment. The administrator grants permissions per environment. A user who is granted environment access permission has full access to operations inside the specific environment:
API Manager environment administrator only relates to actions inside of API Manager. The API Manager Environment Administration permission allows you to do the following things:
  * Create and modify your APIs as well as modifying those created by others
  * Apply policies
  * Define SLAs
  * Create alerts


As organization administrator, you grant permissions to users as described in the topic linked below.
When you navigate to API Manager, you see the environment control bearing the name of your default environment. In this example, Sandbox is the default environment:
When you click the environment control, a list of your production and sandbox environments appears.
To connect Mule Runtime to API Manager through Autodiscovery, you need to provide the one of the following credential pairs:
  * The client ID and secret of the environment
  * The client ID and secret of the organization where you registered the API
  * The client ID and secret of the parent of the organization where you registered the API.
For example, you can have a parent business group(BG) for ABC Corp, and that parent can have children ABC-BG1 and ABC-BG2. You can track the ABC-BG1 API using credentials of ABC.
    * ABC
      * ABC-BG1
      * ABC-BG2


## Reviewing Unclassified APIs and Permissions concepts
If you upgraded APIs from the earlier versions of API Manager to API Manager 2.x, you might have APIs residing in the Unclassified environment. Other APIs that you haven’t associated with an environment, such as an API you create in Design Center, published to Exchange, and set up to manage from Exchange also appear unclassified in API Manager. You need to classify an API to manage it. Until you classify the API, the user permissions under the earlier release apply to all operations. After classification, the permissions per environment that you grant to users applies.
## See Also
  *   * Classifying an API instance into an Environment on API Manager
  * Granting Permission to Access an environment
  * Reviewing API Gateway API Autodiscovery concepts
  * Configuring Mule Gateway API Autodiscovery in a Mule 4 Application
  * Configuring Mule Gateway API Autodiscovery in a Mule 3 Application
Adding Folders to Your Home Directory | MuleSoft Documentation
# Adding Folders to Your Home Directory
Cloud IDE 
Desktop IDE 
**Open Beta Release** : The **cloud IDE is in open beta**. Any use of Anypoint Code Builder in its beta state is subject to the applicable beta services terms and conditions, available from the IDE.
When you create a project, Anypoint Code Builder stores it in your home directory by default. You can create other folders for your projects in the IDE.
Don’t create the project within another project directory.
## Create Project Folders in the Cloud IDE
To a folder for storing your Mule projects under your home directory:
  1. Open the Command Palette.
Show me how
     * Use the keyboard shortcuts:
       * Mac: Cmd+Shift+p
       * Windows: Ctrl+Shift+p
     * In the desktop IDE, select **View** > **Command Palette**.
     * In the cloud IDE, click the (menu) icon, and select **View** > **Command Palette**.
  2. Select the following command:
```
File: Open Folder...
```

  3. Select your Anypoint Code Builder home directory:
If prompted, trust the authors of the files in the directory:
  4. After Anypoint Code Builder loads your home directory, right-click your Explorer view, and select **New Folder**.
  5. Name your new directory and press Enter.
  6. Close your home directory by clicking the (menu) icon and selecting **File** > **Close Folder**.


## Create a Project Folder in the Desktop IDE
To create a local folder for your projects from the desktop IDE:
  1. Open the Command Palette.
Show me how
     * Use the keyboard shortcuts:
       * Mac: Cmd+Shift+p
       * Windows: Ctrl+Shift+p
     * In the desktop IDE, select **View** > **Command Palette**.
     * In the cloud IDE, click the (menu) icon, and select **View** > **Command Palette**.
  2. Select the following command:
```
 File: Open Folder...
```

  3. Use your local directory to create a new folder.


## Create a Project Folder from the Desktop or Cloud IDE
Use the terminal in the IDE to create folders.
  1. Ensure that no projects are open.
  2. From your IDE, open the Terminal window in the console:
     * In the desktop IDE, select **View** > **Terminal**.
     * In the cloud IDE, click the (menu) icon, and select **Terminal** > **New Terminal**.
     * For either IDE: Press Ctrl and then press the backtick key (`).
  3. Provide this command to create a folder:
```
mkdir <name-of-your-folder>
```

Replace `<name-of-your-folder>` with a name of your choice for the directory.
Resolve Private Domains in Your Internal Network | MuleSoft Documentation
# Resolve Private Domains in Your Internal Network
You can specify custom private domains by adding the IP address and domain name for your network. When you provide private domains, your worker resolves them using your private DNS, so you can still use the internal host names of your private network (make sure your applications call the backend resources by FQDN).
  1. Sign into Anypoint Platform, and in **Management Center** , click **Runtime Manager**.
  2. In the left navigation, click **VPCs**.
  3. Select the row of the Anypoint VPC to configure, then click **Manage VPC**.
  4. Click the **Internal DNS** tab.
  5. Click **Add New IP** , enter the IP address of your internal DNS server, then click **Add to List**. You can enter up to 3 IP addresses.
  6. Click **Add New Domain** , enter your internal domain name, then click **Add to List**. You only need to add the common portion of the domain name, for example: `mulesoft.com`.
You can add several private domains.
  7. Click **Apply Changes**.
Changes to internal DNS IP addresses and domains can take up to 60 minutes to propagate to your CloudHub workers.   
---  


When resolving a domain name in your internal network, consider the following:
  * The IP address you configure is for the DNS server of your internal network. It is not the IP address of the service you are connecting to.
  * The maximum number of characters of all the domains you configure must not exceed 229 characters. For example, adding the domains `mydomain1.com` and `mydomain2.com` requires 28 characters. Each domain name consumes an additional character because in the DNS hierarchy all domains end with a "." character.
  * Avoid entering hostnames to ensure that you do not exceed the 229 character limit.
  * All DNS servers must include valid and identical records for all of the private domains listed.


## See Also
  * VPC Network Architecture
  *
Azure Data Lake Storage - XML and Maven Support | MuleSoft Documentation
# Azure Data Lake Storage - 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/azure-data-lake-storage
http://www.mulesoft.org/schema/mule/azure-data-lake-storage/current/azure-data-lake-storage.xsd
```

This example shows how the namespace statements are placed in the XML:
```
<mule xmlns:azure-data-lake-storage="http://www.mulesoft.org/schema/mule/azure-data-lake-storage"
	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/azure-data-lake-storage
  http://www.mulesoft.org/schema/mule/azure-data-lake-storage/current/azure-data-lake-storage.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>mule-azure-data-lake-storage-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 `azure data lake storage`.
  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.
## See Also
  * Introduction to Anypoint Connectors
  * MuleSoft Help Center
Custom Policies | MuleSoft Documentation
# Custom Policies
Policies enforce regulations to help manage security, control traffic, and improve API adoption. For example, a policy can control authentication, access, and service level agreements (SLAs). You can create custom policies based on your specific business requirements and apply them to APIs to extend existing functionality or define new ones.
The workflow to create custom policies for Mule 4 and earlier in Anypoint API Manager has not changed. Continue to use the process of developing the policy, packaging the custom policy, uploading it to Exchange, and applying the policy to an API through Anypoint API Manager as described in the Anypoint API Manager documentation.
For more information, refer to the following:
  * Publish a Mule 4 Custom Policy
  * Mule 4 Custom Policy Workflow
  * Managing Offline Custom Policies
  * Mule 3 Custom Policies