BassemE/mulesoft-documentation-embeddings huggingface dataset:
logn | MuleSoft Documentation
# logn
## logn(a: Number): Number | NaN
Returns the natural logarithm (base `e`) of a number.
If the input value is less than or equal to zero, the result is `NaN` (or `null`).
_Introduced in DataWeave version 2.4.0._
### Parameters
Name | Description  
---|---  
Number to convert into its natural logarithm.  
### Example
This example shows how `logn` behaves with different inputs.
#### Source
```
%dw 2.0
import * from dw::util::Math
output application/json
---
{
  "logn10": logn(10),
  "logn13": logn(0.13),
  "logn-20": logn(-20)
}
```

#### Output
```
{
  "logn10": 2.302585092994046,
  "logn13": -2.0402208285265546,
  "logn-20": null
}
```
MD5 | MuleSoft Documentation
# MD5
## MD5(content: Binary): String
Computes the MD5 hash and transforms the binary result into a hexadecimal lower case string.
### Parameters
Name | Description  
---|---  
A binary input value to encrypt.  
### Example
This example uses the MD5 algorithm to encrypt a binary value.
#### Source
```
%dw 2.0
import dw::Crypto
output application/json
---
{ "md5" : Crypto::MD5("asd" as Binary) }
```

#### Output
```
{ "md5": "7815696ecbf1c96e6894b779456d330e" }
```
XML Module 1.3 | MuleSoft Documentation
# XML Module 1.3
The XML Module process and extracts data from an XML document. Although DataWeave is recommended for most XML-related cases, use the XML Module for cases that involve the usage of XML standards such as XSLT, XPath, and XQuery, or XSD.
For compatibility information and fixed issues, see the XML Module Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
  * Anypoint Connectors
  * Mule runtime engine (Mule)
  * Elements and global elements in a Mule flow
  * Creating a Mule app using Anypoint Studio (Studio)


Before creating an app, you must have access to Anypoint Platform and Anypoint Studio.
## Common Use Cases for the Connector
Common use cases for XML Module include the following:
  * Validate documents against an XSD schema
  * Take XML input and transform it using an XSL style sheet
  * Evaluate Xpath expressions in XML input content and extract the result
  * Take XML input content and transform it based on XQuery expressions


## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * MuleSoft Help Center
File Connector | MuleSoft Documentation
# File Connector
File Connector v1.4
Anypoint Connector for File (File Connector) handles files and folders on a locally mounted file system. Its main features include:
  * The ability to read files or fully list directory contents on demand.
  * Support for common FTP operations such as creating directories and copying, moving, renaming, and deleting files.
  * Support for locking files.
  * File matching functionality.
  * A design that is fully consistent with the File and SFTP connectors. The same set of operations is available on each connector.


For information on error conditions, see the File Connector Reference.
Release Notes: File Connector Release Notes Exchange: File Connector
## Configure the File Connector
The File connector does not always require configuration. However, it is good practice to define one. The most important configuration parameter is the Working Directory (`workingDir`), which is the path to a directory that is treated as the root of every relative path that you specify with this connector. If you do not provide a working directory, the connector configuration defaults to the value of the `user.home` system property. If the system property is not set, the connector fails to initialize.
You can also set the default encoding to use when writing files. It defaults to Mule runtime’s default encoding. If you use any File connector operations without referencing a configuration, the operation uses the default values.
This example sets a working directory for the File connector:
```
<file:config name="File_Config">
 <file:connection workingDir="/Users/me/myfiles" />
</file:config>
```

