BassemE/mulesoft-documentation-embeddings huggingface dataset:
X12 EDI Connector 2.10 | MuleSoft Documentation
# X12 EDI Connector 2.10
Support Category: Premium
Anypoint Connector for X12 EDI (X12 EDI Connector) enables you to convert X12 messages to and from DataWeave-compatible representations by using lists and maps. All of the schema definitions you need for supported X12 standard transaction sets are included. For complete information about schemas, see X12 EDI Schema Language Reference.
Many Health Insurance Portability and Accountability Act (HIPAA) document versions are also supported, as listed separately in the Supported HIPAA Versions. For more information about HIPAA usage, refer to Connector HIPAA Standards.
## Prerequisites
To use this connector, you must be familiar with:
  * Anypoint Connectors
  * Mule runtime engine (Mule)
  * Elements and global elements in a Mule flow
  * Creating a Mule app using Anypoint Studio (Studio)


Before creating an app, you must have:
  * Purchased a MuleSoft license for X12 EDI Connector.
Contact your Account Representative about purchasing a license.
  * Anypoint Studio 7.0 or later


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


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


## Next Step
After you complete the prerequisites, you are ready to create your own app and configure the connector using Anypoint Studio.
## See Also
Introduction to Anypoint Connectors
Use Exchange to Discover Connectors, Templates, and Examples
MuleSoft Help Center
Run a Test Suite | MuleSoft Documentation
# Run a Test Suite
Using the BAT CLI, you can execute one test at a time or all tests listed in the `bat.yaml` file for a test suite.
## To Run Tests
  * To run all of the tests that are listed in the `bat.yaml` file for a test suite, run the `bat` command at the root level in your test-suite directory. Your `bat.yaml` file for the test suite must also be at the root level in this directory.
  * To run a single test that is listed in the `bat.yaml` file for a test suite, run the command `bat ./folder/file.dwl` at the root level in your test-suite directory: 

`folder`
    
Specify the path to the test file. 

`file.dwl`
    
Specify the name of the test file.
Your `bat.yaml` file for the test suite must also be at the root level in the test-suite directory.


## What to Do Next
By default in the example test suite that you can generate with the `bat init` command, BAT generates an HTML report about the test results. The configuration of this report is in the `reporters` section on the `bat.yaml` file.
+ .The default configuration of the HTML report
```
reporters:
  - type: HTML
   outFile: /tmp/HTML.html
```

However, you can receive reports of test failures from several supported applications, not just in an HTMl file. See Configuring and Viewing Reports.
Mule Types (dw::Mule) | MuleSoft Documentation
# Mule Types (dw::Mule)
Type | Definition | Description  
---|---|---  
`type Error = { description?: String, detailedDescription?: String, errorType?: ErrorType, childErrors?: Array<Error> }` |  Type that represents an Error and contains the following fields:
  * `description`: Concise description of the error.
  * `detailedDescription`: Detailed description of the error. This message can include information specific to a Java exception.
  * `errorType`: Returns the type of the error.
  * `childErrors`: Lists child Errors, if any. For example, the Scatter-Gather router might throw an error aggregating all of its routes errors as children. Not all failing components aggregate errors, so this type can return an empty collection.

  
ErrorType |  `type ErrorType = { identifier?: String, namespace?: String, parentErrorType?: ErrorType | Null }` |  A type of error that a Mule component can throw. The error type has a `identifier` string that end users can provide in the Mule configuration. Every error belongs to a `namespace` to avoid collisions with errors that have the same `identifier` string but belong to different namespace. Error types can be a specialization of a more general error type, in which case the `parentErrorType` should return the more general error type. This type is used during error type matching within error handlers. So when selecting the general error type for error handling, it also handles the more specialized error types.  
`type Message = Object {class: "org.mule.runtime.api.message.Message"}` |  Type that represents a Mule message.
OAuth 2 Policies | MuleSoft Documentation
# OAuth 2 Policies
In Anypoint Platform, you can work with OAuth solutions on both the server side, for example, by configuring an HTTP or Salesforce connector to access an OAuth-protected server, and the client side, for example, by applying an OAuth 2.0 policy and enforce authentication from your client applications through your own OAuth provider.
You can use the following OAuth provider and policy pairs:
Provider | Policy Name  
---|---  
PingFederate |  PingFederate OAuth Token Enforcement.  
OpenAM OAuth Token Enforcement.  
A Dynamic Client Registration-compliant identity provider |  OpenID Connect Access Token Enforcement.  
Mule OAuth 2.0 |  OAuth 2.0 Access Token Enforcement.  
The Dynamic Client Registration-compliant identity provider needs to conform to the OpenID Connect Client Registration 1.0 incorporating errata set 1.
The API to which you apply an OAuth 2.0 policy supports HTTPS communication using a Mule OAuth 2.0 provider. The provider verifies the validity of OAuth 2.0 credentials.
## See Also
  * OpenID Connect Client Registration 1.0 incorporating errata set 1
  * OAuth 2.0 Access Token Enforcement Using External Provider
  * SAML 2.0 and OpenID Connect Providers
