BassemE/mulesoft-documentation-embeddings huggingface dataset:
Using Anypoint Platform DataGraph CLI and API Extensions | MuleSoft Documentation
# Using Anypoint Platform DataGraph CLI and API Extensions
You can use the Anypoint CLI DataGraph commands to add and edit API sources in DataGraph. To do so, you must first add the appropriate DataGraph API extensions to the API source.
## Adding Extensions to Your Project
You must add the extensions to your API-specification project as a dependency and then publish the project to Exchange. After you publish your API-specification project, you can add the API to DataGraph using the CLI.
Use API Designer to add the extensions to your project. Follow the steps in Add Dependencies to an API-Specification Project, choosing **Fragments** as the dependency type.
API Designer adds the required dependencies to `exchange.json` and validates the syntax of any annotations you added before publishing your project to Exchange.
## Maintaining RAML Compatibility
To maintain compatibility in RAML specifications with tools that do not support API extensions, these extensions include a “RAML companion” that provides a simple version of RAML annotations definition. To use DataGraph API extensions in RAML, add the following code to the main file of the API-project specification:
```
uses:
 dg: exchange_modules/<group>/<asset>/<version>/datagraph-api-extensions.raml
```

You can change the prefix `dg` if needed, but it must match the prefix used in the extensions.
The `<group>`, `<asset>`, and `<version>` reference the API extensions that are published in Exchange.
## Using the DataGraph CLI versus the DataGraph UI
If you add an API source using the CLI, you cannot edit it or update its version directly in the UI. You must make these changes using the CLI.
## See Also
  * Anypoint DataGraph API Extension Reference
  * Anypoint DataGraph CLI Reference
Set Variable | MuleSoft Documentation
# Set Variable
The _Set Variable_ action step assigns a new value to a variable. You can either enter the new value directly or use an existing variable of the same type, e.g. the input variable of another action step. The variables must be of the same type in order to populate one variable with the content of another variable, e.g. you can only populate a variable of type:Text with another variable of type:Text In order to ensure that the types are the same, this action step has to be configured in several stages (see step-by-step instructions for the wizard below). Validation of variable types is performed when the action step is launched.
Variables from the _BasePath_ **cannot** be modified using the _Set Variable_ action step. Attempting to do so will generate an error message.
Changes to a variable are logged in the _Workflow Run Results_. The logs record both the old and new values of the variables. Variable values that are longer than 16 characters are shown in truncated form.
## Properties
  * **New value** Enter the new value for the variable to be modified. This field is only displayed when the new value is being entered manually. If the new value is based on another variable, the field is not displayed.


Other properties that are the same in all action steps are described in section 2.2. For reasons of clarity they are not shown here.
## Wizard
  * **Variable** The field displays the variable that will be overwritten with _Value_ as well as the variable’s type. If "No Variable is mapped…" is displayed, this means that no variable has been set using the _Mappings Editor_ (in this case, proceed as described in the step-by-step instructions below).
  * **New value** Enter the new value for the variable to be modified. You can also insert variables from the workflow.


Variables from the _BasePath_ **cannot** be modified using the _Set Variable_ action step. Attempting to do so will generate an error message.
## Step-By-Step – Configure Set Variable as Follows
  1. Drag the _Set Variable_ action step to the desired position in the workflow.
  2. Open the _Set Variable_ wizard.
  3. Enter a new value for the variable to be changed in the _Value_ field. You can also insert variables from the _Workflow_. To do so, click the pin button and select one of the available variables.
  4. Click on the pin in the _Set Variable_ action step in the _Workflow_.
  5. In the "Edit Variable Mappings for …" dialog, select the variable that you wish to modify from the "Variable" drop-down menu. The drop-down menu will only show variables that are of the same type. Use the "New value" drop-down menu to set the new variable to the value of another variable. This menu also only displays variables that are of the same type. To use the value specified in the wizard, leave the <None> option in the drop-down menu. Confirm your selection with OK.
  6. The pin for the _Set Variable_ action step will now be shown in red.
  7. As an extra check, open the _Set Variable_ wizard. The "Variable" field should now show the variable to be changed, followed by its type in brackets.
valuesOf | MuleSoft Documentation
# valuesOf
## valuesOf<K, V>(obj: { (K)?: V }): Array<V>
Returns an array of the values from key-value pairs in an object.
_Introduced in DataWeave version 2.3.0._
### Parameters
Name | Description  
---|---  
The object to evaluate.  
### Example
This example returns the values of key-value pairs within the input object.
#### Source
```
%dw 2.0
output application/json
---
{ "valuesOf" : valuesOf({a: true, b: 1}) }
```

#### Output
```
{ "valuesOf" : [true,1] }
```