## Attributes
When reading or listing files, the connector provides file metadata, such as the file name, full path, size, timestamp, and so on. The connector uses the Mule Message Attributes to access this information.
## POM File Information
```
<dependency>
 <groupId>org.mule.connectors</groupId>
 <artifactId>mule-file-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 specify a version, view File Connector in Anypoint Exchange and click **Dependency Snippets**.
## See Also
  * File Connector Documentation Reference
  *   *   *   * Listen for New or Modified Files
  * Copy or Move Files
  * MuleSoft Help Center
FTP Connector | MuleSoft Documentation
# FTP Connector
Support Category: Select
Anypoint Connector for FTP (FTP Connector) provides access to files and folders on an FTP server. FTP connector operations manage file transfers by using File Transfer Protocol (FTP). The connector’s main features include:
  * The ability to read files or fully list directory contents on demand.
  * Support for common FTP operations such as creating directories and copying, moving, renaming, and deleting files.
  * Support for locking files.
  * File matching functionality.
  * A design that is consistent with the File and FTP Connectors.
The same set of operations is available using these two connectors, and they behave similarly.


## Representation of File Attributes
Mule 4 provides a message structure of a payload and attributes in which the data moves around, making that payload a file content. The attributes provide an object that contains metadata on the payload and information such as the file’s name, path, size, and timestamps. For FTP Connector and SFTP Connector, these attributes are known as _file attributes_.
In Mule 4, messages comprise _file content_ (a payload) and _file attributes_ (metadata about the payload, such the file’s name, path, size, and timestamps. The file attributes also describe the format in which a payload is represented by including a file’s encoding and MIME type.
## Before You Begin
To use this connector, you must be familiar with:
  * Anypoint Connectors
  * Mule runtime engine (Mule)
  * Elements and global elements in a Mule flow
  * Creating a Mule app using Anypoint Studio (Studio)


Before creating an app, you must have access to Anypoint Platform and Anypoint Studio.
## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * MuleSoft Help Center
Configure the Quality of Service for MQTT Connector | MuleSoft Documentation
# Configure the Quality of Service for MQTT Connector
The MQTT protocol enables you to specify levels of delivery assurance for inbound or outbound messages. These levels are referred to as _quality of service_ (QoS).
The available QoS levels to configure for MQTT Connector are:
  * **AT_MOST_ONCE**
Messages are delivered at most one time ("fire and forget") and delivery is not guaranteed.
  * **AT_LEAST_ONCE**
Messages are delivered correctly at least one time. The message could be delivered more than once.
  * **EXACTLY_ONCE**
Messages are sent once and delivery is ensured.


The quality of service is sometimes different between message publishing and message subscribing, even if the published message and the subscription have a common topic. For example, a message published with QoS 1 or 2 might not be successfully delivered to the **On New Message** source, if that listener source is subscribed with QoS **AT_MOST_ONCE** (QoS=0).
## See Also
  * MQTT3 Connector Examples
  * MuleSoft Help Center
Migrating Transformers | MuleSoft Documentation
# Migrating Transformers
Mule 4 does not require `transformers` anymore. Now that DataWeave is the default expression language and the repeatable streams feature is supported, most (if not all) scenarios that required a transformer no longer exist.
## Migrating Type Transformers
In Mule 3, the same data can be represented using different types. For instance, a JSON can be stored using a `String`, `InputStream`, `OutputHandler`, or `ByteArray`. In the same way, an XML can be represented with those same types or in a Java DOM document.
In Mule 4, every format that is not binary is handled automatically by Mule. So you do not need to be concerned about the type that is carrying the content.
### InputStream to String Transformations
In Mule 3, the `<object-to-string-transformer>` was commonly used so that data held by an `InputStream` could be consumed by more than one processor. Because Mule 4 has the concept of repeatable streams, this is no longer required.
### Object Model Representation for JSON and XML
To access the content of an XML or JSON document in Mule 3, a conversion to a Java object representation model was needed so that Java code or MEL could be used later. In Mule 4, the expression language of the runtime completely supports JSON and XML (and many other formats), so this conversion is no longer needed. You simply use a DataWeave expression to access the data.
## Migrating Custom Transformers
Most likely, any custom transformers you used to handle supported data formats are no longer needed, so they can be migrated to use the expression language. The DataWeave script can be externalized to a file if the same transformation needs to be occur in several places.
For cases where you transform data in ways that DataWeave does not support, you should use the Java module or the Scripting module and use custom code to perform the transformation.
## See Also
DataWeave Language
Streaming in Mule Apps
Why DataWeave is the Main Expression Language in Mule 4 Beta
NetSuite Connector 11.10 | MuleSoft Documentation
# NetSuite Connector 11.10
Anypoint Connector for NetSuite (NetSuite Connector) synchronizes data and automates business processes between NetSuite and third-party applications, either on-premises or in the cloud. NetSuite provides cloud-based business management software that helps companies manage core business processes, ERP financials, CRM, e-commerce, inventory, and more.
NetSuite Connector provides the following features:
  * SOAP-based integration
NetSuite Connector 11.0 and later does not support REST-based operations.
  * Generation of NetSuite business objects
  * Different authentication levels
  * Error-handling support


For compatibility information and fixed issues, see the NetSuite Connector Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
  * The NetSuite API
  * Anypoint connectors
  * Mule runtime engine (Mule)
  * Elements and global elements in a Mule flow
  * Creating a Mule app using Anypoint Studio (Studio)


Before creating an app, you must have:
  * Credentials to access NetSuite Web Services
  * Anypoint Studio version 7.3.3 or later


## Common Use Cases for the Connector
  * Quote-to-Cash
Improve cash flow, remove manual order entries, and minimize order errors by leveraging realtime integrations to connect and synchronize data about your customer’s intent to buy from your CRM application, such as Salesforce, into its realization of revenue in NetSuite ERP.
  * Invoice-to-Reconciliation
Automate your Accounts Receivable (A/R) process by automatically applying bank payments against invoices in NetSuite for real-time A/R processing. Streamline accounts payable by automating payment file transfers between NetSuite and your banks.
  * Hire-to-Retire
Build a single view of your employees with realtime synchronization of employee information between Netsuite and your Human Capital Management (HCM) services, such as Workday, Oracle HCM, PeopleSoft, and so on. Automatically trigger employee onboarding processes such as ordering computer equipment, uniforms, system access setup, and so on, while reversing the process upon retirement.


## Authentication types
NetSuite connections use token-based authentication, which uses either a consumer key and token ID or secret pairs to authenticate.
For information about configuring this authentication type, see Using Anypoint Studio to Configure NetSuite Connector.
## Using Exchange Templates and Examples
Anypoint Exchange provides the following templates that you can use as starting points for your apps:
  * Retrieve a List of Customers from NetSuite
  * Salesforce and NetSuite Opportunity Aggrgation


## Next Step
After you complete the prerequisites, 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
localDateTime | MuleSoft Documentation
# localDateTime
## localDateTime(parts: LocalDateTimeFactory): LocalDateTime
Creates a `LocalDateTime` value from values specified for `year`, `month`, `day`, `hour`, `minutes`, and `seconds` fields.
_Introduced in DataWeave version 2.4.0._
### Parameters
Name | Description  
---|---  
`Number` values for `year`, `month`, `day`, `hour`, `minutes`, and `seconds` fields. Valid values are numbers between 1 and 12 for the `month`, 1 through 31 for the `day`, 0 through 23 for the `hour`, 0 through 59 for `minutes`, and 0 through 59 (including decimals, such as 59.99) for `seconds` fields. You can specify the name-value pairs in any order, but the output is ordered as a default `LocalDateTime` value, such as `2012-10-11T10:10:10`. The input fields are parts of a `LocalDateTimeFactory` type.  
### Example
This example shows how to create a value of type `LocalDateTime`.
#### Source
```
%dw 2.0
import * from dw::core::Dates
output application/json
---
{
  newLocalDateTime: localDateTime({year: 2012, month: 10, day: 11, hour: 12, minutes: 30, seconds: 40})
}
```

#### Output
```
{
  "newLocalDateTime": "2012-10-11T12:30:40"
}
```
Pooling Profiles | MuleSoft Documentation
# Pooling Profiles
Unlike singleton components, pooled components configure their component pool which contains multiple instances of the component to process simultaneous incoming requests. Each pooled component has its pooling profile.
Connectors such as Anypoint Connector for FTP (FTP Connector) and Anypoint Connector for SFTP (SFTP Connector) pool connections by default and use a `pooling-profile` to customize the connection pool. When performance tests show it necessary, add the `pooling-profile` parameter to connectors.
However, Anypoint Connector for Database (Database Connector) does not perform connection pooling by default, causing every execution of an SQL statement to open a new connection and close it once finished (unless there is a transaction active that uses the same connection for the whole transaction). By using a pooling profile, you enable one-time connection setup and subsequent requests use existing connections, thereby improving request-processing performance:
```
<db:mysql-config name="dbConfig" host="localhost" port="3306" user="root"
  password="" database="esb" doc:name="MySQL Configuration">
  <db:pooling-profile maxPoolSize="17" minPoolSize="13" />
