BassemE/mulesoft-documentation-embeddings huggingface dataset:
Anypoint DataGraph Hosting Options and Networking | MuleSoft Documentation
# Anypoint DataGraph Hosting Options and Networking
Anypoint DataGraph supports the following Anypoint Platform hosting options and network configurations.
## Anypoint Platform Control Plane Hosting Options
Anypoint DataGraph is available for US and EU clouds control plane hosting.
## Anypoint Platform Runtime Plane Hosting Options
Anypoint DataGraph must connect to the destination URL you provide when adding an API to the unified schema. You don’t need to make any extra configurations on your runtime plane if you meet any of the following scenarios:
  * Your API implementations run on CloudHub.
  * Your API implementations run on standalone instances and are connected to an Anypoint Virtual Private Cloud (Anypoint VPC).
  * Your API implementations run on any runtime plane hosting option and are public.


If your API instances run on standalone instances, are not public, and are not connected to Anypoint VPC, you must first pair your standalone runtimes to Anypoint VPC. See Request Anypoint VPC Connectivity to Your Network for more information.
## Anypoint DataGraph Architecture and Networking
Anypoint DataGraph is a fully managed service that runs on Anypoint Platform within the default region of your business group. The following diagram shows the general network architecture for DataGraph:
Consumer requests from the public internet are routed to Anypoint DataGraph through shared or dedicated load balancers, depending on your CloudHub or Anypoint Virtual Private Cloud (Anypoint VPC) configuration. DataGraph sends requests to the underlying APIs that make up the unified schema. Similarly, when you make changes in the Anypoint DataGraph UI, those changes trigger updates of Anypoint DataGraph in the Runtime Plane.
If you’re unable to use port 8082 on a shared load balancer, you must set a new URL for Anypoint DataGraph to use on a CloudHub dedicated load balancer (DLB).
## Additional Resources
  * Anypoint Platform Hosting Options
isAttributeType | MuleSoft Documentation
# isAttributeType
## isAttributeType(path: Path): Boolean
Returns `true` if the provided `Path` value is an `ATTRIBUTE_TYPE` expression.
_Introduced in DataWeave version 2.4.0._
### Parameters
Name | Description  
---|---  
The `Path` value to validate.  
### Example
This example shows how `isAttributeType` behaves with different inputs.
#### Source
```
%dw 2.0
import * from dw::util::Tree
output application/json
---
{
 a: isAttributeType([{kind: OBJECT_TYPE, selector: "user", namespace: null},
           {kind: ATTRIBUTE_TYPE, selector: "name", namespace: null}]),
 b: isAttributeType([{kind: OBJECT_TYPE, selector: "user", namespace: null},
           {kind: ARRAY_TYPE, selector: "name", namespace: null}]),
 c: isAttributeType([{kind: ATTRIBUTE_TYPE, selector: "name", namespace: null}])
}
```

#### Output
```
{
 "a": true,
 "b": false,
 "c": true
}
```
Continuous Integration | MuleSoft Documentation
# Continuous Integration
The need for continuous integration (CI) for a project is very important. By using Maven as your build tool, you can create a build that gets triggered on every project change, and run all of its unit and functional tests automatically.
The advantages of CI are:
  * Provides early notification of issues in the software development lifecycle.
  * Ensures code gets fully tested before release.
  * Successfully tested branches ensure better success when merging to the main branch.


## Continuous Integration Objectives
A CI system does all of the following:
  1. Listens for new commits to a project’s source code management system. The CI system watches many branches for new commits. You can either use polling to find new commits, or the management system can trigger events that inform your program of commits.
  2. Pulls the newest branch into a centralized server.
  3. Creates build jobs on a centralized server.
  4. Runs configurable unit and integration tests on the code base that compile, test, package, and deploy the project in a sandbox to ensure the project works correctly.
  5. Stores artifacts in a repository.
  6. Displays the results of each build.
  7. Deploys passing builds to production.


For information about these tools, see their websites.
## MuleSoft CI Tools
You can deploy Mule applications using:
  *   * The Runtime Manager Agent


You can create functional tests with MUnit Unit Testing.
The mule-maven-plugin supports deployments to:
  * CloudHub
  * Runtime Fabric
  * On-premises Mule instances
    * Standalone deployment
    * Using Anypoint Runtime Manager REST API
    * Using Runtime Manager agent


For a complete CI example that uses Jenkins and Maven, see the Anypoint Platform Development: Advanced class on the MuleSoft training site. The training site also includes related classes and certification exams.
## External CI Tools
Popular CI tools are:
  * Jenkins
  * Hudson
  * TeamCity
  * Bamboo


