BassemE/mulesoft-documentation-embeddings huggingface dataset:
Monitoring Applications Deployed to Runtime Fabric | MuleSoft Documentation
# Monitoring Applications Deployed to Runtime Fabric
Anypoint Runtime Fabric provides customers with varying observability solutions depending on their needs.
## Anypoint Monitoring
Anypoint Monitoring provides access to log data for applications deployed to Runtime Fabric. To access logs with Anypoint Monitoring, you need the Anypoint Integration Advanced package or a Titanium subscription to Anypoint Platform.
For metrics and logs to be sent to Anypoint Monitoring, outbound network connectivity must be available, as described in Using Anypoint Monitoring.
## Export Telemetry Externally
You can export telemetry externally by using a Log4j appender to integrate your logging system with applications deployed to Runtime Fabric. For information about configuring `log4j2.xml`, refer to the Use Log4j Appender documentation.
Updated message flow configuration does not take effect on the runtime B2B integration applications | MuleSoft Documentation
# Updated message flow configuration does not take effect on the runtime B2B integration applications
As you continue to use Anypoint Partner Manager, you might need to update the configuration associated with a previously deployed message flow. For example, after updating the configuration, you still find your message flow executing with the previous or older set of configurations.
## Causes
Any of the following can lead to this type of error:
  * You might have not deployed the message flow after making changes to the message flow’s configuration.
  * You might be within the five-minute synchronization window for changes from Anypoint Partner Manager to reflect on your B2B integration applications.


## Solutions
You can deploy the changed message flow or wait for the synchronization window to complete.
### Deploy the Changed Message Flow
After you make changes to the message flow configuration, you must deploy it in order for the new configurations to become effective on your B2B integration applications.
To deploy your message flow after making changes:
  1. From within your Anypoint Partner Manager environment (either Sandbox or Production), select your <Hostname> profile.
  2. Select **Message Flows**.
  3. Search for your message flow by name.
  4. After you locate the message flow, click on the message flow card to open it.
  5. Confirm that each section in the flow shown in the interface displays a green checkmark next to it, and click Deploy to deploy the configurations to Mule.
  6. Provide the necessary reason to trigger a new deployment, and wait for the process to complete.


When the deployment is successfully completed, Anypoint partner manager responds with a successful notification.
### Wait for the Synchronization Window to Complete for All Changes
Your runtime B2B integration applications executing on your Mule runtimes receive the latest configuration from the Anypoint Partner Manager control plane at five-minute intervals.
Depending on when you made the configuration changes to your message flows in Partner Manager and deployed them, your changes can take up to five minutes to take effect on the runtime.
Configuring Command Autocompletion | MuleSoft Documentation
# Configuring Command Autocompletion
The `api-catalog-cli autocomplete` command enables you to configure completion for API Catalog CLI commands.
To configure command autocompletion:
  * If you are using a Bash shell:
    1. Run `api-catalog autocomplete bash`. This creates a cache and displays configuration and test instructions.
    2. Follow the instructions that are displayed by the command:
```
1) Add the autocomplete env var to your bash profile and source it
$ printf "eval $(api-catalog autocomplete:script bash)" >> ~/.bashrc; source ~/.bashrc
NOTE: If your terminal starts as a login shell you may need to print the init script into ~/.bash_profile or ~/.profile.
2) Test it out, e.g.:
$ api-catalog <TAB><TAB>         # Command completion
$ api-catalog [command] --<TAB><TAB>    # Flag completion
```

  * If you are using a Z shell:
    1. Run `api-catalog autocomplete zsh`. This creates a cache and displays configuration and test instructions.
    2. Follow the instructions that are displayed by the command:
```
1) Add the autocomplete env var to your zsh profile and source it
$ printf "eval $(api-catalog autocomplete:script zsh)" >> ~/.zshrc; source ~/.zshrc
NOTE: After sourcing, you can run `$ compaudit -D` to ensure that no permissions conflicts are present
2) Test it out, e.g.:
$ api-catalog <TAB>         # Command completion
$ api-catalog [command] --<TAB>    # Flag completion
```



## api-catalog autocomplete
```
$ api-catalog autocomplete [flags]
```

This command accepts the following flags:
Flag | Description  
---|---  
Displays instructions for configuring autocompletion  
Installs autocompletion using Bash shell settings  
Installs autocompletion using Z shell settings  
-r, --refresh cache |  Removes the current autocompletion configuration. Use this before running the command with a different shell type.  
**Examples**
```
$ api-catalog autocomplete
$ api-catalog autocomplete bash
$ api-catalog autocomplete zsh
$ api-catalog autocomplete --refresh-cache
```