</db:mysql-config>
```

The `maxPoolSize` setting specifies the maximum number of connections open to the database, and available to serve incoming requests.
Brand and Customize Your Site | MuleSoft Documentation
# Brand and Customize Your Site
Anypoint API Community Manager enables you to customize and adjust the exact details of branding, look and feel, and the site structure of your Salesforce Experience Cloud site, using a simple point-and-click approach.
Advanced HTML and CSS editing is also available for precise web designs.
  * Site Look-and-Feel Customization
  *   * Description of API Community Manager Lightning Components
  *   *   *   * Advanced Styling with CSS
Broken Images on Documentation Pages | MuleSoft Documentation
# Broken Images on Documentation Pages
Images uploaded to Exchange with the Markdown editor are stored in Exchange.
If your community shows a broken image on an API documentation page, and the image displays correctly on the API documentation page in Exchange, follow these steps:
  1. If the image is stored in Exchange, make the Exchange API version asset public so the image can be rendered in your community.
  2. If the image is stored on a web location outside Exchange, such as S3 or Dropbox:
    1. Open Salesforce setup.
    2. Open your community’s content security policy (CSP) trusted sites list.
    3. Ensure that the list includes the image site domain.
    4. Because some file-sharing services resolve URLs through multiple redirects, ensure that the list includes the domain of the final URL.


To learn if any content in any component or page of the community is blocked by the content security policy:
  1. Open the API Community Manager control panel.
  2. Click **Community Builder**.
  3. Click **Preview**.
  4. Open the page that contains the content.


To inspect the URLs the browser loads when rendering a community page, use the browser developer tools.
Applying Policies for Managed Flex Gateways and Connected Mode | MuleSoft Documentation
# Applying Policies for Managed Flex Gateways and Connected Mode
For Managed Flex Gateway and Flex Gateway running in Connected Mode, you apply inbound and outbound policies using **API Manager**. To find the policies provided by Flex Gateway, see Inbound Policies Directory and Outbound Policies Directory.
## Apply an Inbound Policy
  1. Go to **Anypoint Platform > API Manager**.
  2. In **API Administration** , click the name of the API to which you want to apply a policy.
  3. From the side navigation panel, click **Policies**.
  4. Click **+ Add policy**.
  5. Select the policy to apply.
  6. Configure the required parameters.
For policy configuration parameters, see Inbound Policies Directory.
  7. If necessary, configure **Advanced options**.
  8. Click **Apply**.


You can apply a policy to the entire API by default, or to specific methods and resources within the API.
## Apply an Outbound Policy
  1. Go to **Anypoint Platform > API Manager**.
  2. In **API Administration** , click the name of the API to which you want to apply a policy.
  3. From the side navigation panel, click **Policies**.
  4. Click the **Outbound policies** tab.
  5. Click **+ Add outbound policy**.
  6. Select the **Upstream** to which you want to apply a policy.
  7. If you want to apply the policy to an additional upstream, click **Add upstream** and select the additional upstream. Repeat this step for all upstreams to which you want to apply the policy.
  8. Click **Next**.
  9. Select the policy to apply.
  10. Configure the required parameters.
For policy configuration parameters, see Outbound Policies Directory.
  11. If necessary, configure **Advanced options**.
  12. Click **Apply**.


You can apply a policy to the entire upstream by default, or to specific methods and resources of the upstream.
## See Also
  * Flex Gateway Overview
  * Getting Started with Self-Managed Flex Gateway
Azure Event Hubs Connector 1.2 XML and Maven Support | MuleSoft Documentation
# Azure Event Hubs Connector 1.2 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/azure-event-hubs
http://www.mulesoft.org/schema/mule/azure-event-hubs/current/mule-azure-event-hubs.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:azure-event-hubs="http://www.mulesoft.org/schema/mule/azure-event-hubs"
	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/azure-event-hubs
  http://www.mulesoft.org/schema/mule/azure-event-hubs/current/mule-azure-event-hubs.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-azure-event-hubs-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 event hubs`.
  4. Select the connector.
  5. Click **Dependency Snippets** near the upper right of the screen.