For information about these tools, see their websites.
## Integration Notes
If you’ve chosen to use connectors in your functional test cases, watch out for potential port conflicts that can occur in a continuous build server.
If your target deployable is a web application and not a Mule application, consider using Junit Integration Test Runner for running your functional tests and avoiding port conflicts.
## See Also
  * Maven Support in Mule
  *
Anypoint MQ Setup Guide | MuleSoft Documentation
# Anypoint MQ Setup Guide
To create the Anypoint MQ destinations that are required by the MuleSoft Accelerator for Salesforce OMS components, use the `Anypoint-MQ-Configuration` Postman collection in the Accelerator B2B Common Resources project.
## Environment Settings
Create the `dev` environment by using the template in the Accelerator B2B Common Resources project and importing it into your Postman workspace. Assign the values that reflect your target Anypoint Platform org before running the requests.
## Run the Collection
The collection defines the variables that you must override prior to running requests. The collection is organized into separate folders, which you must execute in the following order:
  1. Authorization
  2. Client-Management - This variable is optional.
  3. Queue-Management
  4. Exchange-Management


Run requests in the Verification folder to validate the results of the previous operations. You can also run the requests in the Deletions folder to clean up objects created by the collection.
## Verify Destinations
Successful execution of the collection creates the following Anypoint MQ destinations:
Queue Name | Bound to Exchange | Dead Letter Queue Name  
---|---|---  
accel-b2b-orders-update-queue | accel-oms-update-exchange | accel-b2b-orders-update-dl-queue  
accel-oms-exception-queue  
accel-retail-update-queue | accel-retail-update-exchange | accel-retail-exception-dl-queue  
accel-shipping-update-queue | accel-shipping-update-exchange | accel-shipping-exception-dl-queue  
## See Also
  *   * MuleSoft Accelerator for Salesforce OMS
Merging Branches | MuleSoft Documentation
# Merging Branches
When you merge branches, you combine a target branch with changes from a forked source branch, often called a _feature branch_. The target branch reflects these changes, and the source branch remains unmodified. You can merge branches within the API Designer interface.
## Merge A Branch
  1. In the Design Center **Projects** list, click a project name to open the text editor. The **Merge** button appears next to the branch selector component button (if branches have already been created).
  2. Click Merge.
  3. In the **Merge branch** dialog, select the target branch in the dropdown list of branches.
  4. Expand **Advanced Settings**.
  5. Select **Squash commits**.
Squashing commits compacts the source branch’s commits into a single commit for merging and keeps the target branch’s commit history clean and concise.
  6. To automatically delete the source branch after merging, select **Delete branch**.
  7. Click **Merge**.
After merging, the merge target branch becomes the current branch.


## Resolving Merge Conflicts
Merge conflicts arise when either the source branch or the target branch contain changes (commits) that are not in the other branch. When merge conflicts occur, you must choose which branch to bring forward. You can specify the source branch or the target branch.
Viewing Key Metrics for Flex Gateway APIs | MuleSoft Documentation
# Viewing Key Metrics for Flex Gateway APIs
API Manager and Anypoint Monitoring collect metrics on active Flex Gateway API instances. You can view charts related to these metrics and filter the data by date.
The metrics available in API Manager are considered **Key Metrics** and are described here. **Key Metrics** are available with all Anypoint Platform subscriptions. For additional Flex Gateway API metrics not included in the **Key Metrics** section, use Anypoint Monitoring (Anypoint Integration Advanced package or Titanium subscriptions only). You can navigate to Anypoint Monitoring by clicking **Anypoint Monitoring** from Anypoint Platform.
The **Mule API Analytics** tab in API Manager is currently not available for Flex Gateway APIs. Use the **Key Metrics** or the additional metrics in Anypoint Monitoring.  
---  
## Key Metrics
  1. Log in to Anypoint Platform.
  2. In the navigation bar or the Anypoint Platform page, click **API Manager**. The **API Administration** page appears, showing a list of APIs that are available in your organization.
  3. Click the API instance. The **API Summary** page appears, showing general information and the status of the API instance.
To see an API instance in Anypoint Monitoring, from the **Key Metrics** section click **View more metrics in Anypoint Monitoring dashboard** or navigate to Anypoint Monitoring directly.


The **Key Metrics** section shows four charts. If charts do not appear for your API instance, refresh your browser.
## Understanding Key Metrics
The **Key Metrics** section of the API summary contains the following charts: 

Total Requests
    
Sum of requests in the selected time period for the given API.
Data is aggregated in one minute increments. 

Total Policy Violations
    