Migrating Filters | MuleSoft Documentation
# Migrating Filters
Mule 4 does not use `filters` anymore. The functionality provided by filters in Mule 3 can be achieved by using the Validation Module.
## Applying Filters
In Mule 3, when a message was filtered, the flow ended silently at that point.
The Validation module fails the flow when a condition is not met, which makes the migrated flow handle the `VALIDATION` error.
The flow with the source for sending the response has to account for the `VALIDATION` error, which you can do by setting a variable in an error handler for validation errors, for example:
Mule 4 example
```
<flow name="flow">
  ...
  <validation:is-true expression="#[...]"/>
  ...
  <error-handler>
    <on-error-propagate type="MULE:VALIDATION">
      <set-variable variableName="filtered" value="true"/>
    </on-error-propagate>
  </error-handler>
</flow>
```

You can then query the set variable in the source’s error response builder to send an appropriate response to the client. For instance, the `http:listener` source might be something like this:
Mule 4 example
```
<flow name="flow">
  <http:listener config-ref="listenerConfig">
    <http:error-response statusCode="#[if (vars.filtered) 400 else 500]"
               reasonPhrase="#[if (vars.filtered) 'Bad Request' else 'Internal Server Error']">
      <http:body>#[error.description]</http:body>
    </http:error-response>
  </http:listener>
  ...
  <validation:is-true expression="#[...]"/>
  <error-handler>
    <on-error-propagate type="MULE:VALIDATION">
      <set-variable variableName="filtered" value="true"/>
    </on-error-propagate>
  </error-handler>
</flow>
```

In this case, a 400 (Bad Request) code will be returned if the event is filtered.
## Migrating Custom or complex Filters
Most likely, any custom or complex/nested filters you used can be migrated to use the expression language. The DataWeave script can be externalized to a file if the same filter needs to be in several places.
For cases where you filter data in ways that DataWeave does not support, you should use the Java module or the Scripting module and use custom code to perform the filtering.
## See Also
DataWeave Language
wrapIfMissing | MuleSoft Documentation
# wrapIfMissing
## wrapIfMissing(text: String, wrapper: String): String
Wraps `text` with `wrapper` if that `wrapper` is missing from the start or end of the given string.
_Introduced in DataWeave version 2.2.0._
### Parameters
Name | Description  
---|---  
The input string.  
The content used to wrap.  
### Example
This example shows how `wrapIfMissing` behaves with different inputs and sizes.
#### Source
```
%dw 2.0
import * from dw::core::Strings
output application/json
---
 {
  "a": wrapIfMissing(null, "'"),
  "b": wrapIfMissing("", "'"),
  "c": wrapIfMissing("ab", "x"),
  "d": wrapIfMissing("'ab'", "'"),
  "e": wrapIfMissing("/", '/'),
  "f": wrapIfMissing("a/b/c", '/'),
  "g": wrapIfMissing("/a/b/c", '/'),
  "h": wrapIfMissing("a/b/c/", '/')
 }
```

#### Output
```
{
  "a": null,
  "b": "'",
  "c": "xabx",
  "d": "'ab'",
  "e": "/",
  "f": "/a/b/c/",
  "g": "/a/b/c/",
  "h": "/a/b/c/"
 }
```

## wrapIfMissing(text: Null, wrapper: String): Null
Helper function that enables `wrapIfMissing` to work with a `null` value.
_Introduced in DataWeave version 2.2.0._
Microsoft Dynamics 365 Business Central Connector 1.0 XML and Maven Support | MuleSoft Documentation
# Microsoft Dynamics 365 Business Central Connector 1.0 XML and Maven Support
Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio:
  * If you manually code a Mule runtime engine (Mule) app in XML, either from the Anypoint Studio XML editor or from a text editor, you can access the connector from your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file.
  * If you add the connector in Studio, Studio automatically populates the XML code with the connector’s namespace and schema location and it also adds a dependency to the `pom.xml` file.


## Add a Namespace for the Connector
Paste the following code inside the `<mule>` tag of the header of your configuration XML:
```
http://www.mulesoft.org/schema/mule/microsoft-dynamics-365-business-central
http://www.mulesoft.org/schema/mule/microsoft-dynamics-365-business-central/current/mule-microsoft-dynamics-365-business-central.xsd
```