## See Also
  * Introduction to Anypoint Connectors
  * MuleSoft Help Center
Salesforce Composite Connector 2.10 | MuleSoft Documentation
# Salesforce Composite Connector 2.10
Anypoint Connector for Salesforce Composite enables you to work with the Salesforce Batch and SObject Tree APIs. The connector exposes convenient methods for preparing subordinate requests, executing them in one batch, and parsing the results.
Salesforce Composite Connector also enables you to create SObject trees by using the **Create sobject tree** operation, which is separate from the batch operations.
This connector provides DataSense for execution and to:
  * Prepare subordinate requests and then parse the responses
  * Create SObject trees


For compatibility information and fixed issues, see Salesforce Composite Connector Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
  * The Salesforce Composite API
  * Anypoint Connectors
  * Mule runtime engine (Mule)
  * Elements and global elements in a Mule flow
  * Creating a Mule app using Anypoint Studio (Studio)


Before creating an app, you must have:
  * Credentials to access the Salesforce Composite target resource
  * Anypoint Studio version 7.0 or later


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


For information about configuring these authentication types, see Using Anypoint Studio to Configure Salesforce Composite Connector.
## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * MuleSoft Help Center
Exclude Fields from the Output | MuleSoft Documentation
# Exclude Fields from the Output
This DataWeave example excludes specific XML elements from the output. You might perform a task like this to remove sensitive data.
The example uses these functions:
  * `-` to remove specific `key:value` pairs (here, the `ssn` and `password` XML elements).
  * `mapObject` to go through the XML elements.


DataWeave Script:
```
%dw 2.0
output application/xml
---
users: {
   (payload.users mapObject {
    user: {
    personal_information: $.personal_information - "ssn",
    login_information: $.login_information - "password"
    }
   })
}
```