Sum of requests that return policy violations.
Data is aggregated in one minute increments. 

Total Errors
    
Sum of HTTP response codes that occur in the selected time period. The response codes counted in this metric are 400, 401, 402, 403, 404, 405, 408, 409, 410, 411, 412, 413, 415, 416, 417, 420, 422, 429, 500, 502, 503, 504, 504, 510, and 511.
Data is aggregated in one minute increments. In the chart, HTTP response codes are abbreviated as 4xx and 5xx. 

Average Response Time
    
Average response time of requests in the selected time period for the given API.
Data is aggregated in one minute increments.
## Setting the Time Period for Key Metrics
You can view the data points collected for the last given period of time (such as the last 5 or 30 minutes) or over a given date and time range. Use the drop-down in the calendar icon to select the time period to display.
## What’s Next?
  * Create alerts using the metrics related to an API instance with the Alerts feature in API Manager or with the Basic Alerts feature in Anypoint Monitoring.
  * View built-in API dashboards in Anypoint Monitoring where you can see additional metrics, filter data by date, and export data into a CSV. (Anypoint Integration Advanced package or Titanium subscriptions only)
CLI for Runtime Fabric Instances | MuleSoft Documentation
# CLI for Runtime Fabric Instances
Command | Description  
---|---  
runtime-mgr rtf list |  Lists available Runtime Fabric instances  
## runtime-mgr rtf list
```
> runtime-mgr rtf list [options]
```

This command lists available Runtime Fabric instances.
This command accepts only the default options: `--help`, `-f`/`--fields` and `-o`/`--output`.
For information about managing your Runtime Fabric instances using the command line, see Supported rtfctl Commands.
Force OK State | MuleSoft Documentation
# Force OK State
This action step can reset an error state to OK. A process can thus be continued despite an ERROR. In addition to this, it does not have any other configurable settings or wizard functions.
Please note that the action step is only useful if you set it in the _OnError_ section of a Managed Block. This is because only in this section will the error be treated as dealt with and processing the Activity Workflow can be continued.
If you place the action step at a different point and the error occurs with a prior action step, the _Force OK State_ action step can never be called. The Activity Workflow will therefore be terminated with Error at this point.
Documenting an API | MuleSoft Documentation
# Documenting an API
Anypoint Exchange lets you create API Notebooks which let you describe each function in your API and provide a test area so that users can experiment with sending different values to the API and receiving output.
After creating your API Notebook you can optionally create an API instance to control whether the notebook is private or public. By setting the notebook’s instance to private, others in your organization can review it. When you are ready, you can set the API instance to make the API Notebook public.
API Notebooks are independent of the use of an API instance. If you don’t use a base URI in your RAML, or use an API instance, you can use the mocking service to generate test data.   
---  
Topics:
  * To Document an Asset Using API Notebook
  * To Configure API Instances


## See Also
  * To Describe an Asset
  * Generating API Documentation With Einstein Generative AI
Using API Catalog CLI with a Network Proxy | MuleSoft Documentation
# Using API Catalog CLI with a Network Proxy
API Catalog CLI can be run through a network proxy to add a layer of security. To use the API Catalog CLI with a proxy server, configure the `HTTP_PROXY` or `HTTPS_PROXY` environment variables with the hostname or IP addresses of your proxy servers as shown in the following sections.
## Configure a Proxy Server Without Authentication
To configure a proxy server that does not require authentication, use the following commands:
  * Linux, macOS, or Unix
`$ export HTTP_PROXY=http://_proxy-server_:80`
`$ export HTTPS_PROXY=https://_proxy-server_:443`
  * Windows
`> set HTTP_PROXY=http://_proxy-server_:80`
`> set HTTPS_PROXY=https//_proxy-server_:443`


## Configure a Proxy Server With Authentication
To configure a proxy server that requires authentication, use these commands:
  * Linux, macOS, or Unix
`$ export HTTP_PROXY=http://_username_:_password_@_proxy-server_:80`
`$ export HTTPS_PROXY=https://_username_:_password_@_proxy-server_:443`
  * Windows
`> set HTTP_PROXY=http://_username_:_password_@_proxy-server_:80`
`> set HTTPS_PROXY=https://_username_:_password_@_proxy-server_:443`
Configuring Behavior During Runtime | MuleSoft Documentation
# Configuring Behavior During Runtime
The following configuration settings determine the behavior of the APIkit for REST module during runtime:
  * Validating Query Parameters and Headers
  * Configuring the Response Headers and Status Code
  * Configure the Service URI