## valuesOf(obj: Null): Null
Helper function that enables `valuesOf` to work with a `null` value.
_Introduced in DataWeave version 2.4.0._
Java Module Examples | MuleSoft Documentation
# Java Module Examples
To fully benefit from using Java module, see the following examples of configuring the module operations:
  * Create an Instance of a Class Configure the **New** operation to create an instance of a Java class.
  * Invoke Java Methods Configure the **Invoke** and **Invoke static** operations to call Java methods.
  * Transform Arguments Configure Java module to transform the arguments given to a Java invocation even if they don’t exactly match the type expected by the Java method.
  * Test for an Instance of a Class Configure the **Validate type** operation to operation that tests whether an object is an instance of a class.
  * Work with Throwables Configure Java module to use DataWeave functions for throwable instances.


## See Also
  * Introduction to Anypoint Connectors
  * MuleSoft Help Center
SAP S/4HANA OData Connector 2.7 | MuleSoft Documentation
# SAP S/4HANA OData Connector 2.7
Anypoint Connector for SAP S/4HANA OData (SAP S/4HANA OData Connector) provides support for the OData APIs exposed by SAP S/4HANA Cloud and SAP S/4HANA on-premise.
The connector enables you to perform operations to:
  * Create, get, update, and delete entities
  * Retrieve a single entity
  * Query multiple entities
  * Invoke a remote function
  * Execute batch requests that consist of multiple requests


