BassemE/mulesoft-documentation-embeddings huggingface dataset:
Configuring Policy Logging | MuleSoft Documentation
# Configuring Policy Logging
Flex Gateway Policy Development Kit (PDK) provides a logging mechanism that generates a log message enriched with the API instance ID, policy ID, and request ID.
Insert custom logs with the following macros by using the `pdk::logger;` package:
  * `logger::debug!`
  * `logger::info!`
  * `logger::warn!`
  * `logger::error!`


The macros behave the same as the Rust std::format! macro. The first parameter must be a format string literal. Use `{}` in the literal to pass parameters, for example:
```
use pdk::logger;
// [...]
let value = "there!";
logger::debug!("Hello there!");
logger::info!("Hello {}", value);
logger::warn!("Hello {value}");
logger::error!("Hello {}", "there!");
```

All examples appear in the Flex Gateway logs in the following format:
```
[flex-gateway-envoy][<log-level>] wasm log <policy-name>.<api-instance-name> main: [policy: <policy-name>][api: <api-instance-name>][req: <request-id> ] Hello there!
```

For more information about viewing Flex Gateway logs, see Monitoring Flex Gateway.
HTTP Limits Policy | MuleSoft Documentation
# HTTP Limits Policy
Anypoint Security uses the HTTP Limits policy to prevent an attacker from sending large messages that can consume bandwidth and potentially cause performance degradation or denial of service. This policy applies to all the APIs behind your Edge inbound endpoint. You can apply API Gateway policies to each API to enforce other API-specific policies, such as throttling and JSON threat protection.
The HTTP Limits policy limits the size of TCP protocol messages, paths, headers, and footers. This policy does not perform checks on the content of a message.
When you configure a DoS Policy, violations to the HTTP Limits policy escalate as protocol errors.
## Prerequisites
To configure and use the security policies, you must:
  * Have the Anypoint Security - Edge entitlement for your Anypoint Platform account.
If you don’t see **Security** in **Management Center** , contact your customer success manager to enable Anypoint Security for your account.
  * Have Runtime Fabric on VMs/Bare Metal with inbound traffic configured. Anypoint Runtime Fabric is a container service that automates the deployment and orchestration of Mule apps and API gateways.
Refer to the Runtime Fabric documentation.
Runtime Fabric requires the Anypoint Integration Advanced package or a Platinum or Titanium subscription to Anypoint Platform.
  * Enable inbound traffic on Runtime Fabric to allow Mule apps and API gateways to listen on inbound connections.


## Configure an HTTP Limits Policy
You can configure and apply an HTTP Limits policy to increase or decrease default HTTP limits.
  1. Navigate to **Anypoint Security** , click the **Create Policy** icon, and select **Content Attack Prevention**.
  2. Add a name for your policy in the **Name** field.
  3. Configure the following parameters for your policy:
Value | Description  
---|---  
**Maximum Message Size** |  The default maximum message size allowed is 104857600 bytes. Modify this value based on the requirements of your application by setting the maximum size to a value based on a size your APIs can handle. To prevent attackers from abusing request body checking and exhausting resources, choose the smallest value that satisfies your requirements.  
**Maximum Path Length** |  The default maximum path size allowed is 4096 bytes.  
**Maximum Length Of a Single Header** |  The default maximum header length allowed for is 16384 bytes.  
**Maximum Length Of a Single Trailer** |  The default maximum trailer length allowed is 16384 bytes.  
**Maximum Number Of Headers and Trailers** |  The default maximum number of headers and trailers allowed is 32 kB.  
  4. To allow only specific HTTP methods, add them in the **Allowed HTTP Request Methods** field.
Valid HTTP methods are: GET, POST, PATCH, HEAD, TRACE, OPTIONS, DELETE, and PUT.
  5. Click **Save Policy**.


## See Also
  * IP Allowlist Policy
  *   * Create a WAF Policy
NetSuite Connector 11.9 | MuleSoft Documentation
# NetSuite Connector 11.9
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
Microsoft Dynamics 365 for Finance and Operations Connector 3.1 | MuleSoft Documentation
# Microsoft Dynamics 365 for Finance and Operations Connector 3.1
Anypoint Connector for Microsoft Dynamics 365 for Finance and Operations (Microsoft Dynamics 365 for Finance and Operations Connector) enables integration with Microsoft Dynamics 365 for Operations Web API.
## Before You Begin
To use this connector, you must be familiar with:
  * The Microsoft Dynamics 365 for Finance and Operations API
  * Anypoint Connectors
  * Mule runtime engine (Mule)
  * Elements in a Mule flow
  * Global elements
  * How to create a Mule app using Anypoint Studio


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


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