Format According to Type | MuleSoft Documentation
# Format According to Type
This DataWeave example applies changes to the keys in an object, depending on the type of their corresponding values. When the element is an array, the keys are pluralized. When it’s a number, they are set to camel case. In any other case they are capitalized.
The example uses:
  * `mapObject` to go through each element in the payload.
  * `if` to check that an element is of a given type.
  * `camelize` from the String library to apply a camel case format to strings (all words stringed together, using upper case letters to mark separations).
  * `capitalize` from the String library to apply a capitalized format to strings (all words are separate and start with an upper case letter).
  * `pluralize` from the String library to change singular words into plural.


DataWeave Script:
```
%dw 2.0
import * from dw::core::Strings
output application/json
---
payload mapObject ((elementValue, elementKey) -> {
 (if (elementValue is Array)
   pluralize(elementKey)
  else if(elementValue is Number)
   camelize(elementKey)
  else capitalize(elementKey)) : elementValue
})
```

Input JSON Payload:
```
{
 "VersionNo": 1.6,
 "StoreOfOrigin": "SFO",
 "Item":
  [
   {
    "ID":"34546315801",
    "DeliveryMethod":"AIR",
    "Quantity":8
   },
   {
    "ID":"56722087289",
    "Boxes": 3,
    "DeliveryMethod":"GROUND",
    "Quantity":2
   }
  ]
 }
```

Output JSON:
```
{
 "versionNo": 1.6,
 "Store Of Origin": "SFO",
 "Items": [
  {
   "ID": "34546315801",
   "DeliveryMethod": "AIR",
   "Quantity": 8
  },
  {
   "ID": "56722087289",
   "Boxes": 3,
   "DeliveryMethod": "GROUND",
   "Quantity": 2
  }
 ]
}
```

## Related Examples
  * Output Self-closing XML tags
  * Insert an Attribute into an XML Tag


## See Also
  * DataWeave Selectors
  *
substringBefore | MuleSoft Documentation
# substringBefore
## substringBefore(text: String, separator: String): String
Gets the substring before the first occurrence of a separator. The separator is not returned.
_Introduced in DataWeave version 2.2.0._
### Parameters
Name | Description  
---|---  
The input string.  
`separator` | String to search for.  
### Example
This example shows how `substringBefore` behaves with different inputs and sizes.
#### Source
```
%dw 2.0
import * from dw::core::Strings
output application/json
---
{
 "a": substringBefore(null, "'"),
 "b": substringBefore("", "-"),
 "c": substringBefore("abc", "b"),
 "d": substringBefore("abc", "c"),
 "e": substringBefore("abc", "d"),
 "f": substringBefore("abc", "")
}
```

#### Output
```
{
 "a": null,
 "b": "",
 "c": "a",
 "d": "ab",
 "e": "",
 "f": ""
}
```

## substringBefore(text: Null, separator: String): Null
Helper function that enables `substringBefore` to work with a `null` value.
_Introduced in DataWeave version 2.2.0._
Amazon Lambda Connector 1.1 | MuleSoft Documentation
# Amazon Lambda Connector 1.1
Anypoint Connector for Amazon Lambda (Amazon Lambda Connector) enables you to execute AWS Lambda operations within your Mule flows. You can then use the response of the Lambda operation to process another Mule flow as needed.
For compatibility information and fixed issues, see the Amazon Lambda Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
  * The AWS Lambda 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:
  * AWS Identity and Access Management (IAM) access key credentials
  * Access to the AWS Lambda target resource
  * Anypoint Studio version 7.3 or later


## Common Use Case for the Connector
When your app manages large amounts of streaming data from various sources, Amazon Lambda Connector enables you to send the data stream to an AWS Lambda application that is specifically designed to quickly pull and process the required information. This enables you to manage necessary realtime tasks without slowing down your main application.
## Authentication Types
AWS Lambda Connector supports AWS Lambda authentication.
## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * MuleSoft Help Center
Managing Asset Portal Resources | MuleSoft Documentation
# Managing Asset Portal Resources
You can upload up to 100 resources to an asset portal. Attempting to add more will result in an error. You can delete resources to reduce the number and then add more up to the limit.
Only image resources can be uploaded to asset portals. Allowed image formats are: `bmp`, `gif`, `ico`, `jpe`, `jpeg`, `jpg`, `png`, `svg`, `tif`, `tiff`, or `webp`. The size limit for an image resource is 2 MB.
These examples show how to list, retrieve, and delete resources from an asset portal with the Exchange Experience API.
## Authentication
Log in to Anypoint Platform and get an authentication token. Begin every request with the header `Authorization: bearer ACCESS_TOKEN`.
```
ACCESS_TOKEN=$(curl https://anypoint.mulesoft.com/accounts/login \
-XPOST -d "username=YOUR_USERNAME&password=YOUR_PASSWORD" | \
jq -r ".access_token")
```