Input XML Payload:
```
<users>
  <user>
    <personal_information>
      <first_name>Emiliano</first_name>
      <middle_name>Romoaldo</middle_name>
      <last_name>Lesende</last_name>
      <ssn>001-08-84382</ssn>
    </personal_information>
    <login_information>
      <username>3miliano</username>
      <password>mypassword1234</password>
    </login_information>
  </user>
  <user>
    <personal_information>
      <first_name>Mariano</first_name>
      <middle_name>Toribio</middle_name>
      <last_name>de Achaval</last_name>
      <ssn>002-05-34738</ssn>
    </personal_information>
    <login_information>
      <username>machaval</username>
      <password>mypassword4321</password>
    </login_information>
  </user>
</users>
```

Output XML:
```
<?xml version="1.0" encoding="UTF-8"?>
<users>
 <user>
  <personal_information>
   <first_name>Emiliano</first_name>
   <middle_name>Romoaldo</middle_name>
   <last_name>Lesende</last_name>
  </personal_information>
  <login_information>
   <username>3miliano</username>
  </login_information>
 </user>
 <user>
  <personal_information>
   <first_name>Mariano</first_name>
   <middle_name>Toribio</middle_name>
   <last_name>de Achaval</last_name>
  </personal_information>
  <login_information>
   <username>machaval</username>
  </login_information>
 </user>
</users>
```

## Related Examples
  * Output a Field When Present
  * Change the Value of a Field
  * Conditionally Reduce a List through a Function


## See Also
  * DataWeave Selectors
  *
Monitoring in Local Mode | MuleSoft Documentation
# Monitoring in Local Mode
Flex Gateway running in Local Mode enables you to monitor APIs independent of Anypoint Platform. Using declarative configuration files, you configure Flex Gateway to deliver logs to different Fluent Bit outputs.
Refer to the following tasks for details about monitoring in Local Mode:
  * Configure External Logs for Flex Gateway in Local Mode - Configure log output for Fluent Bit output types. Output types include `File`, `HTTP`, and `Splunk`.
  * View Standard Output Logs - View Flex Gateway standard output logs. Quickly verify the status of external services and API requests.
asExpressionString | MuleSoft Documentation
# asExpressionString
## asExpressionString(path: Path): String
Transforms a `Path` value into a string representation of the path.
_Introduced in DataWeave version 2.2.2._
### Parameters
Name | Description  
---|---  
The `Path` value to transform into a `String` value.  
### Example
This example transforms a `Path` value into a `String` representation of a selector for an attribute of an object.
#### Source
```
%dw 2.0
import * from dw::util::Tree
output application/json
---
asExpressionString([
    {kind: OBJECT_TYPE, selector: "user", namespace: null},
    {kind: ATTRIBUTE_TYPE, selector: "name", namespace: null}
  ])
```

#### Output
```
".user.@name"
```
Runtime Fabric Kubernetes Permissions | MuleSoft Documentation
# Runtime Fabric Kubernetes Permissions
To enable Runtime Fabric Kubernetes permissions, review the following topics.
  * Runtime Fabric Core Software Kubernetes Permissions Review the Kubernetes resource access permissions required by the Runtime Fabric agent.
  * Enabling RTFCTL Kubernetes Permissions Enable specific role permissions over Kubernetes resources to successfully run `rtfctl` commands.
  * Mule App Deployments Kubernetes Permissions on Runtime Fabric Review Mule app deployment Kubernetes permissions configuration.


## See Also
  * Configuring Kubernetes for Runtime Fabric
Troubleshoot Transit Gateway Attachments | MuleSoft Documentation
# Troubleshoot Transit Gateway Attachments
These are some of the possible errors you might encounter when attempting to attach to a transit gateway.
## Unable to Attach to a Transit Gateway
If you see the `Resource Share Not Found` error when attempting to attach to the transit gateway:
  1. Verify that the **ID** and **Owner** values that you specified are correct.
  2. Verify that the region matches the transit gateway region.
  3. Click the pencil icon to edit these values.


