BassemE/mulesoft-documentation-embeddings huggingface dataset:
zip | MuleSoft Documentation
# zip
## zip<T, R>(left: Array<T>, right: Array<R>): Array<Array<T | R>>
Merges elements from two arrays into an array of arrays.
The first sub-array in the output array contains the first indices of the input sub-arrays. The second index contains the second indices of the inputs, the third contains the third indices, and so on for every case where there are the same number of indices in the arrays.
### Parameters
Name | Description  
---|---  
The array on the left-hand side of the function.  
The array on the right-hand side of the function.  
### Example
This example zips the arrays located to the left and right of `zip`. Notice that it returns an array of arrays where the first index, (`[0,1]`) contains the first indices of the specified arrays. The second index of the output array (`[1,"b"]`) contains the second indices of the specified arrays.
#### Source
```
%dw 2.0
output application/json
---
[0,1] zip ["a","b"]
```

#### Output
```
[ [0,"a"], [1,"b"] ]
```

### Example
This example zips elements of the left-hand and right-hand arrays. Notice that only elements with counterparts at the same index are returned in the array.
#### Source
```
%dw 2.0
output application/json
---
{
 "a" : [0, 1, 2, 3] zip ["a", "b", "c", "d"],
 "b" : [0, 1, 2, 3] zip ["a"],
 "c" : [0, 1, 2, 3] zip ["a", "b"],
 "d" : [0, 1, 2] zip ["a", "b", "c", "d"]
}
```

#### Output
```
{
 "a": [
  [0,"a"],
  [1,"b"],
  [2,"c"],
  [3,"d"]
  ],
 "b": [
  [0,"a"]
 ],
 "c": [
  [0,"a"],
  [1,"b"]
 ],
 "d": [
  [0,"a"],
  [1,"b"],
  [2,"c"]
 ]
}
```

### Example
This example zips more than two arrays. Notice that items from `["aA", "bB"]` in `list4` are not in the output because the other input arrays only have two indices.
#### Source
```
%dw 2.0
output application/json
var myvar = {
  "list1": ["a", "b"],
  "list2": [1, 2, 3],
  "list3": ["aa", "bb"],
  "list4": [["A", "B", "C"], [11, 12], ["aA", "bB"]]
}
---
((myvar.list1 zip myvar.list2) zip myvar.list3) zip myvar.list4
```

#### Output
```
[
 [
  [ [ "a", 1 ], "aa" ], [ "A", "B", "C" ]
 ],
 [
  [ [ "b", 2 ], "bb" ], [ 11, 12 ]
 ]
]
```
Azure Service Bus Connector 3.2 | MuleSoft Documentation
# Azure Service Bus Connector 3.2
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. This connector does not work with Event Hubs.  
---  
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
  * OpenJDK 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 supports the following connection types to connect to Azure:
  * Shared Access Signature (SAS)
  * Azure Active Directory (AAD)


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 Management Connector
  * Azure Service Bus Connector on Exchange
  * MuleSoft Help Center
toBoolean | MuleSoft Documentation
# toBoolean
## toBoolean(str: String): Boolean
Transform a `String` value into a `Boolean` value.
_Introduced in DataWeave version 2.4.0._
### Parameters
Name | Description  
---|---  
The `String` value to transform into a `Boolean` value.  
### Example
This example shows how `toBoolean` behaves with different inputs.
#### Source
```
%dw 2.0
import * from dw::util::Coercions
output application/json
---
{
 a: toBoolean("true"),
 b: toBoolean("false"),
 c: toBoolean("FALSE"),
 d: toBoolean("TrUe")
}
```

#### Output
```
{
 "a": true,
 "b": false,
 "c": false,
 "d": true
}
```
Look Up Data in a CSV File | MuleSoft Documentation
# Look Up Data in a CSV File
This DataWeave example uses `filter` with `map` to look up data in a CSV file and return a country code for each calling code found within an input array of phone numbers.
The following JSON payload provides an array of phone numbers to the DataWeave script.
```
[
  "54-112724555",
  "1-6298765432"
]
```

The value of the Mule variable `country_codes` is a CSV file that maps calling codes to country codes.
```
CALLING_CODE,COUNTRY_CODE
1,US
7,RU
54,AR
20,EG
32,BE
33,FR
505,NI
506,CR
1876,JM
1905,CA
1939,PR
262262,RE
262269,YT
.,.
.,.
```

The following DataWeave script reads each phone number in the payload and uses the `filter` function to search for the calling code within the Mule variable `country_code` that matches the calling code in the phone number. Then the `map` function gets the country code that corresponds to the calling code and returns the results to an array of JSON objects.
DataWeave Script:
```
%dw 2.0
output application/json
fun lookupCountryCode(phoneNumber: String): String = do {
  var callingCode = (phoneNumber splitBy("-"))[0]
  ---
  (vars.country_code filter ((item, index) -> item.CALLING_CODE == callingCode) map ((item, index) -> item.COUNTRY_CODE))[0]
}
---
payload map ((item, index) -> { phone: item, countryCode: lookupCountryCode(item)})
```