The API Catalog CLI autocomplete plugin is not currently supported in Windows.   
---
API Governance Console Overview | MuleSoft Documentation
# API Governance Console Overview
View a summary of your governance usage and API conformance status information to more easily monitor your organization’s API conformance.  
---  
View, filter, search, and take action on a summary list of your active and draft governance profiles or your governed APIs.  
Export conformance reports in CSV format.  
Create a profile and save it as draft or active.  
View the comprehensive governance report for an API.  
Select from the more options menu to take relevant actions. You can export reports for a selected profile or API, view, edit, or delete a profile, notify API owners, or open an API in Exchange.
DataWeave Overview | MuleSoft Documentation
# DataWeave Overview
DataWeave is a programming language designed by MuleSoft for accessing and transforming data that travels through a Mule application. Mule runtime engine incorporates DataWeave in several core components like Transform and Set Payload, which enable you to execute DataWeave scripts and expressions in your Mule app.
DataWeave scripts act on data in the Mule event. Most commonly, you use it to access and transform data in the message payload. For example, after a component in your Mule app retrieves data from one system, you can use DataWeave to modify and output selected fields in that data to a new data format, then use another component in your app to pass on that data to another system.
  * To get started with DataWeave 2.4.0 for Mule runtime engine (Mule) version 4.4 and later, visit the quickstart.
  * To learn more about DataWeave, visit the language guide.
  * To look up reference information about DataWeave 2.4.0 operators and functions, visit the reference guide.


## Compatibility
The following table specifies which version of DataWeave is bundled with each Mule runtime engine release:
Mule Version | DataWeave Version  
---|---  
## See Also
Use Different Environments in Runtime Manager | MuleSoft Documentation
# Use Different Environments in Runtime Manager
Private Cloud Edition  Runtime Fabric 
Anypoint Platform enables you to create and use different environments, such as production, QA, or Dev, to manage your deployments. Regardless of the deployment option you use, you deploy an application into a specific environment.
Servers and applications are always associated with a particular environment and are visible only from within the environment where they are created. Each environment requires a different set of permissions, enabling you to divide roles clearly between the different teams of your organization.
After an application is tested in a sandbox environment and is ready for production, you can promote it directly to a production environment, without uploading the application again.
## Switch Environments Using Runtime Manager
If you have multiple environments in your organization, you can switch between them. From any application in Anypoint Platform, you can switch to a different environment.
  1. Click the current environment in the top left corner of Runtime Manager.
  2. Select the environment to which you want to switch.
  3. Click **Switch**.


## See Also
  *   * Deploy to Your Servers
  * Servers, Server Groups, and Clusters
  * Manage Deployed Applications
Trigger a Flow When a New File Is Created or Modified Example | MuleSoft Documentation
# Trigger a Flow When a New File Is Created or Modified Example
Anypoint Connectors for File, FTP, and SFTP provide an **On New or Updated File** operation that polls a directory for files that have been created or updated. A message is generated for each file that is found.
The following strategies determine that a file is new:
  * Set the **Auto delete** field to **True** to delete each file after it is processed, which causes all files obtained in the next poll to be considered new.
  * Set the **Move to directory** field to move each file to a different directory after it is processed, which achieves the same effect as **Auto delete** but without erasing the file.
  * Set the **Watermark** field to pick only files that have been created or updated after the last poll was executed.


You can also use a matcher for additional filtering of files.
## Configure the On New or Updated File Operation in Studio
To add and configure the **On New or Updated File** operation in Studio, follow these steps:
  1. In the **Mule Palette** view, search for `sftp` and select the **On New or Updated File** operation.
  2. Drag the **On New or Updated File** operation onto the Studio canvas.
  3. In the **General** tab of the operation configuration screen, click the plus sign (**+**) next to the **Connector configuration** field to access the global element configuration fields.
  4. Specify the connection information and click **OK**.
  5. Set the **Directory** field to the directory path on which pooled files are contained, for example, `test-data/in`.
  6. Set the **Auto delete** field to **True**.
  7. Select the **Watermark** field to enable watermarking.


In the **Configuration XML** editor, the `<sftp:listener>` configuration looks like this:
```
<flow name="onNewFile">
  <sftp:listener config-ref="file" directory="test-data/in" autoDelete="true" watermarkEnabled="true">
   <scheduling-strategy>
    <fixed-frequency frequency="1000"/>
   </scheduling-strategy>
  </sftp:listener>
  <flow-ref name="processFile" />
</flow>
```

## See Also
  * SFTP Connector Examples
  * MuleSoft Help Center
Removing APIs from the Unified Schema | MuleSoft Documentation
# Removing APIs from the Unified Schema
You can remove APIs from the unified schema as needed. For example, remove an API to add a new version, or remove an API if the underlying REST API no longer exists.
However, be aware that when you remove an API from the unified schema, you break:
  * Any merges and links with the types in the API schema that you remove
  * Any existing queries that query the types and fields of the API schema that you remove


To remove an API:
  1. Click **List of APIs added** and select the API that you want to remove.
  2. Click **Remove API** , and then click **Apply Changes**.


## Additional Resources
  * DataGraph Status Overview
  * Edit Your API Schema to Add It to the Unified Schema