## Unable to Delete a Transit Gateway
If the **Transit Gateways** page doesn’t list any VPCs, but you can’t delete the transit gateway and you see the `Can’t remove this transit gateway` error, the transit gateway might be attached to a VPC that belongs to another business group that you don’t have access to.
## Unable to View a Transit Gateway
Runtime Manager always adds transit gateways at the root business group level. To view a transit gateway, you need CloudHub Network Viewer permission.
## Unable to Modify a Transit Gateway
To modify a transit gateway, you need CloudHub Network Admin permission.
## Transit Gateway Status is Unknown
If the status for the transit gateway is `Unknown`, the resource share on AWS has been either disabled or deleted.
Click the **View on AWS** button on the **Transit Gateways** page to resolve the issue on AWS:
## VPC Attachment Rejected
If you see the `The attachment was rejected in AWS` error when attempting to attach the VPC to the transit gateway, remove the VPC and reattach it.
See Remove an Anypoint VPC from the Transit Gateway.
## Subnet Already Added to the Route Table
If you see the `This subnet has already been added to this route table` error, add a different subnet to the table.
## Invalid CIDR Subnet
If you see the `Please enter a single subnet in CIDR notation` error, check that the subnet is in the correct CIDR format.
## Attach VPC Button Is Disabled
If the **Attach VPC** button is disabled, all the VPCs you have access to are already attached to the transit gateway.
## Connections Limit Has Been Reached
If you see an error such as `Connections limit has been reached (max=4, used=4) for the organization`, you have consumed all your network connections entitlements (VPC/VPN licenses). Contact your account team to purchase additional licenses.
## See Also
  * Remove a Route from the Transit Gateway Route Table
  * Add a Route to the Transit Gateway Route Table
  * Troubleshoot VPC attachment creation in the AWS documentation
Recalculate Excel File | MuleSoft Documentation
# Recalculate Excel File
The Recalculate Excel File action step can be used to recalculate an Excel sheet. If a value has subsequently changed, the values in the Excel sheet are updated. To be able to continue working with the new values, they must be read out again with the _Read from Excel File_ action step.
With the action step Recalculate Excel File you can determine exactly where a recalculation should take place in the Workflow.
The recalculation is documented in the Workflow Run Results.
The _Read from Excel File_ action step can only be used inside an Excel Session. Specify the source and destination file in the Excel Session.
Please note the operation mode that you have selected in the Excel session:
  * **Read and write to the same file** The recalculation is performed on the selected Excel sheet.
  * **Read from source and write to different file** The recalculation is only performed in the selected destination file.
  * **Read only** The action step cannot be executed in Read only mode.


## Properties
**Excel Operation Settings**
  * **Sheet name** Name of the spreadsheet. In the properties, you can only enter the name directly. In the wizard, however, you can select the spreadsheet directly or via the pin variable.


## Inbound Variables
  * **Sheet name** Name of the spreadsheet. In the properties, you can only enter the name directly. In the wizard, however, you can select the spreadsheet directly or via the pin variable.


**Apply calculation to** Here you specify which part of the Excel file is to be included in the recalculation.
  * **Whole Workbook** (default) The entire workbook is recalculated.
  * Or you can select a specific spreadsheet from the list.


## Outbound Variables
The action step _Recalculate Excel File_ possesses no outbound variables.
Component Authorization Using Spring Security | MuleSoft Documentation
# Component Authorization Using Spring Security
Learn how to configure authorization using Spring Security features on your Mule components, so that users with different roles can only invoke certain methods.
## Configure Spring Security Authentication Manager
The Spring Security interface Authentication Manager is responsible for passing requests through a chain of Authentication Provider objects. To secure calls to flow components, you must add the configured `authenticationManager` to the application context.
The following example defines roles with different levels of access to protected processors:
```
 <ss:authentication-manager alias="authenticationManager">
  <ss:authentication-provider>
   <ss:user-service id="userService">
    <ss:user name="admin" password="admin" authorities="ROLE_ADMIN" />
    <ss:user name="joe" password="secret" authorities="ROLE_ADMIN" />
    <ss:user name="anon" password="anon" authorities="ROLE_ANON" />
    <ss:user name="user" password="password" authorities="ROLE_ANON" />
    <ss:user name="ross" password="ross" authorities="ROLE_ANON" />
    <ss:user name="marie" password="marie" authorities="ROLE_ANON" />
   </ss:user-service>
  </ss:authentication-provider>
 </ss:authentication-manager>
```

The following example references the previously defined `authenticationManager` to allow only users with `ROLE_ADMIN` roles in the `requiredAuthorities` field to access the operation:
```
	<spring:security-manager>
		<spring:delegate-security-provider name="memory-provider" delegate-ref="authenticationManager" />
	</spring:security-manager>
	<flow name="protectedFlow">
		<http:listener doc:name="Listener" config-ref="HTTP_Listener_config" path="/" />
		<http:basic-security-filter doc:name="Basic security filter" realm="mule" />
		<spring:authorization-filter requiredAuthorities="ROLE_ADMIN" />
		<ee:transform doc:name="Transform Message">
			<ee:message>
				<ee:set-payload><![CDATA[%dw 2.0
				output application/json
				---
				{
					"status": "ok"
				}]]>
				</ee:set-payload>
			</ee:message>
		</ee:transform>
	</flow>
```