## Using the API
To list all resources:
```
curl https://anypoint.mulesoft.com/exchange/api/v2/assets/:groupId/:assetId/:version/portal/draft/resources \
 -H 'Authorization: bearer YOUR_ACCESS_TOKEN'
```

To get a specific resource:
```
curl https://anypoint.mulesoft.com/exchange/api/v2/assets/:groupId/:assetId/:version/portal/draft/resources/:resourceId \
 -H 'Authorization: bearer YOUR_ACCESS_TOKEN'
```

To delete a specific resource:
```
 curl -X DELETE \
 https://anypoint.mulesoft.com/exchange/api/v2/assets/:groupId/:assetId/:version/portal/draft/resources/:resourceId \
 -H 'Authorization: bearer YOUR_ACCESS_TOKEN'
```

With:
```
groupId: The asset's groupId
assetId: The asset's assetId
version: The asset's version
resourceId: The resource file name.
```
Remove Servers from a Server Group | MuleSoft Documentation
# Remove Servers from a Server Group
Private Cloud Edition 
You might want to remove a server from one group and add it to another group, for example, to better align the group with your organization.
To remove a server from a group:
  1. From Anypoint Platform, select **Runtime Manager**.
  2. Select **Servers** in the left menu.
  3. Click **Group** in the **Type** column to display the details pane.
  4. Click the **X** icon to the right of the server to remove the server from the server group:
Figure 1. The arrow shows the **X** icon in the details pane.
  5. In the **Remove** confirmation window, select the checkbox to verify that you want to remove the server from the group, and then click the **Remove** button.


## See Also
  *   * Delete Server Groups
SAP S/4HANA SOAP Connector 2.3 - Get Started | MuleSoft Documentation
# SAP S/4HANA SOAP Connector 2.3 - Get Started
Anypoint Connector (SAP S/4HANA SOAP Connector) provides full support for the SOAP APIs exposed by SAP S/4HANA Cloud ERP, and starting with version 2.1, also provides support for SAP S/4HANA on-premise ERP. This connector enables you to automatically discover SOAP services enabled on your SAP S/4HANA instance and to invoke the SOAP service and associated operations.
For software requirements and compatibility information, see the SAP S/4HANA SOAP Connector Release Notes.
## Before You Begin
Before you create an app and use this connector, you must:
  * Have a developer account or other valid SAP S/4HANA instance.
  * Have a MuleSoft Enterprise license.
  * Enable discovery service in your SAP S/4HANA instance.
  * Have a communication user that is assigned to the corresponding communication arrangements for the desired APIs.
  * Be familiar with:
    * SAP S/4HANA SOAP
    * Mule runtime engine (Mule)
    * Anypoint Connectors
    * Anypoint Studio essentials


## Common Use Cases For the Connector
Send an XML request to SAP S/4HANA’s SOAP API and print a response.
## Using Exchange Templates and Examples
Anypoint Exchange provides templates you can use as a starting point for your app, as well as examples that illustrate a complete solution.
## Next Step
After you complete the prerequisites and experiment with templates and examples, you are ready to create an app with Anypoint Studio.
## See Also
  * Introduction to Anypoint Connectors
  * SAP S/4HANA SOAP Connector Release Notes
  * SAP S/4HANA SOAP Connector on Exchange
  * MuleSoft Help Center
Resource-Level Policies | MuleSoft Documentation
# Resource-Level Policies
Unless otherwise configured, policies are by default applied to the entire API. However, you can implement an additional level of policy granularity, one in which access is controlled based on a criteria. Policies with this granularity are called _resource-level policies_.
At the resource level of granularity, policies are applied to only those requests that match the criteria. All policies, except the Cross-Origin Resource Sharing (CORS) policy, are resource-level.
In Mule 4, resource-level policies support HTTP-based APIs in addition to RAML APIs. You can apply multiple conditions to filter your resources and HTTP methods using the URI template regex to any number of methods in your API.
## Usage Scenarios for Implementing Resource-Level Policies
You can use resource-level policies in many ways. Here are just a few:
  * Apply policies to specific resources.
  * Secure a subset of an API.
  * Set different limits on resources.


If you have a RAML or OAS specification attached to your API, you can use the **Preview Resource Matching** option to determine which resources are affected by your filters:
A resource-level policy supports Java regular expressions. For example, you can use a wildcard to apply a policy to multiple resources. When you apply the policy to the API, specify the resources to which it applies.
## Guidelines for Implementing Resource-Level Policies
When implementing resource-level policies:
  * Do not use a placeholder, such as {userid}, in the regular expression.