Sample Output (JSON):
```
[
 {
  "phone": "54-112724555",
  "countryCode": "AR"
 },
 {
  "phone": "1-6298765432",
  "countryCode": "US"
 }
]
```

## See Also
  * Supported Data Formats
Transforming a RAML OData v2 API to a CSDL OData v4 API | MuleSoft Documentation
# Transforming a RAML OData v2 API to a CSDL OData v4 API
If you were using the previous APIkit OData extension, you can now reuse the type definition of an OData v2 API to scaffold an OData v4 API by transforming an `odata.raml` file to an `odata.csdl.xml` file automatically.
In Studio, right-click your `odata.raml` file and select **Mule** > **Generate CSDL file**.
APIkit generates an `odata.csdl.xml` file in the **api** folder.
Troubleshooting | MuleSoft Documentation
# Troubleshooting
Troubleshoot errors you recieve when using API Designer:
  * Common Problems in Conforming to RAML 0.8
  * Common Problems in Conforming to RAML 1.0
  * Guide to Defining Examples in RAML 1.0
  * Best Practices when using API Designer
  * Common Errors in Specifying Required Fields in JSON Schemas
  * Differences for OAS 3.0 in Rendered Documentation
  * Simulate Calls to an API
  * Add Behavioral Headers to Simulated API Calls
isAnyType | MuleSoft Documentation
# isAnyType
## isAnyType(t: Type): Boolean
Returns `true` if the input is the Any type.
_Introduced in DataWeave version 2.3.0._
### Parameters
Name | Description  
---|---  
The type to check.  
### Example
This example shows how `isAnyType` behaves with different inputs.
#### Source
```
%dw 2.0
import * from dw::core::Types
type AAny = Any
output application/json
---
{
  a: isAnyType(AAny),
  b: isAnyType(Any),
  c: isAnyType(String),
}
```

#### Output
```
{
 "a": true,
 "b": true,
 "c": false
}
```
Microsoft Dynamics 365 for Finance and Operations Connector 3.1 Additional Configuration Information | MuleSoft Documentation
# Microsoft Dynamics 365 for Finance and Operations Connector 3.1 Additional Configuration Information
In Microsoft Dynamics 365 for Finance and Operations Connector 3.1.7 and later, you can use custom logic to configure properties of complex types when creating entities.
## Configure Complex Types with Custom Logic
In Microsoft Dynamics 365 for Finance and Operations Connector 3.1.6 and earlier, suppose you use the following payload in the **Create** operation:
```
%dw 2.0
output application/java
---
{
  "Name": "GENERIC-CUSTOMER-NAME",
  "CustomerAccount": "CUSTOMER-ACCOUNT",
  "SalesCurrencyCode": "EUR",
  "CustomerGroupId": "GROUP-ID",
  "IsServiceDeliveryAddressBased": "No"
}
```

`IsServiceDeliveryAddressBased` is a property of the `Microsoft.Dynamics.DataEntities.NoYes` type, which is an enum type in the Microsoft data model. Using this payload in the **Create** operation throws an exception because the value for `IsServiceDeliveryAddressBased` is `No`, which is a string instead of an enum type.
In Microsoft Dynamics 365 for Finance and Operations Connector 3.1.7 and later, use the newly added custom logic to properly configure the property and avoid exceptions:
```
%dw 2.0
output application/java
---
{
  "Name": "GENERIC-CUSTOMER-NAME",
  "CustomerAccount": "CUSTOMER-ACCOUNT",
  "SalesCurrencyCode": "EUR",
  "CustomerGroupId": "GROUP-ID",
  "IsServiceDeliveryAddressBased": {
      "muleAdditions": {
        "kind": "enum",
        "type": "Microsoft.Dynamics.DataEntities.NoYes"
      },
      "value" : "No"
    }
}
```

The value for `IsServiceDeliveryAddressBased` must be an object type that contains the following fields:
  * `muleAdditions`
    * `kind`
Key that indicates the kind of complex object. The only supported value is `enum`.
    * `type`
Key that indicates the type in the Microsoft data model. Supported values are any enum type in the Microsoft data model.
To find out the enum type:
      * In Microsoft Dynamics 365 for Finance and Operations Connector 3.1.7 and later, the improved metadata now shows the complete name of a data type.
      * Execute a GET request on `https://{tenant}.com/data/$metadata`. The resulting XML file contains the entire data model.
  * `value`
Key with the enum value as a string.


## Next Step
After you complete configuring the connector, you can try the Examples.
## See Also
  * Introduction to Anypoint Connectors
  * MuleSoft Help Center