## Configure Secure Components in Asynchronous Systems
Spring Security is useful for asynchronous systems because to set the authentication on more than one thread you have to add a security property to the security provider. In the following example, the value `MODE_GLOBAL` is the security property added:
```
  <mule-ss:security-manager>
    <mule-ss:delegate-security-provider name="memory-dao" delegate-ref="authenticationManager">
      <mule-ss:security-property name="securityMode" value="MODE_GLOBAL"/>
    </mule-ss:delegate-security-provider>
  </mule-ss:security-manager>
```
Getting Started with API Management on Anypoint Platform | MuleSoft Documentation
# Getting Started with API Management on Anypoint Platform
API management on Anypoint Platform is a collection of new and existing products that accelerate application delivery and combat API sprawl by managing and securing any API, built and deployed anywhere. You can start anywhere in this end-to-end API lifecycle journey: design and build, discover, manage and secure, govern, and create engaging digital experiences.
The end-to-end API lifecycle journey for API management consists of various tasks, each with links to relevant content to assist you in completing them.
What Is API Management? API management is the process of creating, publishing, and overseeing application programming interfaces (APIs) in a secure and scalable environment. API management helps ensure that APIs are reliable, secure, and easy to use, which can lead to better developer experiences and more successful applications.
  * Anypoint Platform API Management

|  Design and Build Implement APIs with any system.
  * Design API Specs and Fragments
  * Create and Import API Specs
  * Publish API Specs and Fragments to Exchange
  *   *   *   * Anypoint Code Builder: Quick Look

|  Enable your developer community to discover your APIs anywhere automatically along with relevant metadata and documentation.
  *   *   * Test an API Using Simulated Data
  * Discover and Catalog Any API

  
---|---|---  
Ensure consistent API quality and security by applying governance rules to your APIs as part of the API lifecycle.
  * Apply Rulesets to Identified APIs
  * Create Custom Governance Rulesets
  * Govern APIs for Security Teams
  * Govern API Specs for Developers
  * Govern API Policy Instances for Developers
  * Govern Your APIs Using API Governance

|  Manage and Secure Control and secure access to any API.
  *   * Apply Automated Policies
  * Secure and Govern Flex Gateway APIs
  *   * Monitor Your API with Monitoring Metrics
  *   * Control and Manage Any API
  * Product Spotlight: Flex Gateway
  * Friends of Max Overview: Flex Gateway

|  Create custom API portals to engage with your ecosystem of API consumers and producers.
  *   *   *   *   * Engage Developers to Set Up API Ecosystems

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


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


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


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


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


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


## Next Step
After you complete the prerequisites and experiment with templates and examples, you are ready to create an app with Anypoint Studio.
## See Also
  * Introduction to Anypoint Connectors
  * Use Anypoint Exchange to Discover Connectors, Templates, and Examples
  * ServiceNow Connector Release Notes
  * ServiceNow Connector on Exchange
  * MuleSoft Help Center
index | MuleSoft Documentation
# index
## index(index: Number): PathElement
This function creates a `PathElement` data type to use for selecting an _array element_ and populates the type’s `selector` field with the specified index.
Some versions of the `update` and `mask` functions accept a `PathElement` as an argument.
_Introduced in DataWeave version 2.2.2._
### Parameters
Name | Description  
---|---  
The index.  
### Example
This example creates an selector for a specified index. It sets the selector’s value to `0`. In the output, also note that the value of the `"kind"` key is `"Array"`.
#### Source
```
%dw 2.0
output application/json
import * from dw::util::Values
ns ns0 http://acme.com/foo
---
index(0)
```

#### Output
```
{
  "kind": "Array",
  "namespace": null,
  "selector": 0
 }
```
System Properties | MuleSoft Documentation
# System Properties
You can use system properties to specify or override property placeholder values that a connector or component in a Mule app uses. MuleSoft recommends this practice when you are deploying your app to a new environment and need to override values in configuration property files for your Mule app.
You can manage system properties in these ways:
  * From Anypoint Studio through the Run Configurations window for the project.
  * From the command line for a standalone Mule instance.


## Set System Properties in Anypoint Studio
You can add properties when you launch your project through the Package Explorer in Studio:
  1. Right-click the project for your Mule app in Package Explorer.
  2. Click **Run As** → **Run Configurations**.
  3. Pick the **Arguments** tab.
  4. Add your arguments to the **VM Arguments** field, prepending the property names with `-D`
When you deploy your app through Studio, the new values for property placeholders will take precedence over other values set for those placeholders:
```
<logger message="${propertyFromJVMArg}" doc:name="System Property Set in Studio through JVM args"/>
```