Using a placeholder in an expression fails because the placeholder does not match the actual node. In the example placeholder {userid}, the node looks something like this:
`/api/users/671962fc-f076-4b19-bc38-45ba3a4e4095/permissions/1234`
671962fc-f076-4b19-bc38-45ba3a4e4095 is the user ID.
1234 is the ID of a permission.


To apply a policy to resource `/api/users/{userid}` that represents a single user and all resource nodes, use the following expression:
The `userid` represents a single user and all resource nodes: `/api/users/.*`
To apply a policy to only the permissions resources `/api/users/{userId/permissions}` and `/api/users/{userid}/permissions/{permissionId}`, use the following expression:
`/api/users/.**/permissions.**`
## See Also
  * Configure URI Template Regex
  * Disable Outbound Policies
Java Module XML and Maven Support | MuleSoft Documentation
# Java Module 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/java
http://www.mulesoft.org/schema/mule/java/current/mule-java.xsd
```

This example shows how the namespace statements are placed in the `<mule>` XML block:
```
<mule xmlns:java="http://www.mulesoft.org/schema/mule/java"
	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/java
	http://www.mulesoft.org/schema/mule/java/current/mule-java.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.module</groupId>
 <artifactId>mule-java-module</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 `java module`.
  4. Select the connector.
  5. Click **Dependency Snippets** near the upper right of the screen.


## See Also
  * Introduction to Anypoint Connectors
  * MuleSoft Help Center
Amazon EC2 Connector 2.5 XML and Maven Support | MuleSoft Documentation
# Amazon EC2 Connector 2.5 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
  1. Include the Amazon EC2 namespace and schema location in your configuration file.
Namespace: `http://www.mulesoft.org/schema/mule/ec2` Schema Location: `http://www.mulesoft.org/schema/mule/ec2/current/mule-ec2.xsd`
These statements appear in the `<mule>` block that starts a Mule app:
```
<mule xmlns:ec2="http://www.mulesoft.org/schema/mule/ec2"
	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/ec2
	http://www.mulesoft.org/schema/mule/ec2/current/mule-ec2.xsd">
```

  2. Create a global Amazon EC2 configuration outside your flows, using the following global configuration code:
```
<ec2:config name="Amazon_EC2_configuration" doc:name="Amazon EC2 Configuration" >
	<ec2:basic-connection
		accessKey="${amazon.accesskey}"
		secretKey="${amazon.secretkey}"
		region="${amazon.region}"
		sessionToken="{amazon.sessionToken}"/>
</ec2:config>
```