MongoDB Connector Additional Configuration Information | MuleSoft Documentation
# MongoDB Connector Additional Configuration Information
## Additional Results in the Response of the Execute Command Operation
The **Execute Command** operation returns one page of results. If an execution returns a cursor reference, invoke the `getMore` command as needed to traverse subsequent pages of results.
Suppose `executeCommand` is invoked with the following command value:
```
{
	"find": ("test"),
	"skip": 0,
	"batchSize": 10
}
```

The `executeCommand` returns a result like this:
```
{
 "cursor": {
  "firstBatch": [
   {
    "_id": {
     "$oid": "..."
    },
    "meta": {
     "view": {
      "id": 1,
//      ...
      }
//     ,{ ... }, ...
    }
//....
   }
  ],
  "id": 9041685167132828464,
  "ns": "test.test"
 },
 "ok": 1.0
}
```

To get additional results until there are none left, use the `getMore` command to retrieve the next page of results:
```
{
	"getMore": 9041685167132828464,
	"collection" : "test",
	"batchSize": 10
}
```

The results of the `getMore` command include a cursor ID to use in subsequent `getMore` commands.
## See Also
MuleSoft Help Center
Configuring API Instances | MuleSoft Documentation
# Configuring API Instances
Use Anypoint Exchange to configure whether API instances are public or private in a private Exchange instance or in an Exchange public portal. For example, configure public or private visibility for proxies or policies associated with your API and set using API Manager.
After you register an API from Exchange in API Manager, the instances for the API appear in Exchange in the API instances list in the navigation bar.
Exchange also declares API instances for APIs managed by another API management program besides Anypoint Platform.
Visibility for each API instance is either private or public. Users can see a private API instance if the asset is shared with them or if they have an Anypoint Platform permission that grants access. All users accessing an Exchange public portal can see all public API instances. All API instances in an Exchange public portal are read only.
In a private Exchange instance, asset administrators have access to change the visibility of API instances, and to add, edit, and delete instances.
REST APIs provide a mocking service with data to test API features. The mocking service is always public.
## Configure Non-Managed Instances
Exchange enables you to configure APIs with instances not managed by API Manager. Add, edit, and delete non-managed instances that are serving AsyncAPIs, GraphQL, REST, and HTTP APIs. You can change the name, URL, and visibility of non-managed instances.
  * Add a non-managed instance:
    1. Select the asset.
    2. In the navigation bar, select **API Instances**.
    3. Click **Add new instance**.
    4. In the **Non-managed instances** section, enter the instance name, URL, select a visibility option, and click .
  * Edit a non-managed instance:
    1. Make your changes and click .
  * Delete a non-managed instance by clicking and clicking **Delete instance**.


## See Also
  * Simulate Calls to an API
Agentforce Connector 1.0 | MuleSoft Documentation
# Agentforce Connector 1.0
Agentforce Connector provides MuleSoft developers with the ability to seamlessly integrate with AI agents running in Salesforce’s Agentforce platform.
Agentforce Connector offers a group of capabilities that simplify agent integration in MuleSoft applications.
Use this connector to:
  * Build AI agents in a low-code environment.
  * Authenticate with a Salesforce org and discover active agents.
  * Start a new session with an AI agent application.
  * Extend the power of Agentforce by surfacing prompts from external applications to AI agents running in Salesforce.
  * Orchestrate new, innovative experiences for your customers, partners and employees.


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


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


To configure the connector, you must create a Connected App in Salesforce. For more information, see Get Started with the Agent API .
## Common Use Cases for the Connector
These are some common use cases for the connector:
  * Customer Service
Increase human agents' productivity by having AI agents complete time-consuming tasks such as reviewing case history, analyzing reported issues, and looking up other related information.
  * Sales
Improve sales team efficacy by accelerating prospect research, generating customized collateral, and preparing contracts.
  * Marketing
Support marketing teams by drafting social media copy, executing market research, and completing campaign analysis.


## Next Step
After you complete the prerequisites, you are ready to create an app and configure the connector using Anypoint Studio or Anypoint Code Builder.
## See Also
  * Anypoint Connectors Overview
  * Using Anypoint Code Builder to Configure a Connector
  * Using Anypoint Studio to Configure a Connector
  * Agentforce Connector Reference
  * MuleSoft Help Center
Monitoring Anypoint MQ | MuleSoft Documentation
# Monitoring Anypoint MQ
Use the Anypoint MQ monitoring features to view usage and audit logging data.
  * Viewing Anypoint MQ Usage Data
You can view a chart that indicates how much data and how many API requests have been consumed, and how many message units were received.
  * Accessing Anypoint MQ Audit Logs
The Anypoint Platform audit logging service logs Anypoint MQ actions on queues, exchanges, and client applications.
Google Calendar Connector 1.0 | MuleSoft Documentation
# Google Calendar Connector 1.0
Anypoint Connector for Google Calendar (Google Calendar Connector) synchronizes data and automates business processes between Google Calendar and third-party applications, either on-premises or in the cloud.
Google Calendar is a calendar and task planning application that focusses on enhancing personal and team productivity. Using Google Calendar, individuals can easily schedule tasks and meetings. They can also share events with colleagues through an easy-to-use calendar interface.
For compatibility information and fixed issues, see the Google Calendar Connector Release Notes.
## Before You Begin
To use this connector, you should be familiar with:
  * The Google Calendar 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 Google Calendar
  * Anypoint Studio version 4.2.1 or later