## Authentication Types
Microsoft Dynamics 365 for Finance and Operations Connector uses the OAuth 2.0 authentication connection type, which delegates user authentication to the service hosting the user account.
## Next Step
After you complete the prerequisites and experiment with templates and examples, you are ready to create an app and configure the connector using Anypoint Studio.
## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * Microsoft Dynamics 365 for Finance and Operations Connector Reference
  * MuleSoft Help Center
charCodeAt | MuleSoft Documentation
# charCodeAt
## charCodeAt(content: String, position: Number): Number
Returns the Unicode for a character at the specified index.
This function fails if the index is invalid.
### Parameters
Name | Description  
---|---  
The input string.  
The index (a `Number` type) of a character in the string (as a string array). Note that the index of the first character is `0`.  
### Example
This example returns Unicode for the "u" at index `1` in "MuleSoft".
#### Source
```
%dw 2.0
import * from dw::core::Strings
output application/json
---
{
 "charCodeAt" : charCodeAt("MuleSoft", 1)
}
```

#### Output
```
{ "charCodeAt": 117 }
```

## charCodeAt(content: Null, position: Any): Null
Helper function that enables `charCodeAt` to work with a `null` value.
_Introduced in DataWeave version 2.4.0._
Set Text to App Element | MuleSoft Documentation
# Set Text to App Element
The _Set Text To App Element_ action step can be used to set text directly to a selected App Element.
## Properties
  * **Input String (Input Text)**
The text to write to the selected element. You can use _Insert environment variable_ and _Insert script variable_ to swap in other values for the text at runtime.


## Inbound Variables
  * **XPath to Element**
  * **Window Title**
  * **Input Text**


## Outbound Variables
The _Set Text to App Element_ action step does not have any outbound variables.
## Wizard
See Common Properties (App Automation).
See Inserting Text Modules for additional information about environment variables and script variables.
Cloud Information Model for MuleSoft Accelerators | MuleSoft Documentation
# Cloud Information Model for MuleSoft Accelerators
The use of good, comprehensive canonical data models in API specifications is key for maximizing the reuse and flexibility of the interfaces and limiting the amount of data transformation logic required between the Experience, Process, and System layer in an API-led approach. Many organizations struggle with this, however, often ending up with disparate object definitions for the same entities across different APIs. This leads to brittle and often complex data transformations, which become difficult to maintain over time.
The Cloud Information Model (CIM) for MuleSoft Accelerators is an application-agnostic data model that simplifies integration and accelerates innovation. The use of CIM as a canonical model reduces barriers to cross-product integration and extends the value proposition of our solutions by exposing a common model across our Process and System APIs. With CIM, you can create seamless and tailored personal experiences across cloud-native applications.
## History of CIM
Inspired by the Salesforce Customer 360 Data Model, CIM was created to deliver a standards-based solution for connecting enterprise products. The original distribution of CIM was produced by an open consortium, which was formed to deliver a standards-based solution for connecting enterprise products. Although it was adopted by MuleSoft for use in various accelerators, limited adoption by other companies led to the consortium being halted and the primary website was archived. The version of CIM created and maintained by the MuleSoft Solutions team is now known as the Cloud Information Model for MuleSoft Accelerators.
Release 2.0 of the model represents a significant upgrade and enhancement of virtually all object definitions, with simplified structures, additional inline documentation, and improved examples.
## Organization
The model content is organized into domains, or Subject Areas, which represent major business concepts. Each Subject Area defines one or more Entity Groups, which in turn consist of a related collection of Entities. Each Entity has a set of Attributes, which define the unique characteristics of the Entity. Refer to the CIM Subject Areas page for the list of subject areas that are currently supported.
## Implementation
The version of CIM used by the MuleSoft Accelerators is represented as a set of RAML library fragments. There is a core library for each subject area, plus vertical extension libraries that may introduce additional types, or aggregate types from the core libraries, for better alignment with certain industries. Each library provides a set of examples along with a set of JSON schema definitions for each object, which can be useful for defining metadata types when developing applications in Anypoint Studio or for schema validation of messages.
Refer to the Accelerator CIM Global Library home page to get started with using the model.
## See Also
  * CIM Design Elements
  *   *   *