Configure General Settings | MuleSoft Documentation
# Configure General Settings
This topic is affected by the Anypoint Platform integration.
If you use an RPA account to login to RPA Manager, refer to the **Organization Management** documentation.
The **General** tab in the **Admin Settings** view enables you to configure the currency and decimal sign to show in RPA Manager modules.
## Before You Begin
  * Ask an organization administrator in Access Management to assign you the required permissions:
Action | RPA Permission | Deprecated RPA Permission  
---|---|---  
View configured settings for your organization. | RPA Administrator | Organization Management Open  
Add or modify settings for your organization. | RPA Administrator | Organization Management Administration  


## Configure Currency and Decimal Sign
To configure the currency and decimal sign to show in RPA Manager modules:
  1. In the **Settings** module, click **Admin Settings**.
  2. Ensure that you are in the **General** tab.
  3. Configure the following values:
     * **Currency**
The currency symbol that RPA Manager shows in modules and dashboards.
     * **Decimal Sign**
The decimal sign that RPA Manager uses to show fractional numbers in modules and dashboards.
  4. Click **Save**
SAP S/4HANA SOAP Cloud Connector - Get Started | MuleSoft Documentation
# SAP S/4HANA SOAP Cloud Connector - Get Started
SAP S/4HANA SOAP Cloud Connector v2.0
Anypoint Connector for SAP S/4HANA SOAP Cloud (SAP S/4HANA SOAP Cloud Connector) provides full support for the SOAP APIs exposed by S/4HANA Cloud ERP. This connector enables you to automatically discover SOAP services enabled on your SAP S/4HANA instance and to invoke the SOAP service and associated operations.
For software requirements and compatibility information, see the SAP S/4HANA SOAP Cloud Connector Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
  * The SAP S/4HANA SOAP 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 SOAP target resource
  * Anypoint Platform
  * Anypoint Studio 7.3 or later
  * Have a developer account or other valid SAP S4HANA instance


## Audience
  * New user To create your Mule app, see Studio Configuration. The Examples topic provides one or more use cases for using the connector.
  * Power user Read the XML and Maven Support and Examples topics.


## Common Use Cases For the Connector
Send an XML request to SAP S/4HANA’s SOAP API and print a response.
## Using 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 SOAP Cloud Connector Release Notes
  * SAP S/4HANA SOAP Cloud Connector on Exchange
  * MuleSoft Help Center
isEmpty | MuleSoft Documentation
# isEmpty
## isEmpty(elements: Array<Any>): Boolean
Returns `true` if the given input value is empty, `false` if not.
This version of `isEmpty` acts on an array. Other versions act on a string or object, and handle null values.
### Parameters
Name | Description  
---|---  
The input array to evaluate.  
### Example
This example indicates whether the input array is empty.
#### Source
```
%dw 2.0
output application/json
---
[ isEmpty([]), isEmpty([1]) ]
```

#### Output
```
[ true, false ]
```

## isEmpty(value: String): Boolean
Returns `true` if the input string is empty, `false` if not.
### Parameters
Name | Description  
---|---  
A string to evaluate.  
### Example
This example indicates whether the input strings are empty.
#### Source
```
%dw 2.0
output application/json
---
[ isEmpty(""), isEmpty("DataWeave") ]
```

#### Output
```
[ true, false ]
```

## isEmpty(value: Object): Boolean
Returns `true` if the given object is empty, `false` if not.
### Parameters
Name | Description  
---|---  
The object to evaluate.  
### Example
This example indicates whether the input objects are empty.
#### Source
```
%dw 2.0
output application/json
---
[ isEmpty({}), isEmpty({name: "DataWeave"}) ]
```

#### Output
```
[ true, false ]
```

## isEmpty(value: Null): true
Returns `true` if the input is `null`.
### Parameters
Name | Description  
---|---  
`null` is the value in this case.  
### Example
This example indicates whether the input is `null`.
#### Source
```
%dw 2.0
output application/json
---
{ "nullValue" : isEmpty(null) }
```

#### Output
```
{ "nullValue": true }
```
Troubleshooting ServiceNow Connector 6.17 | MuleSoft Documentation
# Troubleshooting ServiceNow Connector 6.17
To troubleshoot Anypoint Connector for ServiceNow (ServiceNow Connector), become familiar with the information about interpreting commonly thrown exception messages.
## Enable Verbose Exception Logging
Enable verbose exception logs to show a complete stack trace of the error instead of the default truncated output:
  1. In Studio, right-click on the project and select **Run > Run Configurations**.
  2. Go to the **Arguments** tab and append the arguments in the **VM arguments** section to add the `mule.verbose.exceptions` property. For example:
`-XX:PermSize=128M -XX:MaxPermSize=256M -Dmule.verbose.exceptions=true`


## Enable Verbose Logging
To get a better understanding of why an application’s interaction with ServiceNow Connector is failing, temporarily enable verbose logging for the connector.
Remember to always disable enhanced verbosity after troubleshooting, because it can affect your Mule application’s performance.
To enable verbose logging in the configuration file:
  1. Access Anypoint Studio and navigate to the **Package Explorer** view.
  2. Open your application’s project name.
  3. Open the `src/main/resources` folder.
  4. Open the `log4j2.xml` file inside the folder.
  5. Add an `<AsyncLogger>` tag inside the `<Loggers>` tag:
```
			<Loggers>
				...
				<AsyncLogger name="com.mulesoft.connectors.servicenow" level="DEBUG"/>
				...
			</Loggers>
```

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


## Understand Commonly Thrown Exceptions
Here is a list of commonly thrown exception messages and how to interpret them:
  * SERVICENOW:BAD_REQUEST
```
The request is incorrect, for example, there are invalid input headers or the service does not exist.
```

  * SERVICENOW:CANNOT_DISPATCH
```
An error occurs when sending the request.
```

  * SERVICENOW:CONNECTIVITY
```
Either a connection could not be established or there is a connectivity error.
```

  * SERVICENOW:ENCODING
```
There is an encoding error when parsing the request or the response.
```

  * SERVICENOW:INVALID_WSDL
```
The WSDL is invalid or inconsistent.
```

  * SERVICENOW:PROCESSING_ERROR
```
There is a processing error, for example, there is an interruption during initialization.
```

  * SERVICENOW:RETRY_EXHAUSTED
```
The maximum number of retries for the operation is reached.
```

  * SERVICENOW:SOAP_FAULT
```
There is a SOAP fault error.
```

  * SERVICENOW:TIMEOUT
```
A specific request takes longer than the configuration timeout values.
```



## See Also
  * Introduction to Anypoint Connectors
  * ServiceNow Connector Reference
  * MuleSoft Help Center
  *
Adding Schedules | MuleSoft Documentation
# Adding Schedules
You can add a schedule to an existing monitor if either of the following two conditions is true:
  * You plan to run the test associated with the schedule in a public location, and the allocation of schedules for your Anypoint Platform organization is not exhausted.
  * You plan to run the test associated with the schedule in a private location.


## Before You Begin
Ensure that you have the following permission set in Access Management:
  * **Exchange > Exchange Administrator** or **Exchange > Exchange Contributor**


An Anypoint Platform administrator for your organization grants permission. See Manage Permissions.
## Add a Schedule
  1. Select the monitor in which you want to add a schedule.
  2. Click **Add Schedule** from the **Schedules** table.
  3. In the **Add Schedule** dialog box, select the following:
     * The location in which to run the test
     * The monitor schedule interval and its required information:
Interval | Required Information | Definition  
---|---|---  
The minute | The minute at which the test begins, starting 60 minutes after you create the schedule  
The time of each day | The time each day (hour and minutes) at which the test begins  
Day of the week and time of day | The day of the week and the time of that day that initiates the test  
Day of the month and time of day | The day of the month and the time of that day that initiates the test  
Advanced | The cron expression for the frequency of the test.  
  4. Set **Configuration**.
  5. Click **Add**.
The countdown to the first run of the selected test begins.


Specified test times correspond with your time zone.  
---  
## Limits for Schedule Intervals by Location
The minimum interval for schedules that run in private locations is always five minutes.
The minimum interval for schedules that run in public locations depends on the number of schedule entitlements, or API monitor entitlements, that you have. If you have more than five, the limit is five minutes. Otherwise, it is fifteen minutes.
The limit depends on the type of location, not on whether the API is public or private, because you can test a public API from a private location.
Location Type | Number of Entitlements | Account Type | Interval Time Allowed  
---|---|---|---  
5 or less | Developer | 15 minutes  
5 or less | 15 minutes  
More than 5 | Developer | 15 minutes  
More than 5 | 5 minutes  
Any number | 5 minutes  
## Scheduling Long-Running Tests
Tests for a monitor that are run in public locations silently fail when the run time exceeds 120 seconds. If you need longer tests, the best solution is to use a private location, because you can run tests that have a long duration in private locations.
If you want to run longer-running tests in a public location, you can:
  1. Download the monitor and split the tests across multiple monitors using the BAT CLI.
  2. Run and time each test to ensure that their running times are under 120 seconds.
  3. Upload the tests as separate monitors to run in the web UI or run them through BAT CLI.


## See Also
  * Differences in the Monitoring of Public and Private APIs
  *