For software requirements and compatibility information, see the SAP S4/HANA Connector Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
  * The SAP S/4HANA OData API
  * Anypoint Connectors
  * Mule runtime (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 SAP S/4HANA OData target resource
  * Anypoint Platform
  * Anypoint Studio 7.3 or later
  * Have a developer account or other valid SAP S/4HANA instance
  * Access to the catalog service that allows you to use the service discovery
  * A communication user that is assigned to the corresponding communication arrangements for the desired APIs


## Common Use Case for the Connector
Perform CRUD operations on entity types of SAP S/4HANA’s OData API and process the response.
## Exchange Templates and Examples
Anypoint Exchange provides templates you can use as a starting point for your app, as well as examples that illustrate a complete solution.
## Next Step
After you complete the prerequisites and experiment with templates and examples, you are ready to create an app with Anypoint Studio.
## See Also
  * Introduction to Anypoint Connectors
  * SAP S/4HANA OData Connector Release Notes
  * SAP S/4HANA OData Connector on Exchange
  * MuleSoft Help Center
Save Excel File | MuleSoft Documentation
# Save Excel File
Use the Save Excel File action step to save the changes to the Excel file being modified inside the Excel Session at any point of the execution. For example, saving the Excel file after loop operations serves as a way to prevent data loss in case the workflow execution stops because of an unknown error. The Excel Session automatically saves the file at the end of its execution.
The Save Excel File action step works only inside an Excel Session. Specify the file to modify in the Excel Session.
Save Excel File cannot save the file if the Excel Session opens the file in read-only mode.   
---  
## Properties
This action step does not have any specific properties. See Common Properties for a list of properties common to all action steps.
## Inbound Variables
Save Excel File has no inbound variables.
## Outbound Variables
  * **Success** (bool)
Confirms if the save file operation was successful. If the operation fails (`false`), the workflow run state is set to Error.


## See Also
  *
Sharing Data Between Requests and Responses | MuleSoft Documentation
# Sharing Data Between Requests and Responses
Flex Gateway Policy Development Kit (PDK) provides the `RequestData` enum to pass data between the request and the response.
To share a status between the request and the response functions, the request function must return a `Flow::Continue` enum variant with a data parameter that you wish to pass to the response function. The response function must receive the `RequestData` parameter that contains the request function’s final status and the data parameter that was passed.
The `RequestData` enum has the following possible final status:
  * `RequestData::Continue(data)`: The request function ended with `Flow::Continue(data)`.
  * `RequestData::Break` : The request function ended with `Flow::Break`.
  * `RequestData::Cancel`: The request function was cancelled.


If the request function ended with a `Flow::Continue` and was not cancelled by upstream policies, the `RequestData::Continue` variant contains the value sent by the request function.
Implement this by adding an `on_response` wrapped function to the `Flow` example used in Stopping Request Execution:
```
async fn request_filter(state: RequestState) -> Flow<String> {
  let state = state.into_headers_state().await;
  let handler = state.handler();
  if handler.header("authorization").is_some() {
    Flow::Continue(state.path())
  } else {
    Flow::Break(
      Response::new(401)
        .with_headers(vec![(
          "WWW-Authenticate".to_string(),
          "Bearer realm=\"oauth2\"".to_string(),
        )])
        .with_body(r#"{ "error": "token was not present"}"#),
    )
  }
}
async fn response_filter(state: ResponseState, request_data: RequestData<String>) {
  // Handle only completed requests
  if let RequestData::Continue(path) = request_data else {
    return;
  };
  let state = state.into_headers_state().await;
  logger::info!("Path: {path}, Status: {}", state.status_code());
}
```

## See Also
  * Implementing Your Custom Policy Features in Rust
Simulating Data in REST APIs | MuleSoft Documentation
# Simulating Data in REST APIs
Exchange lets you provide simulated data for testing OAS or RAML REST APIs. The simulated data is provided in the mocking service feature.
The following example shows how the mocking service simulates the data for a REST API:
  * In the API console that appears on the right side of an asset detail screen. The mocking service lets you add simulated data to an API function and test the API with the data.
This page shows two URLs. The URL on the left is also used in Design Center and is public. The URL on the right is used only in Exchange and requires authentication.
  * Listed as an instance with each version of an API.
  * Listed on the **API instances** page that also lists the mocking service URL.


## Accept Simulated Data in an API
  1. From Design Center > API Specification, provide example data that the implementation returns. Alternatively, you can develop an OAS (Swagger) specification from a text editor and add the example data there.
  2. In the REST specification provide an HTTP status code for a successful API call.


## Test a REST API With Simulated Data
  1. In Exchange, click a REST API.
  2. Click a function such as **GET**.
  3. In the API console on the right of the screen, click **Send** to send simulated data to the API.
Exchange sends the data and lists the response, which in this example returns the HTTP 200 OK status to indicate success, and lists the data that is sent from the API using the simulated data.


## See Also
  * Change a REST API Version.
  * Simulate Calls to an API.
Dynamic Directories | MuleSoft Documentation
# Dynamic Directories
Anypoint Code Builder 
Anypoint Studio 
When managing files and folders during a test, MUnit provides the `munit.temporary.directory` property to reference a temporary directory. You can create files and folders inside this directory to use in your tests.
The temporary directory is deleted at the end of each test.
For example, using the file connector, you could configure the working directory as follows:
```
<file:config name="tmpDir">
  <file:connection workingDir="${munit.temporary.directory}"/>
</file:config>
```

And then use it to create files/folders inside it:
```
<file:create-directory config-ref="tmpDir" directoryPath="example"/>
```

## See Also
  *
Configuring Runtime Fabric with RTFCTL | MuleSoft Documentation
# Configuring Runtime Fabric with RTFCTL
Use these `rtfctl` commands to configure Runtime Fabric.
## Commands for Configuring Applications on Runtime Fabric
Command | Description  
---|---  
Applies changes to a Runtime Fabric configuration  
Updates rtfctl  
Waits for Runtime Fabric components to become ready  
`renew-expired-client-cert` |  Renews an expired client certificate using a pre-downloaded package  
### `apply`
Applies changes to a Runtime Fabric configuration.
You can use the `rtfctl apply system-configuration` command to update OpenShift system-configuration values. Other rtfctl apply commands are not effective for OpenShift. For any other updates, modify the values in the OpenShift console.   
---  
  * Applies an HTTP proxy configuration
```
rtfctl apply http-proxy http://<host>:<port> --namespace <rtf_namespace>
```

  * Applies an HTTP proxy configuration with hostnames bypassing the proxy
```
rtfctl apply http-proxy http://<host>:<port> --no-proxy "DOMAIN1.com,DOMAIN2.com" --namespace <rtf_namespace>
```

  * Applies an HTTP proxy configuration with authentication
```
rtfctl apply http-proxy http://<username>:<password>@<host>:<port> --namespace <rtf_namespace>
```

  * Clears an HTTP proxy configuration
```
rtfctl apply http-proxy "" --no-proxy "" --namespace <rtf_namespace>
```

  * Applies a secure property
```
rtfctl apply secure-property --key <key> --value <value> --app-namespace <app_namespace> --namespace <rtf_namespace>
```

  * Applies a system configuration on a host node
```
rtfctl apply system-configuration
```

  * Applies a system configuration on a host node without downloading the latest scripts
```
rtfctl apply system-configuration --skip-download
```

  * Applies a Mule license
```
rtfctl apply mule-license <base64_encoded_license> --namespace <rtf_namespace>
```

If Runtime Fabric is installed via Helm, you must update the `mule-license` property in the Helm values.
  * Applies a monitoring proxy
```
rtfctl apply monitoring-proxy http://<host>:<port> --namespace <rtf_namespace>
```

  * Clears a monitoring proxy configuration
```
rtfctl apply monitoring-proxy "" --namespace <rtf_namespace>
```



### `update`
Updates `rtfctl`.
  * Updates from the US control plane
```
rtfctl update
```

  * Updates `rtfctl` from the EU control plane
```
rtfctl update --host eu1.anypoint.mulesoft.com
```



Waits for Runtime Fabric components to become ready
  * Specifies the number of seconds to wait


```
rtfctl wait <value_in_seconds> --namespace <rtf_namespace>
```

  * Specifies the number of seconds to pass before timing out the wait (Default is 600 seconds)


```
rtfctl wait --timeout <value_in_seconds> --namespace <rtf_namespace>
```

### `renew`
Renews an expired client certificate using a pre-downloaded package
```
rtfctl renew-expired-client-cert <cert-bundle-filename>
```

## See Also
  * Using RTFCTL Tool Overview
Saving a Dashboard as a Custom Dashboard | MuleSoft Documentation
# Saving a Dashboard as a Custom Dashboard
To make creating a custom dashboard easier, you can save any of the built-in dashboards that are included in the Anypoint Monitoring tabs as a custom dashboard that you can then customize to suit your needs. This allows you to take advantage of the flexibility and features offered in custom dashboards, such as troubleshooting, setting up alerts, or comparing multiple resources within one dashboard.
Follow these steps to save a built-in dashboard as a custom dashboard.
  1. Log in to Anypoint Platform with a user account that has permission to access Anypoint Monitoring content.
  2. Navigate to **Anypoint Monitoring**.
  3. From the sidebar, click **Built-in dashboards**.
  4. Click the tab for the built-in dashboard to save, for example, **Performance**.
  5. Click the **Save as** icon.
  6. In the **Save as** dialog, enter a **Name** for your custom dashboard, and click **Save**.
The name for your new custom dashboard must be unique.   
---  


A green confirmation banner appears in the top of the screen. Click the **View in custom dashboards** link in the green confirmation banner to see the new custom dashboard, with the name you entered, in the list of custom dashboards. The banner disappears after a moment. If you didn’t click the link in the banner, you can click **Custom dashboards** in the menu on the left to go to the list of custom dashboards. You can now configure your custom dashboard.
## See Also
Configuring Custom Dashboards and Charts
MuleSoft Accelerator for Consumer Goods | MuleSoft Documentation
# MuleSoft Accelerator for Consumer Goods
MuleSoft Accelerator for Consumer Goods helps consumer goods companies integrate their digital operations to gain visibility into trade promotion management and retail execution. Our foundational assets are expertly designed to jumpstart your top integration and business initiatives so that IT teams can spend more time innovating and less time building from scratch.
## Use Cases
### Product and Account Integration with Hierarchies
The Product and Account Integration with Hierarchies use case surfaces relevant product, customer, demand planning, and pricing information from ERP and PIM systems and easily consolidate this information into Trade Promotion Management (TPM) platforms like Salesforce Consumer Goods Cloud for informed promotional planning.
### Retail Execution
The Retail Execution use case unlocks shelf data to enable perfect retail execution with pre-built assets. Access store audit data from image recognition software, like Trax, and smoothly integrate into Retail Execution platforms, such as Salesforce Consumer Goods Cloud, to monitor at shelf performance in one platform.
### Trade Promotion Effectiveness
The Trade Promotion Effectiveness use case allows you to visualize your promotions in one integrated platform with pre-built assets that integrate Business Intelligence Tools (BI Tools), such as CRM Analytics, into a TPM platform like Salesforce Consumer Goods Cloud.
### Trade Promotion Optimization
The Trade Promotion Optimization use case allows you to visualize your promotions in one integrated platform with pre-built assets that integrate Business Intelligence Tools (BI Tools), such as CRM Analytics, into a TPM platform like Salesforce Consumer Goods Cloud.
## See Also
  *   *   *   * MuleSoft Accelerator for Consumer Goods on Exchange
Upgrading and Migrating WSS Module to Version 2.0 | MuleSoft Documentation
# Upgrading and Migrating WSS Module to Version 2.0
Upgrade WSS Module to version 2.x.
## Supported Upgrade Paths
From Version | To Version  
---|---  
## Changes in This Release
WSS Module 2.0 includes these changes.
  * WSS Module (and its dependencies) are now compilable and compatible only with Java 17.
  * To align with modern development practices and ensure continued compatibility with secure and supported libraries, WSS Module is upgraded from Spring 5.x to the latest stable Spring 6.x version (Spring Framework 6.4.6).
  * In the **Encryption Config** type, the `EMBEDDED_KEY_NAME` option has been removed from the **Encryption Key Identifier** field.


## Upgrade Prerequisites
Before you perform the upgrade, you must create a backup of your files, data, and configurations in case you need to restore them.
## Upgrade Steps
Follow these steps to perform the upgrade:
  1. In Anypoint Studio, right-click the project and select **Manage Dependencies** > **Manage Modules**.
  2. Select `Web Service Security Module` and click **Update version**.
  3. Click **Apply and Close**.
  4. Verify that the WSS Module dependency version is `2.0.0` in the `pom.xml` file in the Mule project.


Alternatively, you can manually update the WSS Module dependency version in the `pom.xml` file in the Mule project, or simply add the updated module to the project.
### Verify the Upgrade
After you upgrade the connector, follow these steps to verify the upgrade:
  1. In Studio, verify that there are no errors in the **Problems** or **Console** views.
  2. Verify that there are no problems in the project `pom.xml` file.
  3. Test the connection to verify that the operations work.


## Troubleshoot
If there are problems with caching the parameters and caching the metadata, try restarting Anypoint Studio.
### Revert the Upgrade
If it is necessary to revert to the previous version of WSS Module, change the WSS Module dependency version `2.0.0` in the project’s `pom.xml` to the previous version.
You must update the project’s `pom.xml` in Anypoint Studio.
## See Also
  * Introduction to Anypoint Connectors
  * WSS Module Reference
  * MuleSoft Help Center
Fail Event Processor | MuleSoft Documentation
# Fail Event Processor
Anypoint Code Builder 
Anypoint Studio 
The Fail Event Processor allows you to fail your test on purpose. This is useful to validate that a test should fail if that point is reached.
```
<munit-tools:fail
 message="This should fail"/>
```

The message field is optional and defines the error message to print when the assertion fails. The processor throws a `java.lang.AssertionError`.
isOdd | MuleSoft Documentation
# isOdd
## isOdd(number: Number): Boolean
Returns `true` if the number or numeric result of a mathematical operation is odd, `false` if not.
### Parameters
Name | Description  
---|---  
A number to evaluate.  
### Example
This example indicates whether the numbers are odd.
#### Source
```
%dw 2.0
output application/json
---
{ "isOdd" : [ isOdd(0), isOdd(1), isOdd(2+2) ] }
```

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

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


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


An error occurred while trying to compress content.
  * COMPRESSION:COULD_NOT_DECOMPRESS


An error occurred while trying to decompress content.
  * COMPRESSION:INVALID_ARCHIVE


The content to decompress is an invalid archive.
  * COMPRESSION:TOO_MANY_ENTRIES


When an archive with multiple entries passes to the **Decompress** operation, the module is unable to choose only one entry.
## See Also
  * Compression Module Reference
  * MuleSoft Help Center
  *
Apache Kafka Connector 4.3 | MuleSoft Documentation
# Apache Kafka Connector 4.3
Anypoint Connector for Apache Kafka (Apache Kafka Connector) enables you to interact with the Apache Kafka messaging system and achieve seamless integration between your Mule app and a Kafka cluster, using Mule runtime engine (Mule).
For compatibility information see the Apache Kafka Connector Release Notes.
## Before You Begin
Before creating an app, you must:
  * Have access to the Apache Kafka target resource and Anypoint Platform
  * Understand how to create a Mule app using Anypoint Studio
  * Have access to Apache Kafka to get values for the fields that appear in Studio


## Use Cases
Apache Kafka is a multipurpose application. Integration with Apache Kafka relies on the applications that are typically used with it.
Example use cases include:
  * An integration application that ensures that patients in a hospital receive the care they need in a timely manner An example of this is a hospital server that processes emergency requests for patient admissions. The requests are ordered by priority determined by specified criteria, such as how critical the patient’s condition is and the staff that is available to treat the patient. In this scenario, an application processes Apache Kafka messages in the order that they are received, relying on the order and idempotency of the messages sent through the queue.
  * An application that is time-sensitive An example is a newsroom that uses the Apache Kafka system to deliver the latest news. To retrieve the latest news, reading from the Apache Kafka queue sometimes requires reading from the end of the queue first.
  * Multiple applications that rely on the information provided by Apache Kafka For example, a department store uses a website activity tracker to improve the online shopping experience. The data that is gathered is sent to multiple departments for various computations. Each department reviews the information that’s received to stay informed about what the customer is looking for and then provides recommendations accordingly.


## Audience
  * Starting user
To create a Mule app, see Apache Kafka Studio Configuration.
  * Power user
Read XML and Maven Support and Examples.


## Next
After you complete the prerequisites, you are ready to create an app with Anypoint Studio.
## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  *   * MuleSoft Help Center
Runtime Manager Release Notes | MuleSoft Documentation
# Runtime Manager Release Notes
  * Runtime Manager Release Notes
  * Runtime Manager Agent Release Notes
Protecting Mule App Property Values in Runtime Fabric | MuleSoft Documentation
# Protecting Mule App Property Values in Runtime Fabric
Anypoint Runtime Fabric enables you to protect application property values by displaying the property name, but not its value, in Anypoint Runtime Manager.
Additionally, a protected value is not viewable or retrievable by any user. Runtime Fabric resolves the property internally at runtime. These protected application values are encrypted and stored in the Anypoint Security secrets manager, which, in turn, is encrypted per user organization.
Protected property values are separate from the encrypted Mule application properties that are stored in secure configuration files. See Secure Configuration Properties.
Runtime Manager does not support adding protected properties for API proxies or gateways. Instead, use API Manager.  
---  
Protecting API Gateway client ID and secret ID is currently supported in Runtime Fabric, either via API or the Anypoint Runtime Manager UI.  
---  
## Protect Property Values in Runtime Manager
Set protected properties via the table view for granular control over each property and value.
Although you may attempt to protect a single property more than once, Runtime Manager issues a warning and only the final instance of that property is protected.
  1. From Anypoint Platform, select Runtime Manager.
  2. From the left menu, click **Applications**.
  3. Click the application name.
  4. On the **Settings** page, click the **Properties** tab.
  5. Depending on how many properties you want to protect at once, take one of the following actions:
     * To protect properties one at a time, click **Table view**.
     * To protect multiple properties, use **Text view** to add the key-value pairs and then switch to **Table view** , and continue to Step 8.
  6. In the **New Key** field, add a property to protect.
  7. In the **New Value** field, add a value.
  8. Click **Protect** > **Protect value** to confirm.
  9. Choose from one of the following:
     * If this application has already been deployed, click **Apply changes**.
     * If you’re ready to deploy the application, click **Deploy Application**.


In the **Properties** tab, the values for properties that you just protected are now no longer visible to you or any other user.
In the following example, the value for `dbPassword` is protected but those for `dbUsername` and `environment` are not:
After you commit the values and deploy the application, the protected property values don’t appear in the console and aren’t sent and received between the console and Runtime Manager.
## Replace a Protected Property Value
After you protect a property value, you can’t retrieve it. However, you can replace the protected property value with a new protected value:
  1. In the Table view, click the icon next to the protected value that you want to replace.
  2. Click the menu icon next to the value and then click **Replace protected value**.
  3. Enter a new value in the field
  4. Click **Apply** > **Apply changes.**
Configuring Flex Gateway Configuration Caching in Connected Mode | MuleSoft Documentation
# Configuring Flex Gateway Configuration Caching in Connected Mode
To reduce scale-up time and increases resiliency, Flex Gateway can cache its gateway configuration in Redis shared storage. Flex replicas use the cached gateway configuration instead of each replica directly downloading the configuration from Anypoint Platform. By default, configuration caching is not enabled.
Flex Gateway configuration caching works by:
  1. After the first Flex replica starts, the replica downloads the configuration from Anypoint Platform, encrypts the configuration, and stores it in Redis.
  2. After subsequent replicas start, they use the locally cached configuration rather than downloading from Anypoint Platform.
  3. If the Flex Gateway configuration changes on Anypoint Platform, the replicas download the necessary configuration from Anypoint Platform and store it in Redis for immediate use by the other replicas.


If caching is configured and Redis errors occur, each replica downloads configurations directly from Anypoint Platform. If Flex Gateway disconnects from Anypoint Platform, Flex gateway uses the cached configuration until connections are restored.
## Enable Flex Gateway Configuration Caching
  1. Ensure the Redis shared storage is configured.
To learn more, see Configuring Shared Storage for Flex Gateway in Connected Mode.
  2. Enable the `FLEX_DATASOURCE_CONTROL_NODE_ENABLED=true` environment variable.
Add Servers to a Server Group | MuleSoft Documentation
# Add Servers to a Server Group
Private Cloud Edition 
## Prerequisites
  * At least one server is configured.
  * The server group is created.
  * No applications are deployed on the server that you are adding to the server group.


## Add Servers to a Group
To add servers to a server group after the server group has been created:
  1. From Anypoint Platform, select **Runtime Manager**.
  2. Select **Servers** in the left menu.
  3. Click **Group** in the **Type** column to display the details pane.
  4. Click the **Add Server** button:
Figure 1. The arrow shows the **Add Server** button in the details pane.
A list of available servers appears.
  5. Select the servers to add to the group, and click the **Add Servers** button.


The servers no longer appear in the **Servers** list. To see the list of servers in the server group, click the group name.
## See Also
  * Add Servers to Runtime Manager
  * Create Server Groups
  *   * Shut Down, Restart, or Delete Servers
  * Deployment and Server Scaling
CLI for DataGraph Load Balancers | MuleSoft Documentation
# CLI for DataGraph Load Balancers
Use the `datagraph` commands to automate your DataGraph Load Balancers Processes. For more information about how to use these commands, refer to the DataGraph documentation.
Command | Description  
---|---  
datagraph:load-balancer-config:add |  Adds a dedicated load balancer configuration to Anypoint DataGraph  
datagraph:load-balancer-config:describe |  Displays a dedicated load balancer configuration for Anypoint DataGraph  
datagraph:load-balancer-config:remove |  Removes a dedicated load balancer configuration from Anypoint DataGraph  
## datagraph:load-balancer-config:add
```
> datagraph:load-balancer-config:add <dlbUrl>
```

Adds a dedicated load balancer configuration specified by `<dlbUrl>` to Anypoint DataGraph The `dlbUrl` is a valid URL that includes the DLB domain and the mapping rule `inputUri`.
This command accepts the default flags.
## datagraph:load-balancer-config:describe
```
> datagraph:load-balancer-config:describe [flags]
```

Displays a dedicated load balancer URL for Anypoint DataGraph
This command accepts the default flags.
## datagraph:load-balancer-config:remove
```
> datagraph:load-balancer-config:remove [flags]
```

Removes a dedicated load balancer configuration from Anypoint DataGraph.
This command accepts the default flags.
WSS Module 2.0 | MuleSoft Documentation
# WSS Module 2.0
WSS Module enables you to process and validate an inbound SOAP request against a given Web Service Security (WSS) extension configuration to, for example, validate the request’s signature, perform an LDAP authentication, or decrypt the inbound message. WSS module also enables you to sign your response by adding a WSS header to it, or to encrypt your outbound message.
For information about compatibility and fixed issues, see the WSS Module Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
  * The WSS Module API
  * 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 WSS Module target resource
  * Anypoint Platform
  * Anypoint Studio version 7.x or later
  * Web Services Security (WSS) extension for SOAP


## Common Use Cases For the Connector
WSS Module enables you to validate WSS headers in inbound SOAP requests to your application to:
  * Decrypt a SOAP envelope according to the encryption information
  * Validate a signature
  * Verify the freshness of the message using `timestamp` information
  * Verify the `Username` and `Password` credentials of `UsernameToken`
  * Verify the `LDAP` credentials of `UsernameToken`
  * Determine whether `UsernameToken` is expired
  * Determine whether a SAML assertion expired
  * Verify the signature of a SAML assertion.
  * Verify that a SAML assertion has a specific confirmation method.


Using WSS Module, you can also add WSS headers to your outbound SOAP response to:
  * Encrypt some or all of your SOAP message content
  * Sign your SOAP message


See the WSS Module Examples section for detailed examples.
## Audience
  * New user
To create your Mule app, see:
    * Studio Configuration to help extend your understanding of WSS module.
    * Examples, with use case information for the connector
  * Advanced user
Read the following:
    * XML and Maven Support
    * Examples, with use case information for the 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
  *   * MuleSoft Help Center
Configuring Timeouts in Local Mode | MuleSoft Documentation
# Configuring Timeouts in Local Mode
Flex Gateway offers these timeouts to improve service quality and reduce computing resource waste:
  * **Stream Idle Timeout** The Stream Idle Timeout enables you to set a maximum amount of a time a stream can remain idle without receiving any data in either the inbound (client to Flex Gateway) or outbound (Flex Gateway to upstream service) direction.
By default, all Flex Gateway API instances have a stream timeout of 300 seconds.
  * **Upstream Idle Timeout** The Upstream Idle Timeout enables you to set a maximum amount of time a stream between Flex Gateway and the upstream service can remain idle between requests.
By default, all Flex Gateway API instances have an upstream idle timeout of 60 seconds.
  * **Response Timeout** The Response Timeout enables you to set a maximum amount of a time Flex Gateway waits for a response from an upstream service. The timeout time starts at the last request sent by Flex Gateway.
By default, all Flex Gateway API instances have a response timeout of 15 seconds.


You can configure these timeouts via:
  * Environment variables: Applies to all API instances and is the most permanent configuration option.
  * Configuration YAML file: Applies to all API instances and is easy to adjust.
  * Policy: Applies to just one API instance or upstream providing granularity and is easy to adjust.


## Configure Timeouts via Environment Variables
Configure timeouts with these environment variables:
```
FLEX_STREAM_IDLE_TIMEOUT_SECONDS: 300
FLEX_UPSTREAM_CONNECTION_IDLE_TIMEOUT_SECONDS/FLEX_CONNECTION_IDLE_TIMEOUT_SECONDS: 60
FLEX_UPSTREAM_RESPONSE_TIMEOUT_SECONDS: 15
```

Edit the variables with your desired configurations.
## Configure Timeouts via YAML Configuration Resources
Edit and then apply this configuration resource to update your timeouts:
```
apiVersion: gateway.mulesoft.com/v1alpha1
kind: Configuration
metadata:
 name: timeouts-config
spec:
 timeouts:
  upstreamConnectionIdleSeconds: 300
  upstreamResponseSeconds: 15
  streamIdleSeconds: 60
```

## Configure Timeouts via Policies
Apply these policies to your API instance or upstream service:
  * Stream Idle Timeout Policy
  * Upstream Idle Timeout Policy
  * Response Timeout Policy
OAuth2 Provider Module XML and Maven Support | MuleSoft Documentation
# OAuth2 Provider Module XML and Maven Support
Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio.
If you manually code a Mule runtime engine (Mule) app in XML, either from the Anypoint Studio XML editor or from a text editor, you can get access to the connector in your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file.
When you add the connector in Studio, Studio automatically populates the XML code with the connector’s namespace and schema location. It also adds a dependency to the `pom.xml` file.
## Add a Namespace for the Connector
Paste the following code inside the `<mule>` tag of the header of your configuration XML:
```
http://www.mulesoft.org/schema/mule/oauth2-provider
http://www.mulesoft.org/schema/mule/oauth2-provider/current/mule-oauth2-provider.xsd
```

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

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

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


## See Also
  * Introduction to Anypoint Connectors
  * MuleSoft Help Center
Azure Key Vault Connector 1.1 | MuleSoft Documentation
# Azure Key Vault Connector 1.1
Anypoint Connector for Azure Key Vault (Azure Key Vault Connector) enables you to retrieve secrets, keys, or certificates, and encrypt or decrypt content.
For information about compatibility and fixed issues, refer to the Azure Key Vault Connector Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
  * The Azure Key Vault Secrets API
  * 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:
  * Credentials to access the Azure Key Vault target resource
  * Anypoint Platform
  * Anypoint Studio version 7.3.5 or later


## Common Use Cases for the Connector
Some common use cases for Azure Key Vault Connector include:
  * Authenticating to Azure Key Vault via Client Secret Credential to access Key Vault secrets without exposing sensitive credentials in code, thus improving resilience and security
  * Enabling other applications in a Mule flow to have access to encrypt and decrypt operations using Azure Key Vault keys to avoid key rotations
  * Authenticating to other database and HTTP connectors in a more secure and automated way to fetch and use credentials to access other endpoints
  * Retrieving a certificate and saving the certificate into a file


## Connection Types
Azure Key Vault connections use the Connection authentication type, which uses a client ID, client secret, and cryptography client cache.
## Environment Variables
When setting **Use Azure Default Credential** to `True`, you must set one of the following environment variables `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET`, or `AZURE_TENANT_ID`. Refer to Setting environment variables documentation for details.
## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * Azure Key Vault Connector Reference
  * MuleSoft Help Center
SAP SuccessFactors Connector 4.0 | MuleSoft Documentation
# SAP SuccessFactors Connector 4.0
Anypoint Connector for SAP SuccessFactors (SuccessFactors Connector) provides full support to query, create, update, and delete entities using the OData API exposed by SuccessFactors.
This connector enables you to:
  * Create, update, and delete entities
  * Retrieve a single entity by ID or query multiple entities


For compatibility information and fixed issues, see the SAP SuccessFactors Connector Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
  * SAP SuccessFactors OData API
  * Mule runtime engine (Mule)
  * Anypoint Connectors
  * Anypoint Studio essentials


Before creating an app, you must have:
  * Credentials to access a SuccessFactors developer account
  * A valid SAP SuccessFactors instance
  * A MuleSoft Enterprise license
  * Access to Anypoint Studio 7.1 or later


## Common Use Cases for the Connector
Some common use cases for SuccessFactors Connector include:
  * Creating and deleting entities in SuccessFactors
  * Retrieving an entity by ID
  * Performing queries over entities of a specified type


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


For upgrade information, see Upgrading and Migrating SAP SuccessFactors Connector.
## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * SAP SuccessFactors Connector Reference
  * SuccessFactors HCM Suite Help
  * MuleSoft Help Center
APIkit for AsyncAPI Error Handling Reference | MuleSoft Documentation
# APIkit for AsyncAPI Error Handling Reference
APIkit for AsyncAPI defines the following error types:
Error Type | Description  
---|---  
INTERNAL_SERVER_ERROR | Internal error.  
VALIDATION_ERROR | The payload doesn’t meet the schema of the API spec.  
PUBLISHING_ERROR | APIkit fails to publish messages on the selected channel.  
ROUTING_ERROR | APIkit fails to route messages to the flows.  
## APIkit for AsyncAPI Error Handling
APIkit for AsyncAPI scaffolder generates no error-handling code.
Salesforce Composite Connector 2.14 | MuleSoft Documentation
# Salesforce Composite Connector 2.14
Anypoint Connector for Salesforce Composite enables you to work with the Salesforce Batch and SObject Tree APIs. The connector exposes convenient methods for preparing subordinate requests, executing them in one batch, and parsing the results.
Salesforce Composite Connector also enables you to create SObject trees by using the **Create sobject tree** operation, which is separate from the batch operations.
This connector provides DataSense for execution and to:
  * Prepare subordinate requests and then parse the responses
  * Create SObject trees


For compatibility information and fixed issues, see Salesforce Composite Connector Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
  * The Salesforce Composite 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 Salesforce Composite target resource
  * Anypoint Studio version 7.0 or later


## Authentication Types
Salesforce Composite Connector connections use the following authentication types:
  * OAuth v2.0
  * OAuth JWT
  * OAuth SAML
  * OAuth Username and Password
  * Token Connection


For information about configuring these authentication types, see Using Anypoint Studio to Configure Salesforce Composite Connector.
## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * MuleSoft Help Center