Mule Services Injection | MuleSoft Documentation
# Mule Services Injection
## Using Mule Services
When implementing your module, you might need to use some of the services that Mule provides. Examples of these services include `ObjectStoreManager`, `LockFactory`, and `HttpService`.
To achieve this, there is no need to get them from the registry of the `MuleContext`. You can simply inject them into your component (such as an operation, source, or configuration) through the `@Inject` annotation.
Here is a simplified example that injects a service from the registry into a component:
Example: Using the @Inject Annotation
```
public class ObjectStoreOperations {
// ...
 @Inject
 private ObjectStoreManager runtimeObjectStoreManager;
// ...
 @Throws(StoreErrorTypeProvider.class)
 public void store(String key,
         @Content TypedValue<Serializable> value,
         @Optional @ParameterDsl(allowInlineDefinition = false) ObjectStore objectStore) {
  ObjectStore os = objectStore == null ? runtimeObjectStoreManager.getDefaultPartition() : objectStore;
  os.store(key, value);
 }
// ...
}
```

Here are some common Mule services:
  * `LockFactory`: All Mule components that require synchronization to access shared data must be synchronized using locks from the default implementation of this interface. For more information regarding `LockFactory`, refer to Distributed Locking.
  * `ExpressionManager`: Provides universal access for evaluating expressions embedded in Mule configurations, such as XML, Java, scripting, and annotations.
  * `TransformationService`: Service that tries to transform a value into another given type.
  * `HttpService`: Provides both HTTP server and client implementations. Whenever using an HTTP connection on your connector, you should try to use this service.
  * `SchedulerService`: Provides access to the different schedulers and thread pools that exist in the Mule runtime, allowing you to schedule tasks on those.
  * `SoapService`: Service that creates SOAP clients to consume SOAP services.
  * `ObjectStoreManager`: Manager in charge of creation and management of `ObjectStore` instances.
match | MuleSoft Documentation
# match
## match(text: String, matcher: Regex): Array<String>
Uses a Java regular expression (regex) to match a string and then separates it into capture groups. Returns the results in an array.
Note that you can use `match` for pattern matching expressions that include case statements.
### Parameters
Name | Description  
---|---  
A Java regex for matching characters in the `text`.  
### Example
In this example, the regex matches the input email address and contains two capture groups within parentheses (located before and after the `@`). The result is an array of elements: The first matching the entire regex, the second matching the initial capture group (**) in the regex, the third matching the last capture group (`[a-z]`**).
#### Source
```
%dw 2.0
output application/json
---
"me@mulesoft.com" match(/([a-z]*)@([a-z]*)\.com/)
```

#### Output
```
[
 "me@mulesoft.com",
 "me",
 "mulesoft"
]
```

### Example
This example outputs matches to values in an array that end in `4`. It uses `flatMap` to iterate over and flatten the list.
#### Source
```
%dw 2.0
var a = '192.88.99.0/24'
var b = '192.168.0.0/16'
var c = '192.175.48.0/24'
output application/json
---
[ a, b, c ] flatMap ( $ match(/.*[$4]/) )
```

#### Output
```
[ "192.88.99.0/24", "192.175.48.0/24" ]
```

## match(text: Null, matcher: Any): Null
Helper function that enables `match` to work with a `null` value.
_Introduced in DataWeave version 2.4.0._
Analysis Packages | MuleSoft Documentation
# Analysis Packages
The **Analysis Packages** widget displays the number of analysis packages of all RPA Bots collected during the analysis interval.
**Analysis packages** contain data on the sequence of execution of an individual process element of type **Activity**.
**Analysis packages** are normally only created in the event of errors.
Bots, for which the option **Analysis Package on OK** is activated in the **RPA Bot Configurator** , create an analysis package for each process element during each run.
## Data Representation
The number of analysis packages is a link.
## Configuration
This widget cannot be configured.
Use the sorting and filter options of the **Analysis Packages** list to highlight the information that is relevant for you.
## Drill-Down
Click on the number of all collected analysis packages to obtain a list of all analysis packages listed individually.
### Data Representation of the Analysis Packages
The analysis packages are displayed in a list.
### Columns of the **Analysis Packages** List
#### Process
Name of the process.
Name of the RPA Bot that carried out configuration of the Process.
#### Configuration
Name of the Configuration in which the process was executed.
#### Category
Category to which the Process belongs.
Type of workflow to which the analysis package belongs.
##### Activity
Activity workflow.
#### Run Type
Type of process execution.
The process was executed during the test phase.
##### Productive
The process was executed in production phase.
#### Start Time
Time stamp of the start of execution of the activity.
#### End Time
Time stamp of the end of execution of the activity.
#### Duration
Duration of execution of the activity.
#### Result
Result of the process execution.
##### Triggered
The trigger workflow was executed successfully but there was no task pending.
##### Success
The activity workflow was executed successfully.
##### Execution Failure
An error occurred during execution of a workflow.
#### Download
If an analysis package was created, you can download it by clicking on the icon **Download**.
Reusing Types from DataWeave Modules | MuleSoft Documentation
# Reusing Types from DataWeave Modules
To reuse types declared in other DataWeave modules, use the `import` directive:
DataWeave Module (`dw/Weather.dwl`):
```
%dw 2.0
type Weather = "cloudy" | "sunny" | "rainy" | "stormy"
type DetailedWeather = {temperature: Number, weather: Weather}
```