## Common Use Cases for the Connectors
Common use cases for Google Calendar Connector include the following:
  * Improve scheduling efficiency


Remove the manual effort of scheduling events that are part of established processes. For example, you can create a 15-minute triage meeting automatically whenever a high-severity customer issue is received.
  * Enhance employee productivity


Sync event details, such as customer calls, from external systems like Trello, Asana, and other task planning apps into Google Calendar so that individuals have all of their scheduled engagements in one place.
  * Streamline collaboration


Integrate your team calendar with your team channel on messaging systems like Slack and Teams so that anytime you schedule a new event on your team calendar, your team receives a notification.
## Authentication Types
Google Calendar Connector uses the OAuth 2.0 authentication type, which uses access tokens provided by the authorization server to get access to protected data.
## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * MuleSoft Help Center
Enter String | MuleSoft Documentation
# Enter String
Like the _Keystrokes_ action step, the _Enter String_ action step emulates keyboard inputs. You can use this to enter search criteria or a URL in the browser address bar, for example. You can also use it to execute hotkeys or macros.
The text to be entered can be transferred to the _Enter String_ Action Step from a previously executed action step.
## Properties
**Input String Settings**
**Input string** (string, default blank, cannot be left blank, mapping possible) String to be entered via the emulated keyboard.
**Keyboard Settings**
  * **Initial pause** (integer, ms, default 500 ms, minimum value 0 ms) Pause before emulation of the string input begins.
  * **Key down delay** (default 5 ms, maximum 1000 ms) Duration in ms for which a key or combination of keys is held down. The input will be executed at the start of this delay.
  * **Key up delay** (default 5 ms, maximum 1000 ms) Duration in ms for which a key or combination of keys is released.


**Window Settings**
  * **Use a regular expression for window title** If this option is active, the string entered in the _Window Title_ field will be interpreted as a regular expression (see also the section on Using Regular Expressions).
  * **Window title** Title of the window where the keyboard inputs are to be executed.


## Inbound Variables
**Input string**
**Window title**
## Outbound Variables
The _Enter String_ action step possesses no Outbound Variables.
## Wizard
**Input String Settings**
The Input String can be supplemented by Insert Variables.
**Window Handling Timing**
You have the option to specify the title of the window where the string is to be entered under Window Title.
If you click on the Collect Window Titles button you can then select a title from the drop-down list of all the windows which are presently open. To open them click the mouse on the arrow symbol at the right-hand side of the input window.
The _Window title_ can also be described using a regular expression. For this, please select the check box to _Use a regular expression for window title_.
Please make sure for extended input sequences that the _Key up delay_ is set for long enough to send the keyboard inputs to the correct window.
There is a visual explaining Keyboard Settings in the section on Keystrokes.
## Enter String or Keystrokes?
If you need the _window text_ to specify the input window or want to record the text that is to be entered directly via the keyboard, please use the _Keystrokes_ action step.
In all other cases, and in particular if the text for inputting is to be transferred by means of a Pin Variable, please use the _Enter String_ action step.
Built-In Connectors | MuleSoft Documentation
# Built-In Connectors
Anypoint connectors and modules are extensions to Mule runtime engine that process event data within a Mule application. Connectors, unlike modules, also provide ways to connect to external systems or services.
In Anypoint Code Builder, both integrations and implementations are Mule applications.
Anypoint connectors and modules are extensions to Mule runtime engine that process event data within a Mule application. Connectors, unlike modules, also provide ways to connect to external systems or services.
Built-in Anypoint connectors are available from the canvas and configuration XML for integration and implementation projects. These connectors include:
  * Anypoint Connector for Agent2Agent (A2A) (Beta) (<a2a:/>) (A2A Connector)
  * Anypoint Connector for Agentforce (<ms-agentforce:/>) (Agentforce Connector)
  * Anypoint Connector for Database (<db:/>) (Database Connector)
  * Anypoint Connector for Einstein AI (<ms-einstein-ai:/>) (Einstein AI Connector)
  * Anypoint Connector for Email (<email:/>) (Email Connector)
  * Anypoint Connector for File (<file:/>) (File Connector)
  * Anypoint Connector for HTTP (<http:/>) (HTTP Connector)
  * Java Module (<java:/>)
  * Anypoint Connector for MCP (MCP Connector) (<mcp:/>)
  * Anypoint Connector for Salesforce (<salesforce:/>) (Salesforce Connector)
  * Anypoint Connector for Salesforce Data Cloud (<sdc:/>) (Salesforce Data Cloud Connector)
  * Anypoint Connector for Sockets (<sockets:/>) (Sockets Connector)
  * Anypoint Connector for Workday (<workday:/>) (Workday Connector)