## Set System Properties for On-Premises Deployments
For On-premises Mule instances, you can set and change system properties from the command line or define them in the `wrapper.conf` file.
### Set System Properties when Starting Mule
Append `-M-Dmule.<variable-name>=<value>` to the `mule` or `mule start` command to set a system property. Replace `<variable-name>` with your desired property name. Replace `<value>` with the value to define for the property.
The following example starts Mule and defines two properties with different values:
```
$ mule start -M-Dmule.myEnv=prod -M-Dmule.myValue=1234
```

### Set System Properties in the wrapper.conf File
Add `wrapper.java.additional.<n>` entries to the `wrapper.conf` file in the `${MULE_HOME}/conf` directory, prepending property names with `-D`.
For example, to set Mule encoding, add the following line to the Wrapper configuration file:
```
wrapper.java.additional.999=-Dmule.encoding=ISO-8859-1
```

#### Considerations for Adding System Properties
  * Ensure that the new property entry number is not in use.
If you add `wrapper.java.additional.<n>` entries to the configuration file, always change each instance of to a new number that is not used, otherwise, Java does not parse the properties correctly.
  * Use values outside the sequence for properties in an include file.
If you add `wrapper.java.additional.<n>` entries in an include file, configure a high value to ensure that the numeric values of the properties are outside the standard sequence. Also, ensure that the `wrapper.ignore_sequence_gaps` property is set to `true`. For example:
```
wrapper.java.additional.1900=-Dprop=value1
wrapper.java.additional.1901=-DotherProp=value2
wrapper.ignore_sequence_gaps=TRUE
```



## See Also
  * Mule Configuration Properties
Installing API Catalog CLI | MuleSoft Documentation
# Installing API Catalog CLI
You must install API Catalog CLI before running the commands.
## Before You Begin
  * Download and install the latest LTS version of NodeJS and npm (node package manager) on your system. See the NodeJS download page.


## Install the CLI:
To install the CLI:
  * Run the following command from your terminal:


```
npm install -g api-catalog-cli@latest
```

The install command might give warning messages about the version of npm because the API Catalog CLI installation package is built using npm version 14. You can ignore these messages.   
---  
If your installation from npm runs for a long time and does not complete successfully, work with your security administrator to ensure that your system allows you to successfully install from npm.   
---
Introduction to Mule 4: Studio 7 | MuleSoft Documentation
# Introduction to Mule 4: Studio 7
Before learning about what’s new in Mule 4, you should install and familiarize yourself with Studio 7. It is the development environment for Mule 4 applications. Beyond support for Mule 4, it includes many new productivity improvements. Note that Studio 7 does not support opening Mule 3 applications.
## New Mule Palette
When using the Studio 6 palette, finding the right operation was a multi-step process: you had to find the connector, drag it onto the canvas, then search for an operation. To speed this process, Studio 7 provides a two-level palette that improves access time, discoverability, and categorization. You can search directly for a connector operation and easily add commonly used operations to your Favorites.
Managing your connectors and modules has also improved. In Studio 7, you can explicitly add versions of connectors to your project, which makes the palette specific to your project. As a result, you no longer have to see connectors or modules you are not using.
## Managing Dependencies, Automatic Maven Integration
In previous versions of Studio, every Mule module was an Eclipse plugin that required installation through an "update site" mechanism. Now, every module is simply a project dependency, managed by Maven. This means that you no longer have to deal with huge “update sites,” plugin installations, or plugin versions. Studio will automatically add Maven dependencies to the ‘pom.xml’ file and keep track of them for you.
If you don’t know Maven, don’t worry, Studio will manage Maven for you automatically by creating a default `pom.xml` file for every project.
## Navigating to XML View
You can now navigate quickly to the XML from the visual view:
  * Simply right-click on any component, and select Go to XML.


## Anypoint Platform Account Management
In every operation related to the Platform, you’ll see a quick-change toolbar that allows you to change accounts and if applicable, the business group. You can also add accounts from the toolbar.
For example, when creating a new Mule project (File > New > Mule Project), if you select an API implementation from Design Center, the toolbar displays at the top of the selection dialog:
Similarly, if you select Search in Exchange from the Mule Palette, the toolbar displays in a slightly different form:
## Metadata Storage
Mule 4 applications contain an `application-types.xml` file, which is where metadata around your data types is stored. For example, if you create a new CSV type, that metadata will be added to this file. This new file is easy to share, commit, and merge when conflicts arise, which enables you to do more metadata-driven development.
## Other Improvements
  * A new set of graphic icons for better usability.
  * A watermark text that will always display the operation name (such as, Select or Delete) when you change the default Display Name of the operation. This change provides you with better visibility.
  * Collapsible flows with interactive preview.