This example shows how the namespace statements are placed in the XML block:
```
<mule xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
  xmlns:http="http://www.mulesoft.org/schema/mule/http"
	xmlns:microsoft-dynamics-365-business-central="http://www.mulesoft.org/schema/mule/microsoft-dynamics-365-business-central"
	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/microsoft-dynamics-365-business-central
  http://www.mulesoft.org/schema/mule/microsoft-dynamics-365-business-central/current/mule-microsoft-dynamics-365-business-central.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">
```

## Add a POM File Dependency
The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app. When you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector:
```
<dependency>
 <groupId>com.mulesoft.connectors</groupId>
 <artifactId>mule4-microsoft-dynamics-365-business-central</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 `microsoft dynamics 365 business central`.
  4. Select the connector.
  5. Click **Dependency Snippets** near the upper right of the screen.


## See Also
  * Introduction to Anypoint Connectors
  * MuleSoft Help Center
Rate Limiting Policy | MuleSoft Documentation
# Rate Limiting Policy
When you click Apply to apply a policy, the policy configuration dialog appears. You set the number of requests, period of time for receiving the requests, and a time unit. For example, in the Limits section of the policy configuration dialog, you can set the following limits.
# of Reqs | Time Period | Time Unit  
---|---|---  
Millisecond  
Millisecond  
In the case of the rate limiting policy, if the API receives 123 requests within 2000 ms, the API rejects further requests, and if the API receives 100 requests within 1000 ms, the API rejects further requests. In the case of the throttling policy, requests are queued instead of rejected.
## See Also
  * Rate-Limiting SLA Policy
between | MuleSoft Documentation
# between
## between(endDateExclusive: Date, startDateInclusive: Date): Period
Returns a Period (P) value consisting of the number of years, months, and days between two Date values.
The start date is included, but the end date is not. The result of this method can be a negative period if the end date (`endDateExclusive`) is before the start date (`startDateInclusive`).
Note that the first parameter of the function is the `endDateExclusive` and the second one is the `startDateInclusive`.
_Introduced in DataWeave version 2.3.0._
### Parameters
Name | Description  
---|---  
`endDateExclusive` | The end date, exclusive.  
`startDateInclusive` | The start date, inclusive.  
### Example
This example shows how `between` behaves with different inputs.
#### Source
```
import * from dw::core::Periods
output application/json
---
{
  a: between(|2010-12-12|,|2010-12-10|),
  b: between(|2011-12-11|,|2010-11-10|),
  c: between(|2020-02-29|,|2020-03-30|)
}
```

#### Output
```
{
  "a": "P2D",
  "b": "P1Y1M1D",
  "c": "P-1M-1D"
 }
```
Configuring the FTP Server Utility in an MUnit Test | MuleSoft Documentation
# Configuring the FTP Server Utility in an MUnit Test
Anypoint Code Builder 
Anypoint Studio 
If you want to test the following Mule application:
```
<sftp:config name="SFTP_Config">
  <sftp:connection host="${ftp.host}" port="${ftp.port}" username="${ftp.user}" password="${ftp.password}"/>
</sftp:config>
<configuration-properties file="ftp.properties" />
<flow name="listFlow">
  <sftp:list config-ref="SFTP_Config" directoryPath="."/>
  <foreach>
    <logger level="INFO" message="#[attributes.fileName]"/>
  </foreach>
</flow>
```

The `ftp.properties` in `src/main/resources` has the following content:
```
ftp.host=localhost
ftp.port=22
ftp.user=max
ftp.password=munittest
```

The username field can’t be empty. If you don’t have a username-password pair, set the username to `anonymous` and don’t set any password. By default, the `anonymous` attribute is set to `true`.
## Install the FTP Server
To install the FTP server:
  1. Look for the **MUnit Utils FTP Server** module.
  2. Add the module to your project:
```
<!-- Ftp Server Dependency -->
<dependency>
  <groupId>com.mulesoft.munit.utils</groupId>
  <artifactId>munit-ftpserver-module</artifactId>
  <version>2.0.1</version>
  <classifier>mule-plugin</classifier>
  <scope>test</scope>
</dependency>
```

The MUnit FTP server artifact in your POM file must have the `test` scope.


The **MUnit FTP Server** module is located at MuleSoft Nexus repository. The **MUnit FTP Server** module version 3 and later is compatible with Java 17. Previous versions of this module available at Anypoint Exchange are deprecated.   
---  
## Define the FTP Server
To define the FTP server, change the FTP server attributes as follows:
```
<ftpserver:config name="MUnit_FTP_Server_Config">
  <ftpserver:connection port="${ftp.port}" username="${ftp.user}" password="${ftp.password}" secure="true" homeDir="${app.home}"/>