Connector XML tags start with a namespace followed by an operation, following the syntax `namespace:operation`, such as `<db:select/>` for a Select operation in Anypoint Connector for Database (Database Connector). For more information, see Using Anypoint Code Builder to Configure a Connector.
Many other connectors are available from your Anypoint Code Builder IDE through Anypoint Exchange:
  * US cloud (non-EU host): Exchange (US)
  * EU cloud (EU host): Exchange (EU)


To find information about more connectors, see Anypoint Connectors Overview, and find documentation on all Anypoint connectors and modules.
Domains | MuleSoft Documentation
# Domains
Using domains greatly enhance performance when you deploy multiple services on the same on-premises Mule runtime engine (Mule). By providing a centralized point for all the shared resources, domains make the class-loading process (and, therefore, metaspace memory usage) more efficient, especially because domain dependencies declared in the `pom.xml` file are also shared in the domain apps.
## Example of Increased Performance Using Domains
Imagine that you have a set of HTTP Proxy applications that also apply one API Gateway policy, such as an IP whitelist. Each application interacts with the same backend. In a Mule instance configured to have 2 GB of heap memory and 256 MB of metaspace, deploying those applications independently without using a proper domain, results in a noticeable reduction in TPS (transactions per second) when deploying 60 or more applications due to saturated resources. At 80 applications, you see deployment issues due to out-of-memory exceptions. You can greatly improve this outcome by using a domain that shares the backend server configuration, increasing the number of applications to beyond 100 while also experiencing a balanced use of machine resources and consistent good performance.
Note that despite the clear performance advantage in using domains, each deployed application adds its own unique complexity to the shared infrastructure resources. To avoid performance impact, before adding an application, identify the overhead by testing each application individually and then test it coexisting with other applications.
## See Also
  *
Changes to APIs Are Not Displaying | MuleSoft Documentation
# Changes to APIs Are Not Displaying
If changes made to APIs are not visible right after you make them, you can refresh the cache to see them:
  1. Log in to your Salesforce organization.
  2. In **Setup** , click **Platform Cache**.
  3. Click the `ACMCache` partition.
  4. If the caches are in use, then the **Clear Cache** button is displayed.
  5. Click **Clear Cache**.
OAuth2 Provider Module 1.1 | MuleSoft Documentation
# OAuth2 Provider Module 1.1
The OAuth2 Provider module enables a Mule runtime engine (Mule) app to be configured as an Authentication Manager in an OAuth2 dance. With this role, the application can authenticate to previously registered clients, grant tokens, validate tokens, or register and delete clients, all during the execution of a flow.
The following documentation assumes a basic knowledge of the OAuth2 authorization protocol. For further reference, see the RFC-6749.
If the app behaves as the client in the OAuth2 dance, use the OAuth Module instead.
## Before You Begin
To use this module, you must be familiar with:
  * Anypoint Connectors
  * Mule runtime engine (Mule)
  * Elements and global elements in a Mule flow
  * Creating a Mule app using Anypoint Studio (Studio)


## Using Exchange Templates and Examples
Anypoint Exchange provides templates that you can use as starting points for your apps and examples that illustrate a complete solution.
## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * MuleSoft Help Center
ServiceNow Connector 6.6 | MuleSoft Documentation
# ServiceNow Connector 6.6
Anypoint Connector for ServiceNow (ServiceNow Connector) provides connections between Mule runtime engine (Mule) and ServiceNow apps. Use the ServiceNow operations with the custom ServiceNow tables, along with any operations available through the installed plugins.
For compatibility information and fixed issues, see the ServiceNow Connector Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
  * Anypoint Connectors
  * Mule runtime engine (Mule)
  * Elements in a Mule flow and global elements
  * How to create a Mule app using Anypoint Studio


Before creating an app, you must have access to the ServiceNow target resource and Anypoint Platform.
## Audience
  * Starting user
To create your Mule app, see Studio Configuration.
  * Power user
Read the XML and Maven Support and Examples topics. The Examples topic provides one or more use cases for using the connector.


## Common Use Cases For the Connector
ServiceNow Connector enables organizations to fully integrate business processes across HR, legal, procurement, operations, marketing, and facilities departments. Creating connectivity within and outside the enterprise is quick and simple with connectivity to over 120 Anypoint connectors.
Use ServiceNow Connector to create instant API connectivity with the ServiceNow API, and quickly and easily interface with ServiceNow from within Anypoint Platform.
Example use cases includes getting a ServiceNow incident record.
## Connection Types
The following authentication types are supported:
  * Basic
  * OAuth 2.0 Authorization Code


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


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


## Next Step
After you complete the prerequisites and experiment with templates and examples, you are ready to create an app with Anypoint Studio.
## See Also
  * Introduction to Anypoint Connectors
  * Use Anypoint Exchange to Discover Connectors, Templates, and Examples
  * ServiceNow Connector on Exchange
  * MuleSoft Help Center
