BassemE/mulesoft-documentation-embeddings huggingface dataset:
Business Process Performance | MuleSoft Documentation
# Business Process Performance
The **Business Process Performance** widget shows for each process how often the process has been executed within the analysis interval and how long the average execution time was.
The number and average runtimes of this widget only take account of processes that have been completed successfully.
## Data Representation
The processes are displayed in a list.
### Columns of the List of Business Process Performance of All Processes
#### Process
Name of the process.
Click on the name of a Process to see details of the individual process runs.
#### Execution Count
Number of successful executions of the Process in the defined time period.
#### Average Runtime
Average runtime of all successful executions of the Process in the defined time period.
## Configuration
This widget cannot be configured.
Use the sort and filter options of the **Business Process Performance of an individual Process** list to highlight the information that is relevant for you.
## Drill-down
If you click on the name of a Process, you can view details of the individual runs of this Process.
### Data representation of the list of Business Process Performance of an individual Process
The Process runs are displayed in a list.
### Columns of the List of Business Process Performance of an Individual Process
Name of the Bot that executed the Process run successfully.
#### Configuration
Name of the configuration that was used for the successful run.
Type of Process run.
The Process was executed as a test run.
##### Productive
The Process was executed as a productive run.
#### Start Time
Time stamp of the start of the Process execution.
#### End Time
Time stamp of the end of the Process execution.
#### Duration
Duration of the Process execution.
#### Result
Result of the process execution.
##### Success
The Process run was executed successfully.
Assert Equals | MuleSoft Documentation
# Assert Equals
Anypoint Code Builder 
Anypoint Studio 
The Assert Equals processor allows you to run assertions in order to validate the state of a Mule Event’s content. This processor can be used to validate the Mule Event after the production code runs.
For example, to assert that a payload is equal to a certain value, you can configure the Assert-Equals processor the following way:
```
<munit-tools:assert-equals
 actual="#[payload]"
 expected="#[2]"
 message="The payload should be 2"/>
```

If the `expected` attribute is a String, you can specify the literal value without requiring an expression.
```
<munit-tools:assert-equals
 actual="#[payload]"
 expected="Example"
 message="The payload should be 'Example'"/>
```

If this assertion fails, the processor throws a `java.lang.AssertionError`.
Salesforce Pub/Sub Connector 1.0 - XML and Maven Support | MuleSoft Documentation
# Salesforce Pub/Sub Connector 1.0 - XML and Maven Support
Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio:
  * If you manually code a Mule runtime engine (Mule) app in XML (either from the Anypoint Studio XML editor or from a text editor), you can access the connector from your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file.
  * If you add the connector in Studio, Studio automatically populates the XML code with the connector’s namespace and schema location and it also adds a dependency to the `pom.xml` file.


## Add a Namespace for the Connector
Paste the following code inside the `mule` tag of the header of your configuration XML:
```
http://www.mulesoft.org/schema/mule/salesforce-pub-sub
http://www.mulesoft.org/schema/mule/salesforce-pub-sub/current/mule-salesforce-pub-sub.xsd
```

This example shows how the namespace statements are placed in the XML:
```
<mule xmlns:$2="http://www.mulesoft.org/schema/mule/$2"
	xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
	xmlns:http="http://www.mulesoft.org/schema/mule/http"
	xmlns:file="http://www.mulesoft.org/schema/mule/file"
	xmlns="http://www.mulesoft.org/schema/mule/core"
	xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core
	http://www.mulesoft.org/schema/mule/core/current/mule.xsd
	http://www.mulesoft.org/schema/mule/file
	http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd
	http://www.mulesoft.org/schema/mule/http
	http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
	http://www.mulesoft.org/schema/mule/ee/core
	http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd
	http://www.mulesoft.org/schema/mule/$2
	http://www.mulesoft.org/schema/mule/$2/current/mule-$2.xsd">
```

## Add a POM File Dependency
The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app. When you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector:
```
<dependency>
 <groupId>com.mulesoft.connectors</groupId>
 <artifactId>mule4-salesforce-pubsub-connector</artifactId>
 <version>x.x.x</version>
 <classifier>mule-plugin</classifier>
</dependency>
```

Replace `<version>` with the version that corresponds to the connector you are using.
To obtain the most up-to-date `pom.xml` file information:
  1. Go to Anypoint Exchange.
  2. In Exchange, click **Login** and supply your Anypoint Platform username and password.
  3. In Exchange, search for `Salesforce Pub/Sub`.
  4. Select the connector.
  5. Click **Dependency Snippets** near the upper right of the screen.


## Next Step
After completing your namespace and `pom.xml` file, you can try the Examples.
## See Also
  * Introduction to Anypoint Connectors
  * MuleSoft Help Center