Types Types (dw::core::Types) | MuleSoft Documentation
# Types Types (dw::core::Types)
Type | Definition | Description  
---|---|---  
Attribute |  `type Attribute = { name: QName, required: Boolean, value: Type }` |  Represents an Attribute definition that is part of an Object field Key. _Introduced in DataWeave version 2.3.0._  
`type Field = { key: { name: QName, attributes: Array<Attribute> }, required: Boolean, repeated: Boolean, value: Type }` |  Represents a Field description that is part of an Object. _Introduced in DataWeave version 2.3.0._  
FunctionParam |  `type FunctionParam = { paramType: Type, optional: Boolean }` |  Represents a Function parameter that is part of a Function type. _Introduced in DataWeave version 2.3.0._  
`type QName = { localName: String, namespace: Namespace | Null }` |  Represents a Qualified Name definition with a `localName` (a string) and a `namespace`. If the QName does not have a Namespace, its value is `null`. _Introduced in DataWeave version 2.3.0._
X12 EDI Connector 2.9 | MuleSoft Documentation
# X12 EDI Connector 2.9
Support Category: Premium
Anypoint Connector for X12 EDI (X12 EDI Connector) enables you to convert X12 messages to and from DataWeave-compatible representations by using lists and maps. All of the schema definitions you need for supported X12 standard transaction sets are included. For complete information about schemas, see X12 EDI Schema Language Reference.
Many Health Insurance Portability and Accountability Act (HIPAA) document versions are also supported, as listed separately in the Supported HIPAA Versions. For more information about HIPAA usage, refer to Connector HIPAA Standards.
## Prerequisites
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:
  * Purchased a MuleSoft license for X12 EDI Connector.
Contact your Account Representative about purchasing a license.
  * Anypoint Studio 7.0 or later


X12 EDI Connector supports files of up to 15 MB in size, and the memory requirement is approximately 40 to 1. For example, a 1 MB file requires up to 40 MB of memory to process, so it’s important to consider this memory requirement in conjunction with your Transactions Per Second (TPS) needs for large X12 files. This is not an exact figure; the value varies according to the complexity of the mapping instructions.   
---  
## Exchange Templates and Examples
Anypoint Exchange provides templates that you can use as starting points for your apps and examples that illustrate a complete solution.
### X12 EDI Connector Templates in Exchange
X12 EDI Connector templates provide starting points that help you:
  * Map application messages to outbound X12 transactions 
  * Map inbound X12 transactions to the application message format
  * Set up your Partner Manager content storage


### X12 EDI Connector Examples in Exchange
X12 EDI Connector examples in Exchange enable you to:
  * Customize an X12 EDI schema for B2B integrations
  * Transform outbound purchase order XML messages to X12 850 transactions
  * Transform inbound X12 850 transactions to JSON purchase orders
  * Transform outbound XML messages into X12 purchase orders, inbound X12 purchase orders into JSON, and generate a functional acknowledgement
  * Implement an end-to-end order to cash workflow from the perspective of a seller
  * Implement an end-to-end B2B procure to pay workflow from the perspective of a buyer


## 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
Modifying Schedules | MuleSoft Documentation
# Modifying Schedules
You can modify a schedule to change:
  * The location at which the test is run
  * The frequency at which to run the test


## Before You Begin
  * Before you run a schedule in a public location, ensure that your Anypoint Platform organization has not reached its maximum number of schedules. When you attempt to create a new monitor, a message displays if no public schedules are available.
  * Ensure that your user ID has the following permission set in Access Management:
    * **Exchange > Exchange Administrator** or **Exchange > Exchange Contributor**


An Anypoint Platform administrator for your organization grants permission. See Manage Permissions.
## Modify a Schedule
Modify a schedule either from the **Schedules** section of a monitor, or from the schedules list.
To modify a schedule from the **Schedules** section of a monitor:
  1. Select the monitor in which you want to modify a schedule.
  2. Find the schedule in the list, click **More** (), and select **Modify Schedule**.
  3. In the **Modify Schedule** dialog, change one or more of the following:
     * The location at which to run the test
     * The frequency at which to run the test
  4. Click **Save**.


To modify a schedule from the schedules list:
  1. Display the list of locations by opening the **Locations manager** dialog in the homepage.
  2. Select the location in which the schedule is running.
  3. Find the schedule in the list, click **More** (), and select **Modify Schedule**.
  4. In the Modify Schedule dialog, change one or more of these items:
     * The frequency at which to run the test
     * The configuration to run the test
  5. Click **Save**.
Changes take place after the current interval elapses. For example, if you change the interval of a schedule from every 15 minutes to every hour and the timer on the monitor shows that there are 5 minutes remaining in the current interval, the new interval goes into effect after the five minutes elapse and the test is run.


## See Also
  * Scheduling Testing and Monitoring
  *
Credential Injection OAuth 2.0 Policy | MuleSoft Documentation
# Credential Injection OAuth 2.0 Policy
**Policy Name** | Credential Injection OAuth 2.0  
---|---  
Injects an OAuth 2.0 authorization header into outgoing requests  
Security  
**First Flex Gateway version available**  
**Returned Status Codes** | No return codes exist for this policy. Error codes are returned from the upstream service.  
## Summary
The Credential Injection OAuth 2.0 policy injects an `Authorization` token from an OAuth 2.0 service into a request as a header. You can use any third-party OAuth 2.0 Identify Provider (IdP), such as Okta, AWS, Azure, or Google Cloud Platform. The policy allows for tokens based on the OAuth 2.0 Authorization Framework to be injected into requests without having to register an external IdP server in Anypoint Platform.
## Configuring Policy Parameters
### Flex Gateway Local Mode
In Local Mode, you apply the policy to your API via declarative configuration files. Refer to the following policy definition and table of parameters:
```
- policyRef:
  name: credential-injection-oauth2-flex
 config:
  oauthService: <string> // REQUIRED
  clientId: <string> // REQUIRED
  clientSecret: <string> // REQUIRED
  scope:
   - <string> // OPTIONAL
  overwrite: <boolean> // OPTIONAL
  tokenFetchTimeout: <number> // OPTIONAL
  allowRequestWithoutCredential: <boolean> // OPTIONAL
```