## Add a POM File Dependency
The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app. If you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector:
```
<dependency>
  <groupId>com.mulesoft.connectors</groupId>
  <artifactId>mule-amazon-ec2-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 `amazon ec2`.
  4. Select **Amazon EC2 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
Preview the Output of a Transformation (Design Center) | MuleSoft Documentation
# Preview the Output of a Transformation (Design Center)
You can provide sample input data to your Transform component to see how the transformation affects it. You don’t need to run your application to use this feature. A sample output is updated in real time as you make changes both to the sample input and the transformation.
  1. On the input pane, select one of the parts of the input (the Payload, Attributes or a specific Variable).
  2. At the bottom of the window, select the Edit Sample Data icon .
  3. The Sample Data tab opens and is populated.
     * If you defined your Data Type through a sample, these same values are used.
     * If you defined your Data Type through a schema or it was automatically defined, values are populated with the string `????` as a placeholder.
Note that when the input is of type POJO (Plain Old Java Object), samples must be written in DataWeave format. This is not a transformation in itself, just a way to express how data is structured.


Example data in DataWeave format:
```
[
 {
   message @(id: "FSD-483"): "Hello World!",
   date: |2017-05-06|,
   items: {
     item1: 434,
     item2: "344222"
   }
 },
 {
   message @(id: "DSF-829"): "This is what DataWeave format looks like.",
   date: |2017-03-21|,
   items: {
     item1: 728,
     item2: "14422"
   }
 }
]
```

  1. Replace these placeholder values with different values.
As you make changes in the sample data or the transformation, notice how the output preview changes.
Note that if your transformer has multiple outputs (for example, to both the payload and a variable), the **Preview** pane displays the one corresponding to the currently selected transformation.


When the output is of type POJO (Plain Old Java Object), the preview is represented in JSON format.
  1. Test your transformation for any special characters or structures that might arrive, verify that the output is what you expected.


Note that samples defined in this pane work only within the **Transform** component. These samples do not affect any other components in your application.
## See Also
DataWeave Language
FTP Connector Examples | MuleSoft Documentation
# FTP Connector Examples
To fully benefit from using Anypoint Connector for FTP (FTP Connector), see the following examples of configuring the connector operations:
  * Read a File Configure the **Read** operation to read a file at any point in the flow.
  * Write a File Configure the **Write** operation to write content into the given path on demand.
  * List Files Configure the **List** operation to list the files and folders in the configured directory path.
  * Copy and Move Files Configure the **Copy** and **Move** operations to copy or move files or directories on demand.
  * Trigger a Flow for a Newly Created or Updated File Configure the **On New or Updated File** source to trigger a flow for a new created or modified file.
  * Connect to an FTP Server Configure the **FTP Connector** global configuration element to connect to an FTP server.
  * Connect to FTP Servers Dynamically Configure the **FTP Connector** to connect dynamically to multiple servers.
  * Configure a Proxy for FTP Connector Configure the **Proxy** field to either HTTP or HTTP tunnel proxy.
  * Disable Pooling Disable Pooling in the FTP Connector Configuration


## See Also
  * Introduction to Anypoint Connectors
  * MuleSoft Help Center
Limitations | MuleSoft Documentation
# Limitations
This release has the following limitations:
  * API Experience Hub does not use platform cache.
  * API Experience Hub functions at the main organization level only.
  * A Salesforce organization can’t connect to more than one Anypoint organization.
  * Multiple portals per Salesforce organization aren’t supported.
  * API Groups aren’t available.
  * New API portals can have a maximum of 1,000 APIs.
  * Existing API portals can have a maximum of 350 APIs.
Don’t make changes to the permissions of the out-of-the-box Teams created in Access Management for API Experience Hub. Each asset added to the API portal uses two permissions and Access Management has a limit of 1,000 permissions per team.
  * Enable scalability on the **API management** page to increase the maximum number of APIs to 1,000 for the API portal. After you enable this option, you can’t revert to the portal version that supports up to 350 APIs.
For more information, see Opt in to Increase the Number of APIs in the Portal.
  * API Experience Hub isn’t certified for use on mobile devices. Some functionality works on mobile devices, but some functionality such as the API Console does not.
  * IP restrictions aren’t supported. For more information, see the Troubleshooting section.
  * Validation rules can’t be applied to standard objects that are created during the Salesforce linking process. For more information, see the Troubleshooting section for a work around.
  * The maximum pending user registration requests is 500. For more information, see Managing Users.
  * The community portal’s default name API Experience Hub can’t be changed. Changing the name of the portal generates errors in the configuration.
  * You can’t change the names of APIs in API Experience Hub.
  * API Experience Hub Lightning custom components support English only. For more information, see API Experience Hub Lightning Components
  * Microsoft Azure OpenID Connect isn’t supported.
Troubleshooting Azure Event Hubs Connector | MuleSoft Documentation
# Troubleshooting Azure Event Hubs Connector
To troubleshoot Azure Event Hubs Connector, 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 is failing, temporarily enable verbose logging for Azure Event Hubs Connector.
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. Access Anypoint Studio and 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 ="com.azure.messaging.eventhubs.checkpointstore.blob" level= "DEBUG"/>
  <AsyncLogger name="com.azure.messaging.eventhubs" level="DEBUG"/>
  <AsyncLogger name="com.azure.core.amqp" level="DEBUG"/>
  <AsyncLogger name="com.azure.identity" level="DEBUG"/>
				...
			</Loggers>
```

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


## Understand Common Throws
Here is a list of common throws messages and how to interpret them.
  * AZURE-EVENTHUBS:AEH_ERROR
```
An error occurs in Azure Event Hubs.
```

  * AZURE-EVENTHUBS:AUTHENTICATION
```
Unable to authenticate to the Azure Event Hubs server.
```

  * AZURE-EVENTHUBS:CONNECTIVITY
```
The client became disconnected from the event hub while attempting to publish an event.
```

  * AZURE-EVENTHUBS:INVALID_INPUT
```
The user sent an invalid input.
```

  * AZURE-EVENTHUBS:RETRY_EXHAUSTED
```
The maximum number of retries for the operation is reached.
```



## See Also
  * MuleSoft Help Center
  *
Activity Tags | MuleSoft Documentation
# Activity Tags
Use Activity Tags to categorize the activities in the Activity Library, which enables you to manage the activities, arrange them more efficiently, and subsequently find them more easily using the search function in the Activity Library Explorer.
## Create Activity Tags
To create new Activity Tags:
  1. In the Activity Library toolbar, click () **Manage Activity Tags**.
  2. Click **Create New Activity Tag**.
  3. Provide a descriptive name for the tag and click **OK**.