MUnit Support for Domain-Based Applications | MuleSoft Documentation
# MUnit Support for Domain-Based Applications
Anypoint Code Builder 
Anypoint Studio 
MUnit allows you to test applications that run referencing a Mule Domain. MUnit support for domain based applications is designed to require the minimum change of code from your end to implement it. However if your Mule Application depends on a Mule Domain, there are a few considerations to take into account:
  * When working in Anypoint Studio, your Mule Domain must always be part of your workspace.
  * Your Folder must have the same name as your artifact. Regardless if it’s a Mule application or a Mule domain if, the folder in your workspace containing your Mule project must have the same name as the artifact ID defined in your pom file.
For example, if your mule project’s artifact Id is:
```
<artifactId>mule-project</artifactId>
```

Then, the folder in your Studio workspace must be named `mule-project`. This is case sensitive. If your folder is named `Mule-Project`, MUnit won’t recognize your project.
  * Your resources need to be installed in an M2 repository. You need to handle domains and mule apps as regular dependencies. Setting them as an artifact requires for them to be installed in an .M2 repository.
  * Your resources need to be in your test suite pom file.
If your Mule domain project looks like this:
```
<modelVersion>4.0.0</modelVersion>
<groupId>org.mule.app</groupId>
<artifactId>domain-project</artifactId>
<packaging>mule-domain</packaging>
<version>1.0.0-SNAPSHOT</version>
<name>Domain domain-project Project</name>
```

Then your dependency in your Mule application should look like this:
```
<dependency>
  <groupId>org.mule.app</groupId>
  <artifactId>domain-project</artifactId>
  <version>1.0.0-SNAPSHOT</version>
  <classifier>mule-domain</classifier>
  <scope>provided</scope>
</dependency>
```

Remember to keep consistency with `<version>` artifact in your repository and in your test suite’s pom file  
---  


## See Also
  * Domain Support (Anypoint Studio)
Define Input and Output Structure of a Transformation (Anypoint Studio) | MuleSoft Documentation
# Define Input and Output Structure of a Transformation (Anypoint Studio)
To use the graphical view and construct mappings via drag and drop, the Transform Message component first needs information about what fields are available for dragging and dropping onto.
If you plan to create your transformation entirely by writing DataWeave code, you can skip defining input and output and reference elements directly.
## Define Data Structure on Other Components
  1. Make sure that all other elements in the flow are fully configured.
When input and output of a component can be predicted based on its configuration, these are exposed to the rest of the flow. For example, when a Salesforce connector is configured to carry out a specific operation, its output structure is known and exposed.
  2. If input or output of certain components can’t be predicted, manually define the output and input of key components via their Metadata Tab.
For example, an HTTP listener might receive requests containing any payload.


## Define Data Structure in Transform Message Component
  1. Right click on the root of the input or the output tree, then select Set Metadata.
  2. Manually define the data structure.


## Define Data Structure Via XML
See DataWeave XML Reference.
## Reader Configuration
In case your input needs to be parsed in a special way, you can set up certain properties for the reader object. Each input format has different configurable properties, or none. There are two ways to set these listed below.
  * Configure other components on the flow, by accessing their corresponding Metadata tab.
  * On the Transform Message component, right click on the root of the input pane and select **Reader Configuration**
This option only exists if the selected data type format allows for configurable reader properties. If the payload is of type `unknown`, you must change its type first.   
---  


For a detailed reference of what properties can be set in the Reader Configuration of each format, see the corresponding **reader properties** section:
You can also add this information through properties in the XML source of your Mule project.   
---  
## Writer Configuration
In case your output needs to be constructed in a special way, you can set up certain properties of the writer object. Each output format has different configurable properties, or none.
These properties must be written on the `%output` directive of your DataWeave code.
For a detailed reference of what properties can be set in the Writer Configuration of each format, see the corresponding **reader properties** section:


## See Also
Workflow: Create a Mapping through the Anypoint Studio UI
Transform Message Component
DataWeave Language
Supported Data Formats
DataWeave XML Reference
takeWhile | MuleSoft Documentation
# takeWhile
## takeWhile<T>(obj: Object, condition: (value: Any, key: Key) -> Boolean): Object
Selects key-value pairs from the object while the condition is met.
_Introduced in DataWeave version 2.3.0._
### Parameters
Name | Description  
---|---  
The object to filter.  
`condition` | The condition (or expression) used to match a key-value pairs in the object.  
### Example
This example iterates over the key-value pairs in the object and selects the elements while the condition is met. It outputs the result into an object.
#### Source
```
%dw 2.0
import * from dw::core::Objects
output application/json
var obj = {
 "a": 1,
 "b": 2,
 "c": 5,
 "d": 1
}
---
obj takeWhile ((value, key) -> value < 3)
```

#### Output
```
{
 "a": 1,
 "b": 2
}
```
ordinalize | MuleSoft Documentation
# ordinalize
## ordinalize(num: Number): String
Returns a number as an ordinal, such as `1st` or `2nd`.
### Parameters
Name | Description  
---|---  
An input number to return as an ordinal.  
### Example
This example returns a variety of input numbers as ordinals.
#### Source
```
%dw 2.0
import * from dw::core::Strings
output application/json
---
{
 "a" : ordinalize(1),
 "b": ordinalize(2),
 "c": ordinalize(5),
 "d": ordinalize(103)
}
```