Parameter | Required or Optional | Default Value | Description  
---|---|---|---  
`oauthService` |  |  URL of the OAuth 2.0 service.  
`clientSecret` |  Client Secret.  
Scopes to include in the token.  
When enabled, the policy overwrites the `Authorization` header with a new authorization token if the header is present.  
`tokenFetchTimeout` |  Time in seconds to wait for the service to return the token.  
`allowRequestWithoutCredential` |  When enabled, if the policy can’t retrieve the token, Flex Gateway still sends the request.  
#### Resource Configuration Example
```
- policyRef:
  name: credential-injection-oauth2-flex
 config:
  oauthService: <https://oauth-server/tokens>
  clientId: id
  clientSecret: secret
  scope:
   - user
  tokenFetchTimeout: 20
  allowRequestWithoutCredential: true
```

### 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:
Parameter | Description | Required?  
---|---|---  
OAuth 2.0 service URL | URL of the OAuth 2.0 service. | Required  
Client ID | Client ID. | Required  
Client secret | Client Secret. | Required  
Scopes to include in the token. | Optional  
Overwrite header | When enabled, the policy overwrites the `Authorization` header with a new authorization token if the header is present. | Required  
Token fetch timeout | Time in seconds to wait for the service to return the token. | Required  
Allow request without credential | When enabled, if the policy can’t retrieve the token, Flex Gateway still sends the request. | Required
Receive Endpoints | MuleSoft Documentation
# Receive Endpoints
Anypoint Partner Manager receive endpoints have the following functions:
  * Receive from Partners endpoints act as source endpoints in inbound message flows that receive B2B messages from partners either directly or via third-party connections.
  * Source at Host endpoints act as source endpoints in outbound message flows that receive messages from backend applications.


Partner Manager supports the following formats for receive endpoints:
  * AS2 (Receive from Partners endpoints only)
  * 

## See Also
  * Creating Endpoints
Amazon S3 Connector 5.8 | MuleSoft Documentation
# Amazon S3 Connector 5.8
Anypoint Connector for Amazon S3 (Amazon S3 Connector) provides connectivity to the Amazon S3 API, enabling you to interface with Amazon S3 to store objects, download and use data with other AWS services, and build applications that require internet storage.
Instant access to the Amazon S3 API enables seamless integrations between Amazon S3 and other databases, CMS applications such as Drupal, and CRM applications such as Salesforce. Use Amazon S3 to store and retrieve any amount of data at any time, from anywhere on the web. You can accomplish these tasks by using the simple and intuitive web interface of the AWS Management Console.
AWS SDK for Java provides a Java API for AWS infrastructure services. The Amazon S3 connector is built using the SDK for Java.
For compatibility information and fixed issues, see the Amazon S3 Connector Release Notes.
For a major release, see Upgrading and Migrating.
## About Connectors
Anypoint connectors are Mule runtime engine extensions that enable you to connect to APIs and resources on external systems, such as Salesforce, Amazon S3, ServiceNow, and Twitter.
## Before You Begin
To use this connector, you must be familiar with:
  * The Amazon S3 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 Amazon S3 target resource
  * Anypoint Platform
  * Anypoint Studio version 7.x or later
  * Amazon Web Services
  * AWS Identity and Access Management (IAM) credentials


For the Amazon S3 operations to work, you need to enable or update the subset of the overall list of actions in the Amazon S3 bucket to specify that the AWS account has access these actions.   
---  
## Common Use Cases for the Connector
The following are common use cases for the Amazon S3 connector:
  * Store an image from a URL on Amazon S3, and then retrieve and display the image.
  * Create an image link in Amazon S3 and update the status in Twitter along with the image link.


For examples, see Examples.
## Authentication Types
Amazon S3 connections use the following authentication types:
  * Basic
Uses a session token provided by Amazon STS to connect to Amazon S3
  * Role
Uses the Amazon role ARN that uniquely identifies the role to allow cross-account access
The Role connection type is supported only for standalone or Runtime Fabric deployments. The Role connection type is not supported for CloudHub deployments.   
---  