----
</ftpserver:config>
----
```

## Run the Test
After configuring the FTP server, you can run the test:
```
<munit:test name="listFlowTest" description="Test listFlow" >
  <munit:execution>
    <flow-ref name="listFlow"/>
  </munit:execution>
  <munit:validation>
    <munit-tools:assert-that expression="#[sizeOf(payload)]" is="#[MunitTools::greaterThan(0)]"/>
  </munit:validation>
</munit:test>
```

This FTP accepts any user, so you must not set up a user database or list.
## See Also
Discovering and Consuming APIs | MuleSoft Documentation
# Discovering and Consuming APIs
Using a self-service API portal, developers and partners can quickly access applications, interact with documentation, and build products from existing data. API Experience Hub portals enable developers to find, consume, and reuse APIs their are essential to building their products.
For more information, see the following topics:
  * Registering for Access to a Portal
  *   *   * Viewing API Details
  * Requesting Access to an API Instance
  *   * Downloading an API Specification
  * Using the API Console
Disabling, Editing, or Removing a Policy | MuleSoft Documentation
# Disabling, Editing, or Removing a Policy
  1. In Anypoint Platform, click API Manager, and in API Administration, click the API instance.
  2. On the API dashboard, choose Policies.
  3. Click > to expand the policy controls for the policy you want to change.
  4. Click Actions > Disable, Edit, or Remove.
Key Values With AWS | MuleSoft Documentation
# Key Values With AWS
The Key values with AWS action step enables you to extract form data by sending a local file to the AWS Textract service, which returns the extracted key-value pairs.
## Inbound Variables
  * **Directory Path**
  * **File Name**
  * **Password**
  * **Read text from page**
  * **Read text to page**
  * **AWS Credentials**
Or, if **Use custom settings** is activated in the wizard:
    * **Client Id**
    * **Client Secret**
    * **Session Token**
    * **Use Session Token**
    * **Region Endpoint**
  * **Json Path**


## Outbound Variables
  * **Raw Text**
The extracted raw text of the document.
  * **Normalized Json**
The parsed result based on the normalized result and defined Json path.
  * **Raw Json**
The complete AWS response.


## Wizard
  * **Authentication Settings**
The AWS credentials to use for authentication
    * **Pin credentials**
Use this option to reference an existing **Credentials for AWS** configuration.
    * **Use custom settings**
Use this option to manually specify an AWS **Cliend ID** , **Client Secret** , **Region Endpoint** , and **Session Token** for this action step.
  * **Response settings**
    * **JsonPath Expression**
The Json path to the property of the response object.
  * **File Settings**
    * **Directory path**
The path to the directory where the file is located.
    * **File name**
The name of the file to analyze. Supported file types: PDF, JPEG, and PNG.
  * **PDF Settings**
These settings show when the selected file is a PDF.
    * **Automatically detect the best quality for conversion**
Disable this option to manually adjust the image quality.
    * **Image Quality**
Specifies the quality of the image created from the PDF. The value ranges from `10` (lowest quality) to `100` (highest quality).
This property is not available in the Wizard.
    * **PDF file is password protected**
Specifies if the selected PDF file is password protected. When selected, specify the password to open the file in the **Password to open PDF file** filed.
    * **Read entire file**
Instructs the service to read the entire file.
    * **Read page range**
Instructs the service to read the selected range of pages.
      * **From page**
Specify from which page the service starts reading the file.
      * **To page**
Specifies until which page the service reads the file.
      * **Read to end of file**
Instructs the service to continue reading until the end of the file.


## See Also
  *   * Amazon Textract: Form Data (Key-Value Pairs)
  * Building JSONPath Expressions
Troubleshooting Regular Expression Compatibility Issues | MuleSoft Documentation
# Troubleshooting Regular Expression Compatibility Issues
Troubleshoot compatibility issues that occur when using regular expressions:
  * Negative Lookaheads


## Negative Lookaheads
Flex Gateway conforms to Google RE2 regular expression syntax, which does not support negative lookaheads.
Microsoft Dynamics 365 for Finance and Operations Connector 3.1 - XML and Maven Support | MuleSoft Documentation
# Microsoft Dynamics 365 for Finance and Operations 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. 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.
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.
## 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/microsoft-365-for-operations
http://www.mulesoft.org/schema/mule/microsoft-365-for-operations/current/mule-microsoft-365-for-operations.xsd
```

This example shows how the namespace statements are placed in the XML:
```
<mule xmlns:dynamics365ForOperations="http://www.mulesoft.org/schema/mule/dynamics365ForOperations"
	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/dynamics365ForOperations
	http://www.mulesoft.org/schema/mule/dynamics365ForOperations/current/mule-dynamics365ForOperations.xsd">
```