#### Output
```
{
  "a": "1st",
  "b": "2nd",
  "c": "5th",
  "d": "103rd"
}
```

## ordinalize(num: Null): Null
Helper function that enables `ordinalize` to work with a `null` value.
Settings Overview | MuleSoft Documentation
# Settings Overview
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 **Settings** module enables you to do the following:
  * Create user API keys for connecting to RPA processes from Salesforce products.
  * Configure general settings.
  * Reassign the RPA assets of deleted or disabled users.
Dashboard Overview | MuleSoft Documentation
# Dashboard Overview
The dashboard shows you the progress of your automation management within a defined time period on one page.
You arrange widgets on the dashboard. These display the most important data from processes and robots.
The data includes, but is not limited to:
  * The execution frequency and duration of processes
  * The utilization of the bots
  * An overview of the used bot minutes
  * An overview of the lifecycle
  * Information that helps to distribute resources efficiently
  * Comparisons between manual and automatic execution times
  * Analysis packages that provide further information on selected processes


For each dashboard, you can select the analysis interval and the refresh rate.
You can publish dashboard so that others can use them.
Open a dashboard by clicking on its name.
Mime Types (dw::module::Mime) | MuleSoft Documentation
# Mime Types (dw::module::Mime)
Type | Definition | Description  
---|---|---  
MimeType |  `type MimeType = { "type": String, subtype: String, parameters: MimeTypeParameter }` |  DataWeave type for representing a MIME type. Supports the following fields:
  * `type`: Represents the general category into which the data type falls, such as 'video' or 'text'.
  * `subtype`: Identifies the exact kind of data of the specified type the MIME type represents.
  * `parameters`: Parameters attached to the MIME type.

_Introduced in DataWeave version 2.7.0._  
MimeTypeError |  `type MimeTypeError = { message: String }` |  DataWeave type of the data that returns when a `fromString` function fails. Supports the following fields:
  * `message`: The error message.

_Introduced in DataWeave version 2.7.0._  
MimeTypeParameter |  `type MimeTypeParameter = { _?: String }` |  DataWeave type for representing a MIME type parameter. _Introduced in DataWeave version 2.7.0._
Azure Service Bus Connector 3.0 | MuleSoft Documentation
# Azure Service Bus Connector 3.0
Anypoint Connector for Azure Service Bus (Azure Service Bus Connector) makes it easy to build integrations that send messages to and receive messages from Azure Service Bus, which is an asynchronous messaging cloud platform. This connector supports communication with queues and topics and can perform actions such as:
  * Send to queue
  * Send to topic
  * Receive from queue
  * Receive from subscription


To use the Azure management API for CRUD operations of queues, topics, subscriptions, and rules, use Anypoint Connector for Azure Service Bus Management (Azure Service Bus Management Connector).
This connector supports integrations with Azure Service Bus (cloud). It does not work with Microsoft Service Bus (on-premises). To connect with Microsoft Service Bus on-premises, use Anypoint Connector for Microsoft Service Bus.   
---  
For compatibility information and fixed issues, see the release notes.
## Before You Begin
To use this connector, you must be familiar with:
  * The Azure Service Bus APIs
  * 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 Azure target resource
  * Java 8
  * Anypoint Studio 7.1.0 or later
  * Mule Runtime 4.2.x EE or later


## Audience
  * New user
To create your Mule app, see:
  *   * Examples, which provides one or more use cases for the connector.
  * Advanced user
  * Read the following:
  * XML and Maven Support
  * Examples topics


## Authentication Types
Azure Service Bus Connector uses the SAS (shared access signature) authentication connection type to connect to Azure.
For information about configuring these authentication types, see Using Anypoint Studio to Configure Azure Service Bus Connector.
## 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
  * Azure Service Bus Connector Release Notes
  * Azure Service Bus Connector on Exchange
  * MuleSoft Help Center
VPC Network Architecture | MuleSoft Documentation
# VPC Network Architecture
An Anypoint VPC is a logically private and isolated network hosted inside CloudHub. You can connect your private intranet to your Anypoint VPC as if they were all part of a single, private network.
The Anypoint VPC configuration exposes the DNS record `mule-worker-internal-<app-name>.cloudhub.io`. This is a DNS A record, which includes the IP addresses of all your workers. This DNS record cannot be accessed from outside your Anypoint VPC.
Each Anypoint VPC allows you to configure firewall rules to check inbound connections directly to your workers.
Four firewall rules are created by default—​two rules that allow your private address space to connect through ports 8091 and 8092, and two rules that allow external requests proxied by CloudHub’s shared load balancer through ports 8081 and 8082.
All traffic that is not allowed in a firewall rule is blocked by default.
Figure 1. The graphic shows the default Anypoint VPC architecture.
You can configure a dedicated load balancer inside your VPC, which allows you to provide custom certificates and optionally enforce two-way SSL client authentication. If you configure proxy rules that map your applications to custom domains, you can, for example, host everything under a single vanity domain.
Figure 2. The graphic shows the Anypoint VPC architecture with a dedicated load balancer.
A CloudHub dedicated load balancer is assigned to a particular Anypoint VPC. The dedicated load balancer then routes traffic to that particular Anypoint VPC within the particular service region of the VPC.
Each dedicated load balancer has a DNS A record `_lb-name_.lb.anypointdns.net`or` _lb-name_.lb-prod-eu-rt.anypointdns.net`(for EU control plane) that resolves to two public IP addresses of its two instances. Through your DNS provider, you can add a`CNAME` record pointing to the dedicated `A` record and use your own domain names to access it. This DNS A record can also be reached from outside the VPC. Additionally, a CloudHub dedicated load balancer has an internal domain name to be used by applications and clients within the Anypoint VPC. The structure is `internal-_lb-name_.lb.anypointdns.net`.
## See Also
  * Resolve Private Domains in Your Internal Network