You can use those imported types as any other type in DataWeave, as constraints for variables and functions or for pattern matching and checking types at runtime:
DataWeave Script:
```
%dw 2.0
output json
import * from dw::Weather

fun weatherMessage(todayWeather: Weather) =
  "The weather for today is: " ++ todayWeather
var worstPossibleWeather: DetailedWeather = {temperature: -10, weather: "stormy"}
---
{
  a: weatherMessage("sunny"),
  b: worstPossibleWeather.weather is Weather
}
```

## See Also
  * Create Custom Modules and Mappings
lines | MuleSoft Documentation
# lines
## lines(text: String): Array<String>
Returns an array of lines from a string.
_Introduced in DataWeave version 2.4.0._
### Parameters
Name | Description  
---|---  
The string to split into lines.  
### Example
This example divides a string into lines. An `\n` represents a line break.
#### Source
```
%dw 2.0
import lines from dw::core::Strings
output application/json
---
lines("hello world\n\nhere  data-weave")
```

#### Output
```
["hello world", "", "here  data-weave"]
```

## lines(text: Null): Null
Helper function that enables `lines` to work with a `null` value.
_Introduced in DataWeave version 2.4.0._
Mule Secure Token Service OAuth 2.0 | MuleSoft Documentation
# Mule Secure Token Service OAuth 2.0
The Mule runtime engine supports the OAuth 2.0 protocol. The way to configure OAuth 2.0 authorization differs, depending on the OAuth role and your objective:
  * Configure authentication in your client Mule app when sending requests to a service that requires authentication, such as the Github OAuth2 server. Use the OAuth Module for the OAuth2 configuration.
  * Use the Mule OAuth2 Provider Connector to create a Mule application that grants and validates the tokens needed to access a protected resource.


To protect your API or app from receiving unauthorized requests, use an API Manager policy, such as the `OAuth 2.0 Access Token Enforcement Using External Provider` policy. To expose a web service protected by OAuth 2.0 security, see the API Manager documentation.
## See Also
  * OAuth Authorization Grant Types
Hardware and Software Requirements | MuleSoft Documentation
# Hardware and Software Requirements
Before using RPA Recorder, ensure that your environment meets the minimum hardware and software requirements.
## Hardware Requirements
Minimum | Recommended  
---|---  
Dual-core 2 GHz CPU (MMX/SSE compatible) | Dual-core 3 GHz CPU (MMX/SSE compatible)  
8 GB of RAM | 16 GB of RAM  
5 GB of disk space | 10 GB (SSD) of disk space  
## Software Requirements
Software | Required version  
---|---  
Microsoft .NET Framework  
Operating System |  Any of the following:
  * Windows 10 (64 bit)
    * Professional
    * Professional for Workstations
    * Enterprise No support for Enterprise multi-session (Windows 10 Enterprise for Virtual Desktops).
    * Enterprise LTSC
  * Windows 11
    * Professional
    * Professional for Workstations
    * Enterprise No support for Enterprise multi-session (Windows 11 Enterprise for Virtual Desktops).
  * Windows Server 2019
  * Windows Server 2022

  
### Recommended System Settings
  * Display resolution: Full HD 1080p (1920 × 1080) or higher


### File System Permission Requirements
RPA Recorder needs full write access to folders that are critical to its functioning. To avoid issues during the setup process and subsequent RPA Recorder executions, ensure that:
  * You install RPA Recorder as an administrator
If you don’t run the setup file as an administrator, the installation process might not finish successfully. If this happens, ensure you reinstall RPA Recorder by running the setup file as an administrator.
  * RPA Recorder has full write access to the following folders and any subfolders and files inside them:
    * `C:\Program Files\MuleSoft\RPARecorder`
    * `C:\RPARecorder`
  * Your environment is not blocking the execution of any RPA process
The operating system can block the execution of certain files. Ensure that all executable (`.exe`) files inside the RPA Recorder home directory and its subfolders are allowed to run.


## Compatibility
Application | Version  
---|---  
RPA Builder | 6.6.0 and later  
1.4.0 and later  
## See Also
  * Install and Start RPA Recorder