## Add a POM File Dependency
The `pom.xml` Apache Maven file generated by Anypoint Studio contains dependencies for a Mule app. When you code a Mule app manually, include this XML snippet in your POM file to enable access to this connector:
```
<dependency>
 <groupId>com.mulesoft.connectors</groupId>
 <artifactId>mule-microsoft-dynamics365-for-operations-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 `dynamics finance`.
  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
MuleSoft Help Center
Sleep | MuleSoft Documentation
# Sleep
This action step causes the _Workflow_ to be paused for the specified duration.
## Properties
**Sleep interval, msec** Pause time in milliseconds
Advanced Sources Settings | MuleSoft Documentation
# Advanced Sources Settings
## @ClusterSupport
**Available since version 1.1**
You can use this annotation to indicate how the Source behaves when the Mule Runtime is running in Cluster mode, for example:
```
@ClusterSupport(DEFAULT_PRIMARY_NODE_ONLY)
public class JmsListener extends Source<Object, JmsAttributes> {
// ...
}
```

The `@ClusterSupport` annotation takes a parameter of type `SourceClusterSupport`, which can take the following values:
  * NOT_SUPPORTED: The source does not support cluster mode, so it only runs on the primary node. If the primary node crashes, a new primary node will be designated, and the source will be started on it.
  * DEFAULT_ALL_NODES: Runs on all the cluster nodes by default, but the user can choose to only run on the primary one.
  * DEFAULT_PRIMARY_NODE_ONLY: Only runs on the primary node by default, but the user can choose to run on all the nodes.


When the selected value is other than `NOT_SUPPORTED`, a parameter named `primaryNodeOnly` is automatically added so you can configure whether the source should run in all nodes or just the primary ones.
Notice that when this parameter is added, it will be optional, and its default value will depend on the selected cluster support mode.   
---
Anypoint DataGraph Best Practices Ruleset | MuleSoft Documentation
# Anypoint DataGraph Best Practices Ruleset
The DataGraph Best Practices Ruleset is a collection of governance rules you can add as a dependency to any API project you want to use in Anypoint DataGraph. The ruleset is a collection of messages that ensure your API project adheres to DataGraph best practices. The ruleset is publicly available in Exchange and you add the ruleset as a dependency to API specifications in Design Center API Designer. You can also validate an API against the ruleset, using the API Governance CLI.
## Example Use
Consider the following `example-api.raml`:
```
#%RAML 1.0
title: DOCS - Order API
types:
 Order:
  description: An Order
  properties:
   orderId:
    description: The ID of the order
    type: string
  additionalProperties: false

/orders/{orderId}:
 get:
  responses:
   200:
    body:
     application/xml:
      type: Order
```

When you apply the DataGraph best practices ruleset, you see the following warning message:
```
example-api.raml (16:3) ⚠️Warning: [Datagraph Best Practices] Only JSON payloads are supported at the moment in DataGraph. This is the preferred media type format.
```

This message indicates that `application/xml` in the GET command should be `application/json`.
For more information about adding and using rulesets in API Designer, see Finding API Conformance Issues in API Definitions.
Configuring Agent Operations for Einstein AI Connector 1.2 | MuleSoft Documentation
# Configuring Agent Operations for Einstein AI Connector 1.2
## Configure the Agent Define Prompt Template Operation
Use the **Agent define prompt template** operation to define specific prompt templates for use when integrating with the LLM of your choice. This allows you to create natural language prompts that generate responses, extract information, invoke other prompts, or perform any text-based task.
  1. Select the operation on the Anypoint Code Builder or Studio canvas.
  2. In the **General** properties tab for the operation, enter these values:
     * **Template**
Enter the prompt template for the operation.
     * **Instructions**
Provide the instructions for the LLM, outlining the goals of the task.
     * **Dataset**
Specify the dataset for the LLM to evaluate using the provided template and instructions.
  3. In **Additional properties** , enter these values:
     * **Model name**
Select the model name. The default is `OpenAI GPT 3.5 Turbo`.
     * **Probability**
Enter the probability of the model staying accurate. The default is `0.8`. **Locale**
Enter the localization information, which can include the default locale, input locale(s), and expected output locale(s). The default is `en_US`.


This is the XML for this operation:
```
<ms-einstein-ai:agent-define-prompt-template
 doc:name="Agent define prompt template"
 doc:id="f1c29c39-eac9-468c-9c46-4109a66303ec"
 config-ref="Einstein_AI"
 template="#[payload.template]"
 instructions="#[payload.instructions]"
 dataset="#[payload.dataset]"