Amazon EC2 Connector 2.5 | MuleSoft Documentation
# Amazon EC2 Connector 2.5
Anypoint Connector for Amazon EC2 (Amazon EC2 Connector) provides connectivity to the Amazon Elastic Compute Cloud (Amazon EC2) API, enabling you to interface with Amazon EC2 to launch as many or as few virtual servers as you need, configure security and networking, and manage storage.
## Before You Begin
To use Amazon EC2 Connector, you must be familiar with:
  * The Amazon EC2 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) user account credentials
  * A secret access key to IAM
  * Access to EC2 via the AWS cloud


## Common Use Cases for the Connector
Common use cases for the connector include:
  * Creating an EBS volume to attach to an instance in the same availability zone
  * Attaching an EBS volume to a running or stopped Amazon EC2 instance
  * Restarting an Amazon EBS-backed AMI that you’ve previously stopped
  * Stopping an Amazon EC2 instance


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


## Authentication Types
Amazon EC2 Connector connections use the following authentication types:
  * Basic
Uses a session token provided by Amazon STS to connect to Amazon EC2
  * Role
Uses the Amazon role ARN that uniquely identifies the role to allow cross-account access


For information about configuring these authentication types, see Using Anypoint Studio to Configure Amazon EC2.
## Next Step
After you complete the prerequisites and try the examples, you are ready to create your own app and configure the connector using Using Anypoint Studio to Configure Amazon EC2 Connector.
## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * Amazon EC2 Connector Reference
  * MuleSoft Help Center
Break Loop | MuleSoft Documentation
# Break Loop
There are cases where you need to exit the _Loop Control Block_ before all iterations have been executed. _Break Loop_ should be used for this purpose.
Using _Break Loop_ only makes sense in combination with a _Managed Control Block_ , because otherwise it would be executed during the first iteration of a _Loop Control Block_ , thus defeating the object of having a loop.
## Properties
  * **Exit Mode** Determines how the loop reacts _after_ using a _Break Loop_ , i.e. with or without error
Get Web Element Text | MuleSoft Documentation
# Get Web Element Text
The _Get Element Text_ action step reads the _innerText_ of an element and returns it as the **Element Text** outbound variable, which makes it available for use in subsequent action steps through Pin Variables.
As an example, you can use this action step to copy an email address or other text from a web page and use it in another application.
## Properties
See Common Properties.
## Inbound Variables
  * **Element XPath**


  * **Window Title**


## Outbound Variables
  * **Element Text** (string, default: blank)
The _innerText_ of the selected element. If the element has no _innerText_ , this action step returns a blank string.


## Wizard
To extract the text from a web element:
  1. Click **Open Browser Wizard**.
  2. Navigate to the site that contains the text element to extract.
  3. Position the mouse over the text element.
  4. When a blue border shows to frame the element, press `F2`.
The properties of the selected element show in the side bar. In addition to the mandatory XPath, you can select other attributes that help define the correct element.
  5. Click **Accept Selection** () at the beginning of the sidebar on the browser wizard.


## Example
In this example, the Get Web Element Text action step captures an email address from a MuleSoft Accelerators documentation article:
Then, in a subsequent Send Mail action step, the email address is entered as the **To** address through a Pin variable:
Process Operations | MuleSoft Documentation
# Process Operations
In the **Process Operations** module, you can get information about processes in the production phase:
  * View the execution timetables of processes that are currently in the production phase.
  * View and manage the deployment of processes.
  * View which user tasks have not been processed yet and reassign them.
  * View pending process changes and implement them.
  * View, record, monitor, and analyze the financial aspects of a process.
Design Center Release Notes | MuleSoft Documentation
# Design Center Release Notes
The following release notes are provided for Design Center:
  * API Designer Release Notes
  * API Mocking Service Release Notes
Database Connector 1.10 | MuleSoft Documentation
# Database Connector 1.10
Anypoint Connector for Database (Database Connector) establishes communication between your Mule app and a relational database. Database Connector can connect to almost any Java Database Connectivity (JDBC) relational database and run SQL operations. An application can support multi-tenant scenarios using the same configuration element, changing the connection attributes based on, for example, information coming from each request.
Database Connector has connection providers that automatically set the driver class name and create JDBC URLs with given parameters for the following databases:
  * Derby
  * Microsoft SQL Server
  * MySQL
  * Oracle


You can set up other JDBC databases using a generic JDBC configuration. Database Connector is JDBC compliant. Ensure that for the connection configuration, you use a driver that is compliant with JDBC to avoid compatibility issues. Additionally, you can reference a JDBC `DataSource` object or an `XADataSource` object, which is required for XA transactions, by creating the object in Anypoint Studio using Spring.
## Before You Begin
To use this connector, you must be familiar with:
  * Anypoint Connectors
  * Mule runtime engine (Mule)
  * Elements and global elements in a Mule flow
  * Creating a Mule app using Anypoint Studio (Studio)