For information about configuring these authentication types, see Using Anypoint Studio to Configure Amazon S3.
## 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
Configuring Inbound TLS for Managed Flex Gateway | MuleSoft Documentation
# Configuring Inbound TLS for Managed Flex Gateway
For Managed Flex Gateway deployed on CloudHub 2.0, the CloudHub 2.0 private space manages the inbound TLS.
To configure a TLS context for the private space you’re deploying your Managed Flex Gateway to, see Configuring Domains and Certificates (TLS Context) for a Private Space.
Configuring a TLS context for your private space means all APIs deployed to Managed Flex Gateways in the private space are HTTPS and secure.
To configure outbound TLS context, see Configuring Outbound TLS for Managed Flex Gateway.
Einstein AI Connector 1.2 | MuleSoft Documentation
# Einstein AI Connector 1.2
Anypoint Connector for Einstein AI (Einstein AI Connector) provides connectivity to LLMs via the Salesforce Einstein Trust Layer.
Einstein AI Connector offers a range of advanced features that simplify and enhance AI integration in MuleSoft applications.
Use this connector to:
  * Build AI Agents in a low-code environment
  * Leverage existing investments (APIs, integrations, and templates) as tooling for the AI agents
  * Manage all Large Language Model (LLM) interactions through the Salesforce Einstein Trust Layer
  * Generate vector embeddings to power RAG-based architectures


For information about compatibility and fixed issues, see the Einstein AI Connector release notes.
## Before You Begin
To use this connector, you must be familiar with:
  * Anypoint Connectors
  * Mule runtime engine (Mule)
  * Elements and global elements in a Mule flow
  * How to create a Mule app using Anypoint Code Builder or Anypoint Studio


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


To configure the connector, you must create a Connected App in Salesforce. For more information, see Models API Developer Guide.
## Common Use Cases for the Connector
These are some common use cases for Einstein AI Connector:
  * Enhance customer service by providing case summaries, case classifications, large dataset summaries, and more.
  * Assist sales teams in writing sales emails, summarizing cases for specific accounts, assessing the probability of closing deals, and more.
  * Support marketing teams in generating product descriptions, creating newsletters, planning social media campaigns, and more.
  * Generate embeddings of text data to support sentiment analysis and natural language understanding applications.


## Next Step
After you complete the prerequisites, you are ready to create an app and configure the connector using Anypoint Studio or Anypoint Code Builder.
## See Also
  * Introduction to Anypoint Connectors
  * Using Anypoint Code Builder to Configure a Connector
  * Using Studio to Configure a Connector
  * Einstein AI Connector Reference
  * Einstein AI Connector - Additional Configuration Information
  * MuleSoft Help Center
Upgrading Anypoint Platform PCE v3.2.3 to v4.0.0 | MuleSoft Documentation
# Upgrading Anypoint Platform PCE v3.2.3 to v4.0.0
Before you upgrade Anypoint Platform Private Cloud Edition (Anypoint Platform PCE) to version 4.0, verify that your working installation meets any additional requirements of the new Anypoint Platform PCE version. Note that if your Anypoint Platform PCE version is earlier than version 3.2.3, you must first upgrade to version 3.2.3 and then upgrade to version 4.0.
See the following topics:
  * Anypoint Platform PCE Overview
  * Anypoint Platform PCE Prerequisites


Contact MuleSoft professional services prior to upgrading. MuleSoft professional services must be involved throughout the upgrade process.   
---  
## See Also
  * Anypoint Platform PCE Overview
  * Installing Anypoint Platform Private Cloud Edition (Anypoint Platform PCE)
RPA Recorder Overview | MuleSoft Documentation
# RPA Recorder Overview
Use RPA Recorder to record business processes.
RPA Recorder enables you to:
  * Record actions like mouse clicks, keyboard inputs on your system or on a web browser, and used applications
  * Add comments and variable information during the recording
  * Take screenshots automatically per mouse click, or manually at any time


You can start RPA Recorder either directly from RPA Manager in the design phase, or as a standalone tool without server connection.
  * If started from RPA Manager, RPA Recorder automatically uploads the recorded BPMN process model with the documentation into the server and creates a local PDF with the same information after the recording is finished.
  * If used without server connection, RPA Recorder creates the BPMN and stores it locally.


In either case, RPA Recorder also creates an XES file for further processing in process mining tools.
duration | MuleSoft Documentation
# duration
## duration<T>(valueToMeasure: () -> T): DurationMeasurement<T>
Executes the input function and returns an object with execution time in milliseconds and result of that function.
### Parameters
Name | Description  
---|---  
`valueToMeasure` | A function to pass to `duration`.  
### Example
This example passes a `wait` function (defined in the header), which returns the execution time and result of that function in a `DurationMeasurement` object.
#### Source
```
%dw 2.0
output application/json
fun myFunction() = dw::Runtime::wait("My result",100)
---
dw::util::Timer::duration(() -> myFunction())
```

#### Output
```
{
 "time": 101,
 "result": "My result"
}
```
Exporting an API Instance on API Manager | MuleSoft Documentation
# Exporting an API Instance on API Manager
After creating an API instance, you can export it. This exports the API instance endpoint configuration and Exchange asset relationship. You can then import it into another environment in the same business group to create a new API instance.
The export file is created as follows:
  * File format: ZIP
  * File name format: `{API name}-{version}-{API instance ID}`
  * File size: 100 MB or smaller