CloudHub 2.0 Overview | MuleSoft Documentation
# CloudHub 2.0 Overview
CloudHub 2.0 is a fully managed, containerized integration platform as a service (iPaaS) where you can deploy APIs and integrations as lightweight containers in the cloud.
## Why Deploy on CloudHub 2.0?
CloudHub 2.0:
  * Provides for deployments across 12 regions globally.
  * Dynamically scales infrastructure and built-in services up or down to support elastic transaction volumes.
  * Builds in security policies, protecting your services and sensitive data with encrypted secrets, firewall controls, and restricted shell access.
  * Encrypts certificates, passwords, and other sensitive configuration data at rest and in transit within Anypoint Platform.
  * Provides a standardized isolation boundary by running each Mule instance and service as a separate container.


For CloudHub 2.0 pricing information, contact either your account executive or your account development representative.
## CloudHub 2.0 on Hyperforce
All features of CloudHub 2.0 are supported on Hyperforce with these exceptions:
When deploying to any Hyperforce supported regions, deleting the default egress traffic route, `0.0.0.0`, can result in Anypoint Monitoring to not work in CloudHub 2.0.
## See Also
  * Features of CloudHub 2.0
  * Creating Private Spaces
  * Private Network Region
Salesforce CDP Connector 1.1 | MuleSoft Documentation
# Salesforce CDP Connector 1.1
Anypoint Connector for Salesforce CDP (Salesforce CDP Connector) provides Mule users with a quick and easy way to integrate with Salesforce CDP API endpoints. Users can automate data ingestion from third parties, query the CDP Data Lake, search and query customer profile information and calculated insights, and consume data action events to enrich the 360-degree view of their customers in their CDP instance.
Each API call uses a request/response pattern over an HTTPS connection. All required request headers, error handling, and HTTPS connection configurations are built into the connector.
For information about compatibility and fixed issues, refer to the Salesforce CDP Connector release notes.
## Before You Begin
To use this connector, you must be familiar with:
  * The Salesforce CDP Ingestion API
  *   * 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:
  * Set up the Ingestion API
  * Credentials to access the Salesforce CDP target resource
  * Anypoint Platform
  * Anypoint Studio version 7.3.x or later


## Set Up the Ingestion API
To use Salesforce CDP Connector, you must first set up the Ingestion API. For more information, refer to Connect MuleSoft with Customer Data Platform.
After setting up the Ingestion API, refer to Next Step to configure your connector.
## Common Use Cases For the Connector
These are some common use cases for Salesforce CDP Connector:
  * Stream data via insert and delete object endpoints of the Ingestion API Connector
  * Create a bulk job, upload job data, close or abort a job, get a job status, and delete a job as part of the Bulk Ingestion interaction pattern of the Ingestion API Connector
  * Query CDP objects
  * Query Salesforce CDP data lake across data model, lake, unified, and linked objects
  * Query calculated insights with selected dimensions, selected measures, and optional filters
  * Look up and search customer profile information
  * Create webhooks as data action targets for data actions in CDP


For examples, see Salesforce CDP Connector Examples use cases.
## Connection Types
Salesforce CDP connections use the following authentication types:
  * OAuth JWT Uses OAuth 2.0 with a JSON Web token (JWT) request for user authentication
  * OAuth Username Password Uses OAuth 2.0 with a user and password for authentication


For information about configuring authentication types, see Using Anypoint Studio to Configure Salesforce CDP Connector.
## Next Step
After you complete the prerequisites, you are ready to create an app and configure the connector using Anypoint Studio.
## See Also
  *   * Use Exchange to Discover Connectors, Templates, and Examples
  * Salesforce CDP Connector Reference
  * MuleSoft Help Center