Before creating an app, you must have access to the database target resource, Anypoint Platform, and have downloaded the proper database driver for your database.
## Common Use Cases for the Connector
Database Connector enables you to:
  * Perform predefined queries, dynamically constructed queries, and template queries that are self-sufficient and customizable.
  * Specify DataWeave expressions in connector fields and configure attributes dynamically, depending on the database configuration you use.
  * Use a source listener operation to read from a database in the data source section of a flow.
  * Execute other operations to read and write to a database anywhere in the process section.
  * Perform multiple SQL requests in a single bulk update.
  * Make Data Definition Language (DDL) requests that alter the data structure rather than the data itself.
  * Execute stored procedures and SQL scripts.


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


## Using Exchange Templates and Examples
Anypoint Exchange provides templates that you can use as starting points for your apps and examples that illustrate a complete solution.
  * Database Connector Examples
  * Database Connector Templates


## Next Step
After you complete the prerequisites and try the templates and examples, you are ready to create your own app and configure the connector using Anypoint Studio.
## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * MuleSoft Help Center
literalValueOf | MuleSoft Documentation
# literalValueOf
## literalValueOf(t: Type): String | Number | Boolean
Returns the value of an input belongs to the Literal type.
_Introduced in DataWeave version 2.3.0._
### Parameters
Name | Description  
---|---  
The type to check.  
### Example
This example shows how `literalValueOf` behaves with different inputs.
#### Source
```
%dw 2.0
import * from dw::core::Types
type AType = "Mariano"
output application/json
---
{
  a: literalValueOf(AType)
}
```

#### Output
```
{
 "a": "Mariano"
}
```
lower | MuleSoft Documentation
# lower
## lower(text: String): String
Returns the provided string in lowercase characters.
### Parameters
Name | Description  
---|---  
The input string.  
### Example
This example converts uppercase characters to lower-case.
#### Source
```
%dw 2.0
output application/json
---
{ "name" : lower("MULESOFT") }
```

#### Output
```
{ "name": "mulesoft" }
```

## lower(value: Null): Null
Helper function that enables `lower` to work with a `null` value.
Object Store Connector | MuleSoft Documentation
# Object Store Connector
**Reference:** Object Store Connector Reference
Object Store Connector is a Mule component that allows for simple key-value storage. Although it can serve a wide variety of use cases, it is mainly design for:
  * Storing synchronization information, such as watermarks.
  * Storing temporal information such as access tokens.
  * Storing user information.


Additionally, Mule Runtime uses Object Stores to support some of its own components, for example:
  * The Cache module uses an Object Store to maintain all of the cached data.
  * The OAuth module (and every OAuth enabled connector) uses Object Stores to store the access and refresh tokens.


## Object Store Limitations
Object Stores are not a universal solution for data storage. They do not replace a database, and they are not suitable for every use case. Most importantly, they do not support transactional access or modification. For use cases in which ACID semantics are needed, or for cases where you expect the same key to be updated in parallel, consider another solution.
## Use the Default Object Store
By default, each Mule app has an Object Store that is persistent and always available to the app _without any configuration_. Flows can use it to persist and share data.
If you want to use the default Object Store, you can specify a `key` for the Object Store without selecting or creating an Object Store reference for the Object Store operation, and without specifying an `objectStore` attribute in the XML element for the Object Store component.
You use Anypoint Platform Runtime Manager to deploy Mule apps to CloudHub workers. The key-value pairs (contents) are visible in Runtime Manager if you use persistent Object Store and key-value pairs are stored.
## Use a Custom Object Store
Custom Object Stores must specify an `objectStore` attribute. These Object Stores can be configured to behave differently than the default Object Store. For example, you can indicate whether the Object Store is persistent (so that the Object Store data survives a Mule Runtime crash) or transient (where data does not survive a Mule Runtime crash). Here are some common reasons for defining custom Object Stores:
  * You want to partition your information by storing it in different Object Stores.
  * You want to use advanced Object Store features such as these:
    * Transient/Persistent storage.
    * Specification of a time to live (TTL).
    * Specification of a max capacity.
  * You want to keep different components from sharing state by feeding them with different Object Stores.
  * You want different components to share information by feeding them with the same Object Stores.


## See Also
  * Define an Object Store
  * Store and Retrieve information from an Object Store
  *   * Object Store Connector in Anypoint Exchange
Kubernetes (K8s) Best Practices for Runtime Fabric | MuleSoft Documentation
# Kubernetes (K8s) Best Practices for Runtime Fabric
Review the following Kubernetes best practices for Runtime Fabric. To use the complete value of Runtime Fabric, you can refer to your respective Kubernetes (K8s) provider’s configuration specification for details.
  * Scalability Benchmarks These scale limits define the node count and deployments per Runtime Fabric. These limits are benchmarked on Amazon Elastic Kubernetes Service (Amazon EKS) cluster.
  * Cluster Configuration These cluster configurations help you set up your cluster for Runtime Fabric.