The following information is not exported with the API instance:
  * The client provider configuration, which is extracted from the target environment when the API instance is imported.
  * Information stored in the asset such as contracts, policies, and API specifications. To share this, you can promote the API instance in an API group.

  
---  
To export an API instance:
  1. Navigate to **Anypoint Platform** > **API Manager**.
  2. In **API Administration** , click the name of the API you want to export.
  3. Click **Actions** and select **Export API**.
Your API instance is now successfully exported.


## See Also
  *   * Promote API Instances in API Groups
QuickBooks Online Connector 1.0 | MuleSoft Documentation
# QuickBooks Online Connector 1.0
Anypoint Connector for QuickBooks Online (QuickBooks Online Connector) synchronizes data and automates business processes between QuickBooks Online and third-party applications, either on-premises or in the cloud.
QuickBooks Online provides cloud-based accounting software that helps companies manage core business processes, ERP financials, e-commerce, inventory, and more.
For information about compatibility and fixed issues, see the QuickBooks Connector Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
  * The QuickBooks API
  * Anypoint Connectors
  * Mule runtime engine (Mule)
  * Elements and global elements in a Mule flow
  * How to create a Mule app using Anypoint Studio


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


## Common Use Cases For the Connector
Common use cases for QuickBooks Online Connector include the following:
  * Eliminating data staleness and manual entry errors by automatically syncing your ERP data in QuickBooks Online with your accounts and customer data in Salesforce.
  * Reducing cycle times by automating business-critical flows across QuickBooks Online and other cloud-based and on-premises systems.
  * Boosting employee productivity by saving many hours that are otherwise spent keeping your QuickBooks Online system in sync with other applications in your IT stack.


## Connection Types
QuickBooks Online Connector uses the OAuth 2.0 authentication type, which delegates user authentication to the service hosting the user account.
## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * MuleSoft Help Center
Installing RPA Bot | MuleSoft Documentation
# Installing RPA Bot
Before installing RPA Bot, ensure that your environment meets the minimum hardware and software requirements. After downloading and installing the bot, run the RPA Bot Configurator application to configure its connection and default settings.
## Download and Install RPA Bot
Follow these steps to download and install RPA Bot.
If it is not possible to install the setup as an administrator, set the User Account Control setting to **Never notify**. Otherwise secure sessions cannot be established and automations will fail.
  1. From the **Home** page of RPA Manager, download the latest RPA Bot installer.
  2. To start the installation, right-click the setup file and choose **Run as administrator**.
  3. Provide the following details:
     * **RPA Manager connection protocol**
The protocol RPA Bot uses to connect with RPA Manager.
     * **RPA Manager connection address**
The RPA Manager servername or address to connect to. This is the same URL you use to access RPA Manager, for example: `https://myInstance.rpa.mulesoft.com/`.
     * **Bot Name**
The display name to show in RPA Manager for this bot.
     * **APIKey for the bot**
The API key to use for this bot. Use any of the API keys created in RPA Manager.
If you don’t have any API keys, see Manage API Keys for creation instructions.
  4. Continue the installation process until finished and restart the system.


## See Also
  * Hardware and Software Requirements
  * Configuring RPA Bot
Publish API Groups to Exchange | MuleSoft Documentation
# Publish API Groups to Exchange
After you create or edit an API Group to add the required API instances, you publish the API Group to Exchange to make it available to consumers.
## Task Prerequisites
Before you begin, ensure that you have permissions to all the assets in the API Group instance in Exchange.
### To publish API Groups to Exchange:
  1. Navigate to **Anypoint Platform** > **API Manager**.
  2. Click **API Groups**.
  3. From the API Groups details page, click the **API Group version** that you want to publish and click the **API Group instance**.
The API Group instance page is displayed:
  4. If the instance is not already published to Exchange, the **Publish to Exchange** button appears on the page.
  5. Click **Publish to Exchange**.
  6. On the **Publish** window, specify the name for the API Group asset and the version.
  7. Click **Publish**.


## See Also
  *   *   *   *
decodeURIComponent | MuleSoft Documentation
# decodeURIComponent
## decodeURIComponent(text: String): String
Decodes a Uniform Resource Identifier (URI) component previously created by `encodeURIComponent` or a similar routine.
For an example, see `encodeURIComponent`.
### Parameters
Name | Description  
---|---  
URI component string.  
### Example
This example decodes a variety of URI components.
#### Source
```
%dw 2.0
import * from dw::core::URL
output application/json
---
{
 "decodeURIComponent": {
  "decodeURIComponent" : decodeURIComponent("%20PATH/%20TO%20/DECODE%20"),
  "decodeURIComponent" : decodeURIComponent("%3B%2C%2F%3F%3A%40%26%3D"),
  "decodeURIComponent" : decodeURIComponent("%2D%5F%2E%21%7E%2A%27%28%29%24"),
 }
}
```

#### Output
```
{
  decodeURIComponent: {
   decodeURIComponent: " PATH/ TO /DECODE ",
   decodeURIComponent: ";,/?:@&=",
  decodeURIComponent: "-_.!~*'()\$"
  }
}
```