Widgets | MuleSoft Documentation
# Widgets
The dashboard information consists of the contents of various widgets. A widget is a movable and scalable pane.
We can roughly divide widgets into two groups. There are widgets that monitor the current situation and, for which, a shorter analysis interval and more frequent refreshes are appropriate. The second group of widgets enables an overview of the development of process automation over longer time periods.
The widgets that are used to assess the current situation include **Analysis Packages** , **Current Bot Status** , **Bot Workload** , **Used Bot Minutes** , and **Business Process Performance**. If you keep an eye on these widgets, you can allocate resources flexibly and react quickly to problems.
The widgets that provide a more general overview of the progress of process automation in your company include **Automation Management** , **Profit Analysis: Process Time** , **Profit Analysis: Process Frequency**. These widgets help you to identify unexploited potential and to plan over the long term. You can see at a glance what advantages have accrued from the automation of a process.
Pattern Gallery | MuleSoft Documentation
# Pattern Gallery
All search patterns belonging to a _Workflow_ are stored centrally in the _Pattern Gallery._ Search patterns are image files which are used in the _Search Pattern_ and _Pattern Select action steps_ to determine a state.
Search patterns can be created directly in the _Pattern Gallery Wizard_. They are also automatically transferred from the _Search Pattern_ and _Pattern Select action steps_.
Search patterns that are not used can be deleted from the _Workflow._
There is no limit to the number of search patterns in a _Workflow_.
## Properties
The _Pattern Gallery action step_ does not contain any additional properties, other than the **Common Properties**.
## Inbound Variables
The _Pattern Gallery action step_ does not produce any inbound variables.
## Outbound Variables
The _Pattern Gallery action step_ does not produce any outbound variables.
## Wizard
The _Pattern Gallery Wizard_ enables search patterns to be created, processed, and searched for, which can be used throughout the entire _Workflow._
For additional information about the basic functionality of the _Pattern Strip_ , which contains all the search patterns and menu bars, see The Pattern Script Module.
## See Also
  *   *   * Using Search Patterns in a Workflow
Amazon S3 Connector 5.7 | MuleSoft Documentation
# Amazon S3 Connector 5.7
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
Automated Policies | MuleSoft Documentation
# Automated Policies
Use automated policies to enforce security and logging requirements by applying the same policies to all APIs running in Flex Gateway. With policy automation, you can quickly design, build, and deploy secure and consistent APIs.
Automated policies enable you to deploy APIs with confidence because the target environment automatically enforces critical policies, resulting in reduced errors. An administrator no longer needs to remember to insert a policy to enforce common standards manually.
You can configure all included policies and custom policies as automated policies and apply them to the APIs running in an environment.
Alerts cannot be added to API instances protected by automated policies.  
---  
## See Also
  * Applying Automated Inbound Policies
Deleting Schedules | MuleSoft Documentation
# Deleting Schedules
You might want to delete a schedule for any of the following reasons:
  * You have finished testing endpoints of a public API and you want to free resources for testing endpoints of a different public API.
  * You have finished testing endpoints of a private API.
  * You have more than one schedule running the same test and you no longer need one of the schedules.


Be sure that you want to delete the schedule. There is no opportunity to confirm the deletion.  
---  
## Before You Begin
  * Before you can delete a schedule, you must have the following permission set in Access Management:
    * **Exchange > Exchange Administrator**
  * Before you can delete a private location, you must have the following permission set in Access Management:
    * **Runtime Manager > Delete Applications**


An Anypoint Platform administrator for your organization grants permission. See Manage Permissions.
## Delete a Schedule
Anypoint Functional Monitoring provides two methods for deleting a schedule.
To delete a schedule from the **Schedules** table of a monitor:
  1. Select the monitor that contains a schedule to delete.
  2. Locate the schedule in the table and click **More** () > **Delete Schedule**.


To delete a schedule from the table of schedules that use a specific location:
  1. Display the list of locations by opening the **Locations Manager** in the homepage.
  2. Select the location from which you want to delete a schedule.
  3. Locate the schedule in the table and click **More** () > **Delete Schedule**.
     * If the deleted schedule was the only schedule running a specific test, the worker for that test no longer exists.
     * If the schedule was the only schedule using a private location, you have the option to delete that private location.


## See Also
  *   *
Troubleshooting Java Module | MuleSoft Documentation
# Troubleshooting Java Module
To troubleshoot Java module, become familiar with the information about enabling verbose logging and interpreting commonly thrown messages.
## Enable Verbose Logging
To get a better understanding of why an application’s interaction with the Java module is failing, temporarily enable verbose logging for the module.
Remember to always disable the enhanced verbosity after troubleshooting, because it affects your Mule application performance.
To enable verbose logging in the configuration file:
  1. In Anypoint Studio, navigate to the **Package Explorer** view.
  2. Open your application’s project name.
  3. Open the `src/main/resources` path folder.
  4. Open the `log4j2.xml` file inside the folder.
  5. Add an `<AsyncLogger>` tag inside the `<Loggers>` tag:
```
			<Loggers>
				...
				<AsyncLogger name="org.mule.extensions.java" level="DEBUG"/>
				...
			</Loggers>
```

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


## Understand Common Throws
Here is a list of common throw messages and how to interpret them:
  * JAVA:ARGUMENTS_MISMATCH