Starting New Test Suites | MuleSoft Documentation
# Starting New Test Suites
Starting a new test suite for testing API endpoints involves only a few steps to create and populate with initial lines a file named `bat.yaml`. This file explains the structure of your test suite to the BAT CLI.
## Start a New Test Suite
  1. Create a directory in your computer’s filesystem.
  2. Change to the new directory.
  3. Create a file named `bat.yaml`.
  4. Open the file for editing.
  5. Add these five lines to specify the name of the test suite:
```
suite:
 name: "name_of_suite_of_tests"
files:
```


name_of_suite_of_tests
    
Specify the name that you want to give the suite of tests that you plan to write.
  6. Save the file.
  7. Create a folder in your directory in which to create tests.
You can give the folder any name.
  8. Optional: Create a folder named `config`.
In this folder, you create configuration files to use for your tests. Configuration files contain variables that are injected to tests at runtime. You can refer to those variables in tests by using the `config` variable.
For example, to refer to a variable named `url` in a configuration file, you use this reference: '$(config.url)'. When you run the `bat` command to execute a test, you specify the configuration file to use by including the `--config=file.dwl` option, where `file.dwl` is the path and name of the configuration file in the folder for your test suite.


## What to Do Next
You can start writing tests.
## See Also
  * Example of a Test Suite
Microsoft Outlook 365 Connector 1.1 | MuleSoft Documentation
# Microsoft Outlook 365 Connector 1.1
Anypoint Connector for Microsoft Outlook 365 (Outlook 365 Connector) enables you to integrate with the Microsoft Outlook 365 service.
For compatibility information and fixed issues, refer to the Microsoft Outlook 365 Connector Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
  * Microsoft Outlook 365 API
  * Anypoint Connectors
  * Mule runtime engine (Mule)
  * Elements and global elements in a Mule flow
  * Creating a Mule app using Anypoint Studio (Studio)


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


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


## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * Microsoft Outlook 365 Connector Reference
  * MuleSoft Help Center
Enabling Portal Access to Salesforce Users | MuleSoft Documentation
# Enabling Portal Access to Salesforce Users
Give existing Salesforce users access to a portal so they can view your API portal. Admins can enable access for Salesforce users without recreating profiles, permission sets, or setting up SSO.
Use the Builder to configure access. After a user requests access, you can approve the request from the **Pending registration requests** page from **Manage users**. An email is sent to the user with instructions about how to log in.
## Enable Portal Access to Salesforce Users
Enable Salesforce users to access the portal.
  1. Enable Salesforce users to log in:
    1. From the Builder, click the **Home** icon > **Administration** > **Login & Registration**.
    2. From the **Login Page Setup** section, select **Allow employees to log in directly to an Experience Cloud Site** and click **Save**.
  2. Add the API Experience Hub Member User permission set:
    1. From **Administration** , click **Members**.
    2. From the **Select Permission Sets** section, select **API Experience Hub Member User from Available Permission Sets** in **Available Permission Sets** and click **Add** to populate the permission set in **Selected Permission Sets**.
    3. Click **Save**.
  3. Add the **Existing User Request Access** Lightning component to the portal page:
    1. From the Builder, click the Lightning component icon, select **Existing User Request Access** from **Custom Components** , and drag the component to where you want it located in a portal page.
    2. Click the component on the page and enter these fields:
       * **Label** : Enter **Username**.
       * **Placeholder** : Enter **Enter your username**.
       * **Redirect to** : Enter the page name to redirect to after a user requests access. The default is to redirect users to the **Registration request successful** page.
       * **Button Label** : Enter a name for the access button.
  4. Approve or reject the user:
    1. Go to **User management** in API management and select **Pending registration requests**.
    2. Locate the user in the list and click **Approve**.


## Remove Portal Access From Salesforce Users
Remove access to the portal access for existing Salesforce users who should no longer access your portal.
  1. In Salesforce, go to **Setup** > **Users** > **Users** and select a specific user.
  2. From **Permission Set Assignments** , delete the **API Experience Hub Member User** permission set and save your changes.
The user won’t be able to log in to the portal. In the portal, the user’s name won’t appear in the **User management** > **Portal Members** list.


## See Also
  * Existing User Request Access Lightning component
  *
isTimeType | MuleSoft Documentation
# isTimeType
## isTimeType(t: Type): Boolean
Returns `true` if the input is the Time type.
_Introduced in DataWeave version 2.3.0._
### Parameters
Name | Description  
---|---  
The type to check.  
### Example
This example shows how `isTimeType` behaves with different inputs.
#### Source
```
%dw 2.0
import * from dw::core::Types
type ATime = Time
output application/json
---
{
  a: isTimeType(ATime),
  b: isTimeType(Time),
  c: isTimeType(String),
}
```

#### Output
```
{
 "a": true,
 "b": true,
 "c": false
}
```