The name of the tag must be unique.


If you delete tags, they are removed automatically from all assignments.   
---  
## Assign an Activity Tag
After you create tags, you can assign them to a workflow when you upload the workflow to the Activity Library by using the **Activity Tags** tab.
Select an Activity tag and click () to add it to the workflow, or click () to remove the tag from the workflow.
Use () to add all tags to the workflow or () to remove all tags from the workflow.
## See Also
  * Using the Activity Library
  * Activity Library Explorer
Microsoft .NET Connector 3.1 XML and Maven Support | MuleSoft Documentation
# Microsoft .NET Connector 3.1 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 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 install 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/dotnet>
http://www.mulesoft.org/schema/mule/dotnet/current/dotnet>.xsd
```

This example shows how the namespace statements are placed in the `<mule>` XML block:
```
<mule xmlns:dotnet="http://www.mulesoft.org/schema/mule/dotnet"
	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/dotnet
	http://www.mulesoft.org/schema/mule/dotnet/current/mule-dotnet.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>GROUP_ID_FROM_EXCHANGE</groupId>
 <artifactId>mule-microsoft-dotnet-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 `dotnet`.
  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
log10 | MuleSoft Documentation
# log10
## log10(a: Number): Number | NaN
Returns the logarithm base 10 of a number.
_Introduced in DataWeave version 2.4.0._
### Parameters
Name | Description  
---|---  
A `Number` value that serves as input to the function.  
### Example
This example shows how `log10` behaves with different inputs.
#### Source
```
%dw 2.0
import * from dw::util::Math
output application/json
---
{
 "log1010": log10(10),
 "log1013": log10(0.13),
 "log10-20": log10(-20)
}
```

#### Output
```
{
  "log1010": 1.0,
  "log1013": -0.8860566476931632,
  "log10-20": null
}
```
Using the API Console | MuleSoft Documentation
# Using the API Console
The API Console is an interactive component that shows information about REST APIs and their methods, and enables you to test the methods by sending requests. The API Console is located in the API Details page. Endpoints are displayed in alphabetical order.
The API Console displays the API specifications and documentation information that are critical to the onboarding process and adoption. Developers want to know how to use and integrate APIs.
The Specification pane displays the navigation of the HTTP functions in the REST specification for a REST API. You can understand the format and structure of an output by reviewing the resources and methods.
The Documentation pane displays interactive documentation about an API. API documentation includes detailed descriptions of each API version. This documentation is updated with the API release cycle, usually with close involvement from the development team. You can also review the request information and responses.
The Try it pane enables you to test REST APIs using the mocking service or an API instance URL. The mocking service lets you test endpoints defined in the API specification without an actual server to handle the requests and responses. The mocking service enables you to add simulated data to an API function and test the API with that data. All the responses are example data. Using an API instance enables you to interact with a server and get real data for real requests and responses.
## Review API Specifications and Documentation
To discover information about an API:
  1. On the **Home** or the **APIs** page, select an API.
  2. Select the **API specification** tab.
  3. In the **Specification** pane, click a function.
  4. In the **Documentation** pane, review the summary of the function.
  5. Select the **Requests** tab to view the information for the code example, parameters, security, headers, examples, and body.
  6. Select the **Responses** tab to view the response type, example, headers, and body.


## Test APIs
You can test an API specification using the mocking service when you want simulated data. You can also test an API specification with real data using an instance of the API. If an instance has authorization headers, the request fails when the authorization headers aren’t entered.
For more information about testing APIs, see the following topics:
  * Simulating Calls Using the Mocking Service
  * Testing APIs Using an API Instance
startsWith | MuleSoft Documentation
# startsWith
## startsWith(text: String, prefix: String): Boolean
Returns `true` or `false` depending on whether the input string starts with a matching prefix.
### Parameters
Name | Description  
---|---  
The input string.  
A string that identifies the prefix.  
### Example
This example indicates whether the strings start with a given prefix. Note that you can use the `startsWith(text,prefix)` or `text startsWith(prefix)` notation (for example, `startsWith("Mari","Mar")` or `"Mari" startsWith("Mar")`).
#### Source
```
%dw 2.0
output application/json
---
[ "Mari" startsWith("Mar"), "Mari" startsWith("Em") ]
```

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

## startsWith(text: Null, prefix: Any): false
Helper function that enables `startsWith` to work with a `null` value.
_Introduced in DataWeave version 2.4.0._