Any of the arguments is either of the wrong type or missing, or there were too many arguments provided.
  * JAVA:CLASS_NOT_FOUND


A definition could not be found for the class with the specified name.
  * JAVA:INVOCATION


An error occurred during the invocation of a method or constructor.
  * JAVA:NO_SUCH_METHOD


The specified method cannot be found.
  * JAVA:WRONG_INSTANCE_CLASS


The class of the given instance does not match with the expected class.
  * JAVA:NO_SUCH_CONSTRUCTOR


The class doesn’t have a matching constructor, or it is not visible.
  * JAVA:NOT_INSTANTIABLE_TYPE


The supplied class is either abstract or interface.
## See Also
  * Java Module Reference
  * MuleSoft Help Center
  *
nodeExists | MuleSoft Documentation
# nodeExists
## nodeExists(value: Any, callback: (value: Any, path: Path) -> Boolean): Boolean
Returns `true` if any node in a given tree validates against the specified criteria.
_Introduced in DataWeave version 2.2.2._
### Parameters
Name | Description  
---|---  
The value to search.  
The criteria to apply to the input `value`.  
### Example
This example checks for each user by name and last name. Notice that you can also reference a `value` with `$` and the `path` with `$$`.
#### Source
```
%dw 2.0
import * from dw::util::Tree
var myObject = {
   user: [{
     name: "mariano",
     lastName: "achaval",
     friends: [
       {
         name: "julian"
       },
       {
         name: "tom"
       }
     ]
   },
   {
     name: "leandro",
     lastName: "shokida",
     friends: [
       {
         name: "peter"
       },
       {
         name: "robert"
       }
     ]
   }
   ]
 }
output application/json
---
{
  mariano : myObject nodeExists ((value, path) -> path[-1].selector == "name" and value == "mariano"),
  julian : myObject nodeExists ((value, path) -> path[-1].selector == "name" and value == "julian"),
  tom : myObject nodeExists ($$[-1].selector == "name" and $ == "tom"),
  leandro : myObject nodeExists ($$[-1].selector == "name" and $ == "leandro"),
  peter : myObject nodeExists ($$[-1].selector == "name" and $ == "peter"),
  wrongField: myObject nodeExists ($$[-1].selector == "wrongField"),
  teo: myObject nodeExists ($$[-1].selector == "name" and $ == "teo")
}
```

#### Output
```
{
 "mariano": true,
 "julian": true,
 "tom": true,
 "leandro": true,
 "peter": true,
 "wrongField": false,
 "teo": false
}
```
Basic Authentication: Simple Policy | MuleSoft Documentation
# Basic Authentication: Simple Policy
**Policy Name** | Basic Authentication: Simple  
---|---  
Allows access based on the basic authorization mechanism, with a single user-password  
Security  
**First Flex Gateway version available**  
**Returned Status Codes** | 400 - Unauthorized or invalid client application credentials in WSDL API using SOAP 1.2  
401 - Unauthorized or invalid client application credentials in HTTP or RAML APIs  
500 - Unauthorized or invalid client application credentials in WSDL API using SOAP 1.1  
## Summary
The Basic Authentication: Simple policy protects an API by forcing applications to provide a username and password when making requests.
The policy follows basic HTTP authentication standards.
When an error is encountered, the policy returns an "WWW-Authenticate" HTTP header field.
## 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: http-basic-authentication-flex
 config:
  username: <string> // REQUIRED
  password: <string> // REQUIRED
```

Parameter | Required or Optional | Default Value | Description  
---|---|---|---  
A base-64 encoded string  
A base-64 encoded string  
#### Resource Configuration Example
```
- policyRef:
  name: http-basic-authentication-flex
 config:
  username: chris
  password: admin