Configuring Flex Gateway | MuleSoft Documentation
# Configuring Flex Gateway
Flex Gateway enables configuration via Anypoint Platform or declarative configuration files. You can configure Flex gateway running in Connected Mode via both Anypoint Platform or declarative configuration files, while you can configure Managed Flex Gateway only with Anypoint Platform and Flex Gateway running in local mode only with configuration files.
Configurations include:
  * Replicas
  * TLS contexts
  * Shared storage
  * Forward proxies
  * Automated Jenkins pipelines
  * Node selection for Kubernetes deployments


For Connected Mode, see Configuring Flex Gateway in Connected Mode.
For Local Mode, see Configuring Flex Gateway in Local Mode.
## See Also
  * Configuring Managed Flex Gateway
  * Configuring Flex Gateway in Connected Mode
  * Configuring Flex Gateway in Local Mode
Configure Slack Integration | MuleSoft Documentation
# Configure Slack Integration
Cloud IDE 
Desktop IDE 
**Open Beta Release** : The **cloud IDE is in open beta**. Any use of Anypoint Code Builder in its beta state is subject to the applicable beta services terms and conditions, available from the IDE.
With your email and Salesforce integration complete, you can now configure your Slack integration to send a Slack message for a new case that is not escalated.
## Before You Begin
Complete these procedures:
  1. Integrate Salesforce Data into Slack and Email Notifications.
  2. Create a Configuration File for Slack and Salesforce and configure your Salesforce integration.
  3. Extract Payload Information to Variables.
  4. Add a Condition to Your Flow Logic.


## Add a Slack Action
  1. In Anypoint Code Builder, open your `new-case-salesforce.xml` file and delete **Temporary Logger** from the **Not Escalated** route of the Choice router:
```
<logger doc:name="Temporary Logger" message='#["Please look into this new Case: " ++ payload]'/>
```

  2. Click the (**Add component**) icon after the **Not Escalated** route of the Choice router:
  3. Click the (**Search in Exchange**) icon, type `Slack`, and select **Slack Connector** :
  4. Select the **Chat: Post Message** operation from the Slack section:
  5. Configure the Slack operation using the following code sample:
```
<slack:post-message channel="this-is-a-test" config-ref="Slack_Config" doc:name="Send Case to Slack"> **(1)**
 <slack:message ><![CDATA[#["Please handle this case. " ++ payload]]]></slack:message>
</slack:post-message>
```

Set the `channel` field to the channel name that you set earlier in the tutorial.  
---  


## Configure the Slack Connection
  1. In Anypoint Code Builder, open your `new-case-salesforce.xml` file, and add a new line under your `<email:smtp-config/>` element.
  2. Type `slack:` and select **slack:config**.
  3. Add the following configuration to your `<slack:config/>` element:
```
<slack:config name="Slack_Config" doc:name="Slack Config">
 <slack:token-connection token="${slack.token}" />
</slack:config>
```



## Test Your Mule Application
  1. To expedite the test, remove the breakpoint next to your Logger component.
  2. Select **Run** > **Start Debugging (F5)**.
  3. After your application deploys successfully, log in to your Salesforce account.
  4. From **App Launcher** , select **Service** :
  5. Select **Cases** > **New Case** :
  6. Ensure that the **Status** of the new case is **New**.
  7. After a few seconds, ensure that your configured Slack channel received a message with the information configured in the case:
```
Please handle this case. Case Number: 00001030, Origin: Phone, Case Type: , Priority: Medium, Status: New
```
DataFormat (dw::extension::DataFormat) | MuleSoft Documentation
# DataFormat (dw::extension::DataFormat)
This module provides resources for registering a new data format for the DataWeave language.
For an example, see Custom Data Formats Example.
## Types
  * 

## Annotations
  * DataFormat Annotations
Managing Runtime Fabric | MuleSoft Documentation
# Managing Runtime Fabric
To manage Anypoint Runtime Fabric, review the following topics:
  * Viewing Runtime Fabric Health Details Use Anypoint Runtime Manager to view the health of your Anypoint Runtime Fabric clusters.
  * Using RTFCTL Tool Use the `rtfctl` command line tool to install, configure, upgrade, uninstall, troubleshoot, back up, and restore Runtime Fabric. Additionally, you can manage deployed Mule apps, protect Mule app values, and install and replace Mule license keys.
  * Replacing a Mule License Key Use the `rtfctl` command line tool to replace an expired Mule license key.
  * Downgrading Runtime Fabric Version Use the `rtfctl` command line tool or Helm to downgrade Runtime Fabric versions.
  * Migrating to Helm Managed Runtime Fabric Migrate to Helm native for Runtime Fabrics that were installed using `rtfctl`.
  * Enabling Forwarding When Using firewalld Enable forwarding on the docker device, if you are using `firewalld` with a Red Hat Enterprise Linux (RHEL) 7.x operating system.