/>
```

### Output Configuration
This operation responds with a JSON payload containing the main LLM response. Additionally, attributes such as token usage are included as part of the metadata (attributes) but not within the main payload. This additional metadata is particularly useful to track token usage across applications and manage costs associated with LLM adoption.
This is an example response:
```
{
 "response": "{\n \"type\": \"positive\",\n \"response\": \"Thank you for your positive feedback on the training last week. We are glad to hear that you had a great experience. Have a nice day!\"\n}"
}
```

The operation also returns attributes that aren’t within the main JSON payload, which include information about token usage, for example:
```
{
 "tokenUsage": {
   "outputCount": 9,
   "totalCount": 18,
   "inputCount": 9
 },
 "additionalAttributes": {}
}
```

  * `tokenUsage`
Token usage metadata returned as attributes
  * `outputCount`
Number of tokens used to generate the output
  * `totalCount`
Total number of tokens used for input and output
  * `inputCount`
Number of tokens used to process the input


## See Also
  * Using Anypoint Code Builder to Configure a Connector
  * Using Studio to Configure a Connector
  * Einstein AI Connector Reference
  * Einstein AI - Additional Configuration Information
  * MuleSoft Help Center
Viewing Test History | MuleSoft Documentation
# Viewing Test History
You can review the details of past test runs.
## View Test History
  1. Select the monitor for which you want to view test results.
  2. Click **View Monitor History** () to view a list of recent test runs.
The **History** page is opened for the test. The page displays the status of each execution as well as the following associated statistics:
     * The number of endpoints passed from the total number of endpoints tested
     * How long the execution lasted
     * The configuration associated with the execution
     * When the test was last executed
     * The location from which the test was run
  3. Click an execution to see extra information for each tested endpoint:
     * The status of the test
     * The amount of time since the test was executed
     * The type of request
     * The headers in the request
     * The headers in the response
     * The results of the test assertions


## Download Test History
You can download the `result.json` file that contains the full execution information.
Einstein AI Connector 1.2 - Additional Configuration Information | MuleSoft Documentation
# Einstein AI Connector 1.2 - Additional Configuration Information
Einstein AI Connector supports these operations, which are categorized into:
Managing Kubernetes Deployments | MuleSoft Documentation
# Managing Kubernetes Deployments
  * Update Pod Settings for a Flex Gateway Deployment Through a Helm Chart - Change requirements for a Pod that contains Flex Gateway.
  * Autoscale and Add Flex Gateway Replicas to a Namespace - Set a fixed replica count or autoscale to provide additional replicas.
  * Configure Node Selection for Flex Gateway Deployments on Kubernetes (Node Affinity) - Host Flex Gateway on a specialized node that meets specific requirements.
  * Provide a Domain Name for an Application on Your Kubernetes Cluster - Use ExternalDNS to expose an application or service on your Kubernetes cluster through a domain name.
  * Configure Flex Gateway as an Ingress Controller in Local Mode - Configure Flex Gateway as an `IngressClass` to manage `Ingress` resources.
  * Integrating Flex Gateway with Istio Service Mesh - Integrate Flex Gateway into your Istio Service Mesh to leverage Flex Gateway policies, logging, and metrics from the Anypoint Platform control plane.


## See Also
  * Upgrade in a Kubernetes Cluster
  * Uninstall from a Kubernetes Cluster
  * Getting Started with Self-Managed Flex Gateway in a Kubernetes Cluster
Retrieve Results from MuleSoft IDP | MuleSoft Documentation
# Retrieve Results from MuleSoft IDP
Retrieve the results of a document processed with MuleSoft IDP. To run this action step, provide an Execution ID, generated during the execution of the Submit Document to MuleSoft IDP action step. The Execution ID links this action step with a document action execution to define which results to retrieve.
Calls to IDP from RPA Builder consume automation credits per page processed in addition to the bot minutes consumed by the RPA process. See Automation Credits Usage and Rates for conversion rates and usage details.
## Before You Begin
Before you begin using this action step, ensure that:
  * Your Anypoint user account has the Build Actions permission.
  * You have the Execution ID generated from a Submit Document to MuleSoft IDP action step.
  * You have IDP document actions published in your organization.
See Publishing Document Actions for additional information.
  * You have a connected app configured to access IDP.
See Processing Documents and Retrieving Results With RPA for configuration instructions.


## Properties
This action step has no properties other than **Common** and **Timing**. See Common Properties for further details.
## Inbound Variables
  * **Client ID**
Client ID of the connected app configured to call IDP
  * **Client Secret**
Client Secret of the connected app configured to call IDP
  * **Connected App Credentials**
Pin credentials containing the Client ID and Client Secret of the connected app configured to call IDP
  * **Execution ID**
Execution ID of the document processing operation
  * **Action ID**
ID of the published document action to call.
  * **Action Version**
Version of the referenced document action.
  * **Anypoint URL**
URL of the Anypoint organization that published the IDP document actions to call.
  * **Organisation ID**
ID of the Anypoint organization that published the IDP document actions to call.


## Outbound Variables
  * **JSON Result**


## Wizard
Specify a combination of **Execution ID** , **Action** , and **Action Version** to query the results of that execution. These lists populate with the available document actions that your organization has published in IDP. Ensure you specify the same **Action** and **Action Version** used in the Submit Document to MuleSoft IDP configuration that generated the **Execution ID** you are checking.
Then, select the connected app credentials to use when connecting to IDP. You can use Pin credentials that you configured or specify the **Client ID** and **Client Secret** manually in the wizard.
## See Also
  * Submit Document to MuleSoft IDP
  *
Microsoft Outlook 365 Connector 1.2 | MuleSoft Documentation
# Microsoft Outlook 365 Connector 1.2
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
Configure Preferred Authentication | MuleSoft Documentation
# Configure Preferred Authentication
Anypoint Connector for SFTP (SFTP Connector) enables you to configure preferred authentication methods in the SFTP global configuration of the connector. The following example shows how to configure different authentication methods in Anypoint Studio.
  1. In Studio, navigate to the **Global Elements** tab.
  2. In the Choose Global Type window, type `sftp` in the search bar.
  3. Select **SFTP Config**.
  4. Click **OK**.
  5. Set **Preferred authentication methods** to **Edit inline**.
  6. Click the plus sign to add one of the valid authentication methods: `GSSAPI_WITH_MIC`, `PUBLIC_KEY`, or `PASSWORD`.
  7. Set **Value** to `GSSAPI_WITH_MIC`.
  8. Complete the remaining connection fields.
  9. Click **Test Connection…​**.
  10. Click **OK**.


In the **Configuration XML** editor window, the configuration looks like this:
```
<sftp:config name="SFTP_Config" doc:name="SFTP Config" >
		<sftp:connection host="localhost" >
			<sftp:preferred-authentication-methods >
				<sftp:preferred-authentication-method value="GSSAPI_WITH_MIC" />
			</sftp:preferred-authentication-methods>
		</sftp:connection>
	</sftp:config>