```

### Flex Gateway Connected Mode
When you apply the Basic Authentication: Simple policy to an API, a request to that API must contain the following header:
```
Authorization: Basic <username:password>
```

The `username:password` value must be a base64-encoded string. For example on a Mac OS X or Linux system, the username and password requirement is implemented as:
`echo -n '<Client Id>:<Client Secret>' | base64`
Use Regular Expressions in DataWeave | MuleSoft Documentation
# Use Regular Expressions in DataWeave
Several DataWeave functions accept regular expressions as arguments, which you can use to return or check for matches. You can also construct regular expressions that incorporate DataWeave expressions that include functions and variables.
## Return Matches from a String
This example uses regular expressions in a number of DataWeave functions to return matches to an input variable "mycompany.com".
  * `contains` returns `true` based on a regular expression that matches part of the input string.
  * `find` returns an array of indices that specify the matching locations in the input string. This function treats the input string as a string array.
  * `match` returns an array of substrings that match the regular expression.
  * `matches` returns `true` because the regular expression matches the input string exactly.
  * `replace` returns a URL that changes `.com` in the input string to `.net`, based on the regular expression `\..*m`.
  * `scan` returns a subarray of comma-separated substrings that the regular expression matches.
  * `splitBy` splits an input string into an array of substrings based on the `.` in the input.


DataWeave Script:
```
%dw 2.0
var myString = "mycompany.com"
output application/json
---
{
	"contains" : myString contains(/c.m/),
	"find" : myString find(/[m|n].|m$/),
	"match" : myString match(/([a-z]*).[a-z]*/),
	"matches" : myString matches(/([a-z]*).[a-z]*/),
	"replaceWith" : myString replace /\..*m/ with ".net",
	"scan" : myString scan(/([a-z]*).(com)/),
	"splitBy" : myString splitBy(/[.\/]/)
}
```

Output JSON:
```
{
 "contains": true,
 "find": [
  [
   0
  ],
  [
   4
  ],
  [
   7
  ],
  [
   12
  ]
 ],
 "match": [
  "mycompany.com",
  "mycompany"
 ],
 "matches": true,
 "replaceWith": "mycompany.net",
 "scan": [
  [
   "mycompany.com",
   "mycompany",
   "com"
  ]
 ],
 "splitBy": [
  "mycompany",
  "com"
 ]
}
```

For function documentation, see:


## Use DataWeave Variables and Functions in a Regular Expression
This example constructs a regular expression by using the DataWeave concatenate function (`++`) to incorporate a DataWeave variable into a regular expression. The regular expression matches "somebiz". The example uses `replace` and `with` to replace "somebiz" with "abcd".
DataWeave Script:
```
%dw 2.0
var myCompany = { "name" : "biz" }
var myInputA = "somebiz-98765"
output application/json
---
{
 example: myInputA replace (("(^s.*e)" ++ myCompany.name) as Regex) with ("abcd")
}
```

Output JSON:
```
{
 "example": "abcd-98765"
}
```

## See Also
  * Regex (dw::Core Type)
  * Core Types (dw::Core)
  * DataWeave Selectors
  *
toLocalDateTimeOrNull | MuleSoft Documentation
# toLocalDateTimeOrNull
## toLocalDateTimeOrNull(str: String, formatters: Array<Formatter>): LocalDateTime | Null
Transforms a `String` value into a `LocalDateTime` value using the first `Formatter` that matches with the given value to transform.
If none of the `Formatter` matches with the given value, the function returns a `null` value.
_Introduced in DataWeave version 2.5.0._
### Parameters
Name | Type | Description  
---|---|---  
The `String` value to transform into a `LocalDateTime` value.  
`formatters` | Array<Formatter> | The `array` of formatting to use on the `LocalDateTime` value.  
### Example
This example shows how `toLocalDateTimeOrNull` behaves with different inputs. It produces output in the `application/dw` format.
#### Source
```
%dw 2.0
import * from dw::util::Coercions
output application/dw
---
{
 a: toLocalDateTimeOrNull("2003-10-01 23:57:59", [{format: "uuuu/MM/dd HH:mm:ss"}, {format: "uuuu-MM-dd HH:mm:ss"}]),
 b: toLocalDateTimeOrNull("2003-10-01 23:57:59", [{format: "uuuu/MM/dd HH:mm:ss"}])
}
```

#### Output
```
{
 a: |2003-10-01T23:57:59| as LocalDateTime {format: "uuuu-MM-dd HH:mm:ss"},
 b: null
}
```
FTP Connector XML and Maven Support | MuleSoft Documentation
# FTP Connector XML and Maven Support
Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio.
If you manually code a Mule runtime engine (Mule) app in XML, either from the Anypoint Studio XML editor or from a text editor, you can get access to the connector in your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file.
When you add the connector in Studio, Studio automatically populates the XML code with the connector’s namespace and schema location. It also adds a dependency to the `pom.xml` file.
## Add a Namespace for the Connector
Paste the following code inside the `<mule>` tag of the header of your configuration XML:
```
http://www.mulesoft.org/schema/mule/ftp
http://www.mulesoft.org/schema/mule/ftp/current/mule-ftp.xsd
```

This example shows how the namespace statements are placed in the `<mule>` XML block:
```
<mule xmlns:ftp="http://www.mulesoft.org/schema/mule/ftp"
	xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
	xmlns:http="http://www.mulesoft.org/schema/mule/http"
	xmlns:file="http://www.mulesoft.org/schema/mule/file"
	xmlns="http://www.mulesoft.org/schema/mule/core"
	xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core
	http://www.mulesoft.org/schema/mule/core/current/mule.xsd
	http://www.mulesoft.org/schema/mule/file
	http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd
	http://www.mulesoft.org/schema/mule/http
	http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
	http://www.mulesoft.org/schema/mule/ee/core
	http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd
	http://www.mulesoft.org/schema/mule/ftp
	http://www.mulesoft.org/schema/mule/ftp/current/mule-ftp.xsd">
```

## Add a POM File Dependency
The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app. If you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector:
```
<dependency>
 <groupId>org.mule.connectors</groupId>
 <artifactId>mule-ftp-connector</artifactId>
 <version>x.x.x</version>
 <classifier>mule-plugin</classifier>