## See Also
  * Setting Up Runtime Fabric
  * Hardening Runtime Fabric
Amazon SNS Connector - Get Started | MuleSoft Documentation
# Amazon SNS Connector - Get Started
Amazon SNS Connector v4.4
Anypoint Connector for Amazon SNS (Amazon SNS Connector) provides connectivity to the Amazon Simple Notification Service (Amazon SNS) API, enabling you to build distributed web-enabled applications. Mule apps can use Amazon SNS Connector to easily push real-time notification messages to interested subscribers over multiple delivery protocols.
Release Notes: Amazon SNS Connector Release Notes Exchange: Amazon SNS Connector in Anypoint Exchange
## 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 SNS, ServiceNow, and Twitter.
## Before You Begin
Before creating an app, you must:
  * Have access to the Amazon SNS target resource and Anypoint Platform.
  * Understand how to create a Mule app using Anypoint Studio.
  * Have AWS Identity and Access Management (IAM) credentials.


### Compatibility
Amazon SNS connector is compatible with:
Application/Service | Version  
---|---  
Mule Runtime  
AWS SDK for Java  
Anypoint Studio |  7.0 or higher  
## Audience
  * Starting user
To create your Mule app, see Studio Configuration. See Additional Configuration Information to see what permissions AWS Identity and Access Management (IAM) users must have to use Amazon SNS Connector.
The Examples topic provides one or more use cases for using this connector.
  * Power user
Read the XML and Maven Support, Additional Configuration Information, and Examples topics.


## Next Step
After you have met the prerequisites, you are ready to create an app with Anypoint Studio.
## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * MuleSoft Help Center
toRadians | MuleSoft Documentation
# toRadians
## toRadians(angdeg: Number): Number
Converts a given number of degrees in an angle to an approximately equivalent number of radians.
_Introduced in DataWeave version 2.4.0._
### Parameters
Name | Description  
---|---  
Number of degrees to convert into radians.  
### Example
This example shows how `toRadians` behaves with different inputs.
#### Source
```
%dw 2.0
import * from dw::util::Math
output application/json
---
{
 "toRadians10": toRadians(10),
 "toRadians013": toRadians(0.13),
 "toRadians-20": toRadians(-20)
}
```

#### Output
```
{
  "toRadians10": 0.1745329251994329576922222222222222,
  "toRadians013": 0.002268928027592628449998888888888889,
  "toRadians-20": -0.3490658503988659153844444444444444
 }
```
Microsoft Outlook 365 Connector 1.0 | MuleSoft Documentation
# Microsoft Outlook 365 Connector 1.0
Anypoint Connector for Microsoft Outlook 365 (Outlook 365 Connector) enables you to integrate with the Microsoft Outlook 365 service.
For compatibility information and fixed issues, refer to the Microsoft Outlook 365 Connector Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
  * Microsoft Outlook 365 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 target resource
  * Anypoint Studio version 7.3.5 or later


## Common Use Cases for the Connector
Outlook 365 Connector currently provides email and calendar capabilities.
## Authentication Types
Outlook 365 Connector uses the following authentication methods:
  * OAuth 2.0 authorization code grant, which is used in applications that are installed on a device to gain access to protected resources.
  * OAuth 2.0 client credentials grant, which uses the identity of the application to access web-hosted resources.


## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * Microsoft Outlook 365 Connector Reference
  * MuleSoft Help Center
max | MuleSoft Documentation
# max
## max<T <: Comparable>(@StreamCapable values: Array<T>): T | Null
Returns the highest `Comparable` value in an array.
The items must be of the same type, or the function throws an error. The function returns `null` if the array is empty.
### Parameters
Name | Description  
---|---  
The input array. The elements in the array can be any supported type.  
### Example
This example returns the maximum value of each input array.
#### Source
```
%dw 2.0
output application/json
---
{ a: max([1, 1000]), b: max([1, 2, 3]), c: max([1.5, 2.5, 3.5]) }
```

#### Output
```
{ "a": 1000, "b": 3, "c": 3.5 }
```
Applying Policies in Local Mode | MuleSoft Documentation
# Applying Policies in Local Mode
For Flex Gateway running in Local Mode, you apply API policies using local declarative configuration files. You specify the location of these configuration files when you first run Flex Gateway.
See Registering and Running Flex Gateway in Local Mode for more information about how to start the gateway.
Refer to the following tutorials for examples on applying policies to APIs in Local Mode:
  * Secure an API with Basic Authentication and Rate Limiting
  * Secure an API with an Automated Resource-Level Policy
  * Secure an API with a Custom Policy