```

## See Also
  * SFTP Connector Examples
everyEntry | MuleSoft Documentation
# everyEntry
## everyEntry(object: Object, condition: (value: Any, key: Key) -> Boolean): Boolean
Returns `true` if every entry in the object matches the condition.
The function stops iterating after the first negative evaluation of an element in the object.
_Introduced in DataWeave version 2.3.0._
### Parameters
Name | Description  
---|---  
The object to evaluate.  
`condition` | The condition to apply to each element.  
### Example
This example shows how `everyEntry` behaves with different inputs.
#### Source
```
%dw 2.0
import everyEntry from dw::core::Objects
output application/json
---
{
  a: {} everyEntry (value, key) -> value is String,
  b: {a: "", b: "123"} everyEntry (value, key) -> value is String,
  c: {a: "", b: 123} everyEntry (value, key) -> value is String,
  d: {a: "", b: 123} everyEntry (value, key) -> key as String == "a",
  e: {a: ""} everyEntry (value, key) -> key as String == "a",
  f: null everyEntry ((value, key) -> key as String == "a")
}
```

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

## everyEntry(list: Null, condition: (Nothing, Nothing) -> Boolean): Boolean
Helper function that enables `everyEntry` to work with a `null` value.
_Introduced in DataWeave version 2.3.0._
NetSuite Connector 11.3 | MuleSoft Documentation
# NetSuite Connector 11.3
Anypoint Connector for NetSuite (NetSuite Connector) synchronizes data and automates business processes between NetSuite and third-party applications, either on-premises or in the cloud. NetSuite provides cloud-based business management software that helps companies manage core business processes, ERP financials, CRM, e-commerce, inventory, and more.
NetSuite Connector provides the following features:
  * SOAP-based integration
NetSuite Connector 11.0 and later does not support REST-based operations.
  * Generation of NetSuite business objects
  * Different authentication levels
  * Error-handling support


For compatibility information and fixed issues, see the NetSuite Connector Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
  * The NetSuite API
  * Anypoint connectors
  * Mule runtime engine (Mule)
  * Elements and global elements in a Mule flow
  * Creating a Mule app using Anypoint Studio (Studio)


Before creating an app, you must have:
  * Credentials to access NetSuite Web Services
  * Anypoint Studio version 7.3.3 or later


## Common Use Cases for the Connector
  * Quote-to-Cash
Improve cash flow, remove manual order entries, and minimize order errors by leveraging realtime integrations to connect and synchronize data about your customer’s intent to buy from your CRM application, such as Salesforce, into its realization of revenue in NetSuite ERP.
  * Invoice-to-Reconciliation
Automate your Accounts Receivable (A/R) process by automatically applying bank payments against invoices in NetSuite for real-time A/R processing. Streamline accounts payable by automating payment file transfers between NetSuite and your banks.
  * Hire-to-Retire
Build a single view of your employees with realtime synchronization of employee information between Netsuite and your Human Capital Management (HCM) services, such as Workday, Oracle HCM, PeopleSoft, and so on. Automatically trigger employee onboarding processes such as ordering computer equipment, uniforms, system access setup, and so on, while reversing the process upon retirement.


## Authentication types
NetSuite connections use token-based authentication, which uses either a consumer key and token ID or secret pairs to authenticate.
For information about configuring this authentication type, see Using Anypoint Studio to Configure NetSuite Connector.
## Using Exchange Templates and Examples
Anypoint Exchange provides the following templates that you can use as starting points for your apps:
  * Retrieve a List of Customers from NetSuite
  * Salesforce and NetSuite Opportunity Aggrgation


## Next Step
After you complete the prerequisites, you are ready to create your own app and configure the connector using Anypoint Studio.
## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * MuleSoft Help Center
ServiceNow Connector 6.10 | MuleSoft Documentation
# ServiceNow Connector 6.10
Anypoint Connector for ServiceNow (ServiceNow Connector) provides connections between Mule runtime engine (Mule) and ServiceNow apps. Use the ServiceNow operations with the custom ServiceNow tables, along with any operations available through the installed plugins.
For compatibility information and fixed issues, see the ServiceNow Connector Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
  * Anypoint Connectors
  * Mule runtime engine (Mule)
  * Elements in a Mule flow and global elements
  * How to create a Mule app using Anypoint Studio


Before creating an app, you must have access to the ServiceNow target resource and Anypoint Platform.
## Common Use Cases For the Connector
ServiceNow Connector enables organizations to fully integrate business processes across HR, legal, procurement, operations, marketing, and facilities departments. Creating connectivity within and outside of the enterprise is quick and simple with the integration of 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.
For examples, see example use cases, which include getting a ServiceNow incident record.
## Audience
  * New users, read:
    * Using Anypoint Studio to Configure the Connector to create your Mule app
  * Advanced users, read:
    * XML and Maven Support
    * Examples, which provides one or more use cases for the connector


## Connection Types
The following authentication types are supported:
  * Basic
  * OAuth 2.0 Authorization Code


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


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


## Next Step
After you complete the prerequisites and experiment with templates and examples, you are ready to create an app with Anypoint Studio.
## See Also
  * Introduction to Anypoint Connectors
  * Use Anypoint Exchange to Discover Connectors, Templates, and Examples
  * ServiceNow Connector Release Notes
  * ServiceNow Connector on Exchange
  * MuleSoft Help Center
Microsoft Dynamics 365 for Finance and Operations Connector 2.2 | MuleSoft Documentation
# Microsoft Dynamics 365 for Finance and Operations Connector 2.2
Anypoint Connector for Microsoft Dynamics 365 for Finance and Operations (Microsoft Dynamics 365 for Operations Connector) enables integration with Microsoft Dynamics 365 for Operations Web API. You can configure this connector using Anypoint Studio. This connector enables connection types for OAuth 2 or OAuth 2 with a username and password.
## Before You Begin
To use this connector, you must be familiar with:
  * The Microsoft Dynamics 365 for Finance and Operations API
  * Anypoint Connectors
  * Mule runtime engine (Mule)
  * Elements in a Mule flow
  * Global elements
  * How to create a Mule app using Anypoint Studio


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


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


## Connection Types
Microsoft Dynamics 365 for Finance and Operations Connector uses the OAuth 2.0 connection type, which delegates user authentication to the service hosting the user account.
## Next Step
After you complete the prerequisites and experiment with templates and examples, you are ready to create an app and configure the connector using Anypoint Studio.
## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * Microsoft Dynamics 365 for Finance and Operations Connector Reference
  * MuleSoft Help Center
isNamespaceType | MuleSoft Documentation
# isNamespaceType
## isNamespaceType(t: Type): Boolean
Returns `true` if the input is the Namespace type.
_Introduced in DataWeave version 2.3.0._
### Parameters
Name | Description  
---|---  
The type to check.  
### Example
This example shows how `isNamespaceType` behaves with different inputs.
#### Source
```
%dw 2.0
import * from dw::core::Types
type ANamespace = Namespace
output application/json
---
{
  a: isNamespaceType(ANamespace),
  b: isNamespaceType(Namespace),
  c: isNamespaceType(String),
}
```

#### Output
```
{
 "a": true,
 "b": true,
 "c": false
}
```
Troubleshooting Data Processing-Related Errors | MuleSoft Documentation
# Troubleshooting Data Processing-Related Errors
If you encounter problems with message validations and transformations, the messages and solutions described here can help you resolve your issue.