</dependency>
```

Replace `x.x.x` with the version that corresponds to the connector you are using.
To obtain the most up-to-date `pom.xml` file information:
  1. Go to Anypoint Exchange.
  2. In Exchange, click **Login** and supply your Anypoint Platform username and password.
  3. In Exchange, search for `ftp`.
  4. Select the connector.
  5. Click **Dependency Snippets** near the upper right of the screen.


## See Also
  * Introduction to Anypoint Connectors
  * MuleSoft Help Center
period | MuleSoft Documentation
# period
## period(period: { years?: Number, months?: Number, days?: Number }): Period
Creates a Period value as a date-based number of years, months, and days in the ISO-8601 calendar system.
_Introduced in DataWeave version 2.4.0._
### Parameters
Name | Description  
---|---  
An object such as `{years:4, months:11, days:28}`. The key-value pairs are optional and can be specified in any order. An empty object (`{}`) returns the Period value `"P0D"` (zero days). The default value of each key is `0`. Valid values are whole numbers, which can be positive or negative. Decimal values produce an error message. Key names are selectable.  
### Example
This example shows how `period` behaves with different inputs. The example add a subtracts and adds the result of a `period` function to DateTime and Date values. It also constructs a Period value from `period` objects and selects a `months` value from the object.
#### Source
```
%dw 2.0
output application/json
import * from dw::core::Periods
---
{
  dayBeforeDateTime: |2020-10-05T20:22:34.385Z| - period({days:1}),
  dayAfterDate: |2020-10-05| + period({days:1}),
  yearMonthDayAfterDate: |2020-10-05| + period({years:1, months:1, days:1}),
  emptyPeriod: period({}),
  constructPeriod: period({years:4, months:11, days:28}),
  selectMonthsFromPeriod: period({years:4, months:11, days:28}).months
}
```

#### Output
```
{
  "dayBeforeDateTime": "2020-10-04T20:22:34.385Z",
  "dayAfterDate": "2020-10-06",
  "yearMonthDayAfterDate": "2021-11-06",
  "emptyPeriod": "P0D",
  "constructPeriod": "P4Y11M28D",
  "selectMonthsFromPeriod": 11
}
```
Deploy Mule Applications | MuleSoft Documentation
# Deploy Mule Applications
All Mule applications require deployment to a Mule runtime engine instance to run. MuleSoft supports three different deployment targets: CloudHub, Anypoint Runtime Fabric, and on-premises Mule instances.
When you deploy applications to CloudHub or to Anypoint Runtime Fabric, these services automatically manage the Mule runtime engine instances needed to run the applications.
If you deploy applications on-premises, the installation of Mule runtime engine is required. See On-Premises Deployment Model for more information about characteristics specific to on-premises deployments.
In addition, different tools are available to deploy applications to each of the deployment targets:
Deployment Target | Available Deployment Tools | Mule Runtime Engine Installation  
---|---|---  
  * Anypoint Studio
  * Anypoint Runtime Manager
  * Anypoint Platform CLI
  * Mule Maven plugin

| 
  * No installation of Mule runtime engine is required, because CloudHub workers start Mule instances as part of the deployment process.

  
CloudHub 2.0 | 
  * Anypoint Studio
  * Anypoint Runtime Manager
  * Anypoint Platform CLI
  * Mule Maven plugin

| 
  * No installation of Mule runtime engine is required, because CloudHub 2.0 replicas start Mule instances as part of the deployment process.

  
Anypoint Runtime Fabric | 
  * Anypoint Runtime Manager
  * Runtime Manager in Anypoint Platform Private Cloud Edition
  * Mule Maven plugin

| 
  * No installation of Mule runtime engine is required, because Anypoint Runtime Fabric internally starts Mule instances as part of the deployment process.
  * Installation of Anypoint Runtime Fabric in your desired infrastructure is required

  
On-premises | 
  * Anypoint Studio
  * Anypoint Runtime Manager
  * Runtime Manager in Anypoint Platform Private Cloud Edition
  * Anypoint Platform CLI
  * Mule Maven plugin

| 
  * Installation of Mule runtime engine in your desired infrastructure is required.
  * You are responsible for the installation and configuration of your Mule instances.

  
## See Also
  *   * Anypoint Runtime Fabric
  * Anypoint Runtime Manager
  * Anypoint Platform Private Cloud Edition
  *   * Mule High Availability Clusters
Publishing Assets | MuleSoft Documentation
# Publishing Assets
Publish APIs, API Groups, templates, connectors, policies, Mule XML example code, and custom information assets to a private Exchange instance or an Exchange public portal. Exchange provides a repository for code and APIs, and helps your organization access them easily, model them, and reuse them.
A private Exchange instance makes it easy to provide assets to internal developers by giving them viewer, contributor, or administrator access. Additionally, assets created within a business group are automatically provided to the developers of that business group.
An Exchange public portal enables Exchange administrators to provide assets to developers outside of their own organizations.
Both Exchange views also let users review assets so that asset providers can get feedback.
See the FAQ for additional information.