## See Also
  * Flex Gateway Overview
  * Getting Started with Self-Managed Flex Gateway
Email Connector 1.6 | MuleSoft Documentation
# Email Connector 1.6
Anypoint Connector for Email (Email Connector) sends and retrieves email messages over standard email protocols. Email Connector configurations share a basic set of parameters that require a connection over the protocols you use.
For compatibility information and fixed issues, see the Email 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
  * 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
Email Connector enables you to:
  * Retrieve emails from POP3 mailboxes
  * Retrieve, delete, move and store emails from IMAP mailboxes
  * Send emails over the SMTP protocol
  * Support secure connections for all protocols over Transport Layer Security (TLS)


For examples, see Examples.
## Next Step
After you complete the prerequisites and try the templates and examples, you are ready to create your own app and configure the connector using Anypoint Studio.
## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * MuleSoft Help Center
ServiceNow Connector 6.14 | MuleSoft Documentation
# ServiceNow Connector 6.14
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
Testing and Debugging Workflows | MuleSoft Documentation
# Testing and Debugging Workflows
RPA Builder provides a framework for testing and debugging workflows.
Before testing your workflows, learn how to differentiate errors from unavailability.
Then, you can run a workflow and view Workflow Run results to obtain detailed information about the workflow’s execution.
Use Workflow Debugger to set breakpoints and debug a workflow by stopping on each configured breakpoint to troubleshoot workflow elements.
RPA Builder also enables you to analyze problems with analysis packages downloaded from RPA Manager after a failed workflow run.
## Differentiate Errors from Unavailability
When testing a Workflow, it is extremely important to distinguish errors caused by the Workflow from errors that occur because of the unavailability of the measured application. To understand the difference, verify the relevant details: where an error happened, why it happened, and what the screenshot tells you about it.
There are several reasons why a keystroke action might fail with a message stating that the specified window title could not be found. For example, it could mean the window was not there at all or that the specified window title was incorrect. Analyzing the screenshots enables you to distinguish between those two cases. If the window is not there at all, then the monitored application did not start in the expected time, meaning there’s actual unavailability and there’s no need to change the Workflow. If, on the contrary, the screenshot shows that the window is there, it means the Workflow has an error. In this case, looking at the screenshot helps see the actual window title and edit the keystroke action accordingly.
Workflows commonly fail for these reasons:
  * An image could not be detected in the given timeout period.
  * An application window could not be detected or did not disappear in the given timeout period.
  * The target window of a Keystroke action could not be detected.


## See Also
  * Running Workflows and Using Workflow Run Results
  * Using Workflow Debugger
  * Analyzing Problems with Analysis Packages
Amazon SNS 4.7 Studio Configuration | MuleSoft Documentation
# Amazon SNS 4.7 Studio Configuration
To install and configure Anypoint Connector for Amazon SNS (Amazon SNS Connector) in Anypoint Studio:
  1. Install the connector.
  2. Configure an input source for the connector.
  3. Configure the connector.


## Install the Connector in Studio Using Exchange
  1. In Studio, create a Mule project.
  2. Click the Exchange **(X)** icon in the Studio task bar.
  3. In Exchange, click **Login** and supply your Anypoint Platform username and password.
  4. In Exchange, search for **Amazon SNS Connector**.
  5. Select **Amazon SNS Connector** and click **Add to project**.
  6. Follow the prompts to install the connector.


## Install the Connector in Studio
  1. In Studio, create a Mule Project.
  2. In the Mule Palette, click **(X) Search in Exchange**.
  3. In **Add Modules to Project** , type the name of the connector in the search field.
  4. Click the connector name in **Available modules**.
  5. Click **Add**.
  6. Click **Finish**.


## Configure an Input Source
Configure an input source for the connector, such as an **HTTP Listener** or **Scheduler**.
## Configure the Connector
To use Amazon SNS Connector in your Mule app, configure a global Amazon SNS element that can be used by all Amazon SNS Connectors in the application.
  1. Drag a connector operation into the Studio canvas.
  2. Click the **Global Elements** tab at the base of the canvas, and then click **Create**.
  3. In the **Choose Global Type** window, expand **Connector Configuration** , and click **Amazon SNS configuration** :
  4. Click **OK**.
  5. Specify the global element properties:
  6. Configure the parameters as follows:
Parameter | Description  
---|---  
Name by which the configuration is referenced  
**Session Token** |  Session token provided by AWS Security Token Service (STS)  
Topic used to test the connection  
Alphanumeric text string that uniquely identifies the user who owns the account  
Key that plays the role of a password  
**Try Default AWS Credentials Provider Chain** |  Checkbox that controls whether temporary credentials should be used  
**Region Endpoint** |  Topic region endpoint  
**Globally Defined Default Topic Arn** |  Topic ARN to test the connectivity  
  7. Retain the default entries for the **Proxy** , **Security** , and **Advanced** tabs.
  8. Click **Test Connection** to confirm that the parameters of your global configuration are accurate, and that Mule is able to successfully connect to your instance of Amazon SNS.
  9. Click **OK**.


## See Also
  * Introduction to Anypoint Connectors
  * MuleSoft Help Center
Send Endpoints | MuleSoft Documentation
# Send Endpoints
Anypoint Partner Manager send endpoints have the following functions:
  * Send to Partners endpoints act as target endpoints in outbound message flows to which transformed messages are sent to partners either directly or via third-party connections.
  * Target at Host endpoints act as target endpoints in inbound message flows to which transformed messages are sent to backend applications.


Partner Manager supports the following formats for send endpoints:
  * AS2 (Send to Partners endpoints only)
  * 

## See Also
  * Creating Endpoints
Shut Down, Restart, or Delete Servers | MuleSoft Documentation
# Shut Down, Restart, or Delete Servers
Private Cloud Edition 
After creating a server, you can manage it from Runtime Manager. Actions you can perform include shut down, restart, and delete the server.
After shutting down a server, you cannot start it from Runtime Manager. You must manually start the server on the system where Mule runtime engine is installed.
Depending on the error, if an error occurs in Runtime Manager during server shutdown or restart, you might need to manually start or stop the server on the system where Mule is installed.
  1. From Anypoint Platform, select **Runtime Manager**.
  2. Select **Servers** in the left menu.
  3. Click the server name.
  4. Click **Settings** :
Figure 1. The arrow shows the **Actions** menu on the **Settings** page.
  5. From the **Actions** menu, select:
     * **Shutdown**
     * **Renew Certificate**
  6. In the confirmation window, select the checkbox to confirm your choice.


## See Also
  * Starting and Stopping Mule
  * Renew a Server Certificate
Run Vulnerability Assessment and Penetration Tests | MuleSoft Documentation
# Run Vulnerability Assessment and Penetration Tests
If your company security policies require that you perform vulnerability and penetration testing against Anypoint Platform, you can commence testing without notifying Salesforce beforehand.
All assessments must be performed in accordance with the Security Assessment Agreement.
## Run Penetration and Vulnerability Tests
Because penetration testing can interfere with other tenants, MuleSoft allows penetration testing on your workers but not on other Anypoint Platform services.
Salesforce does not address vulnerabilities found with custom development. You must validate and fix any findings with your custom development.   
---  
### Prerequisites
Before initiating penetration testing:
  * Enable static IPs for the app.
By default, CloudHub workers don’t use static IP addresses, so you can’t test them because their IP addresses might change. For information about how to enable static IPs, see Static IPs Tab Settings.
  * Assign a security resource at your company to review and validate findings from the tests.


### Steps
  1. Run the penetration tests.
The Security Assessment Agreement includes restrictions and requirements for testing.
  2. Have your security resource use the following documents to identify common false positives and security issues related to settings:
     *      *   3. If your assessment generates vulnerability findings, complete validation for any automated finding. Send all outstanding validated security vulnerability findings to security@salesforce.com.
Include the following information in your email:
     * Confirmation number for your Security Assessment approved by Salesforce
     * Summary of all findings and the associated severity level of each finding
     * Detailed assessment report that notes each finding
     * Steps to reproduce the vulnerability
     * All applicable HTTP requests and responses
     * Explanation of why the example is considered a finding


### Reporting Security Vulnerabilities
To report security vulnerability findings, follow the Security Vulnerability Finding Submittal Guide. Security vulnerability reports that do not follow the required steps are rejected.
Salesforce does not address any security vulnerabilities in the following categories:
  * Scan output from automated vulnerability scanning tools without a valid proof of concept
  * Security bugs without valid proof of concept
  * Vulnerabilities identified in old or deprecated versions of Mule runtime engine
  * Vulnerabilities introduced via code customization made by your company
  * Known security issues that don’t pose any risk


## See Also
  * Manage Applications on CloudHub
  * Develop Applications for CloudHub
  *