Contact Us 1-800-596-4880

Using Anypoint Studio to Configure Veeva Vault Connector 1.3 - Mule 4

Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and configuration files.

To add and configure a connector in Studio:

When you run the connector, you can view the app log to check for problems in real time, as described in View the App Log.

If you are new to configuring connectors in Studio, see Using Anypoint Studio to Configure a Connector. If, after reading this topic, you need additional information about the connector fields, see the Veeva Vault Reference.

Create a Mule Project

In Studio, create a new Mule project in which to add and configure the connector:

  1. In Studio, select File > New > Mule Project.

  2. Enter a name for your Mule project and click Finish.

Add the Connector to Your Mule Project

Add Veeva Vault Connector to your Mule project to automatically populate the XML code with the connector’s namespace and schema location and add the required dependencies to the project’s pom.xml file:

  1. In Mule Palette, click (X) Search in Exchange.

  2. In Add Dependencies to Project, type veeva vault in the search field.

  3. Click Veeva Vault in Available modules.

  4. Click Add.

  5. Click Finish.

Adding a connector to a Mule project in Studio does not make that connector available to other projects in your Studio workspace.

Configure a Source

A source initiates a flow when a specified condition is met. You can configure one of these sources to use with Veeva Vault Connector:

  • HTTP Listener
    Initiates a flow each time it receives a request on the configured host and port

  • Scheduler
    Initiates a flow when a time-based condition is met

For example, to configure an HTTP Listener source, follow these steps:

  1. In Mule Palette, select HTTP > Listener.

  2. Drag Listener to the Studio canvas.

  3. On the Listener configuration screen, optionally change the value of the Display Name field.

  4. Specify a value for the Path field.

  5. Click the plus sign (+) next to the Connector configuration field to configure a global element that can be used by all instances of the HTTP Listener source in the app.

  6. On the General tab, specify connection information for the connector.

  7. On the TLS tab, optionally specify the TLS information for the connector.

  8. On the Advanced tab, optionally specify reconnection information, including a reconnection strategy.

  9. Click Test Connection to confirm that Mule can connect with the specified server.

  10. Click OK.

Add a Connector Operation to the Flow

When you add a connector operation to your flow, you are specifying an action for that connector to perform.

To add an operation for Veeva Vault Connector, follow these steps:

  1. In Mule Palette, select Veeva Vault and then select the desired operation.

  2. Drag the operation onto the Studio canvas, next to the input source.

Configure a Global Element for the Connector

When you configure a connector, configure a global element that all instances of that connector in the app can use. Configuring a global element requires you to provide the authentication credentials that the connector requires to access the target Veeva Vault system. Veeva Vault Connector supports Basic authentication.

To configure the global element for Veeva Vault Connector, follow these steps:

  1. Select the operation in the Studio canvas.

  2. In the General configuration screen for the operation, click the Add icon to access the global element configuration fields.

  3. In the General tab, in Connection, select the Veeva Vault Config method to configure Basic authentication.

    You can reference a configuration file that contains ANT-style property placeholders (recommended), or you can enter your authorization credentials in the global configuration properties. For information about the benefits of using property placeholders and how to configure them, see Anypoint Connector Configuration.

  4. In the Advanced tab, optionally specify reconnection information, including a reconnection strategy.

  5. Click Test Connection to confirm that Mule can connect with the specified server.

  6. Click OK.

Basic Authentication

Enter the following information in the General tab of the Global Element Properties screen to configure Basic authentication:

Field Description

Name

Configuration name

Vault URL

URL of the Veeva Vault instance required for the connection

Username

Username used to initialize the session

Password

Password used to authenticate the user

Client Id

Client ID to send with each request header to the Veeva Vault instance for tracking purposes, in the format {organization}-{company/team}.

The client ID has the prefix mulesoft and the suffix client-vaultconnector, for example, mulesoft-abcpharma-clinicalprod-client-vaultconnector.

The following image shows an example of configuring the General tab for Basic authentication:

Authentication fields completed in the *General* tab for Basic authentication

Enter the following information in the Advanced tab of the Global Element Properties screen to configure the burst API limit for Basic authentication:

Field Description

Response Timeout

Maximum amount of time, in milliseconds, that the connector waits for the Veeva Vault response. If the maximum amount of time is exceeded, a timeout exception is thrown. The default is 30,000 milliseconds (30 seconds).

Burst API Limit Profile

Burst API limit profile configuration to act upon if the specified burst API limit of the Veeva Vault API reaches or exceeds the configured threshold.

If Burst API limit config is enabled (default), then the connector evaluates the Veeva Vault API’s response header (X-VaultAPI-BurstLimitRemaining) value against the specified API Limit Threshold value. If the remaining burst API limit reaches or exceeds the specified API Limit Threshold value, the connector waits for the specified amount of time to restart the count of Burst Limit Remaining.

The following example shows an application log with a warning message at 2019-06-06 10:34:45,096, halting the process for five minutes, as shown in the next message at 2019-06-06 10:39:45,098:

WARN 2019-06-06 10:34:45,096 [[MuleRuntime].io.27: [veevavault-connector-demo].get-documents-operationFlow.BLOCKING @2dd2ffaf] [event: 99716950-8818-11e9-90e2-d61515f42856] org.mule.extension.veevavault.internal.service.HttpRequestService: Burst API Limit remaining calls [1997] has exceeded/reached an API Limit Profile threshold set as [1997]. As per API Limit Profile, Veeva Vault Connector will wait for [5] MINUTES.

WARN 2019-06-06 10:39:45,098 [[MuleRuntime].io.27: [veevavault-connector-demo].get-documents-operationFlow.BLOCKING @2dd2ffaf] [event: 99716950-8818-11e9-90e2-d61515f42856] org.mule.extension.veevavault.internal.operations.VeevaVaultOperations: Properties or Fields is not available for api [/api/v18.2/metadata/objects/documents/types/site_management__c] , will use input list [[name__v, type__v, subtype__v, classification__v, lifecycle__v, status__v, study__v, product__v, id]] if configured to build VQL query

INFO 2019-06-06 10:39:45,098 [[MuleRuntime].io.27: [veevavault-connector-demo].get-documents-operationFlow.BLOCKING @2dd2ffaf] [event: 99716950-8818-11e9-90e2-d61515f42856] org.mule.extension.veevavault.internal.pagination.GetDocumentsPagingProvider: Query Build :: SELECT name__v, type__v, subtype__v, classification__v, lifecycle__v, status__v, study__v, product__v, id FROM documents WHERE name__v= 'F22611234--6764'

INFO 2019-06-06 10:39:46,024 [[MuleRuntime].io.27: [veevavault-connector-demo].get-documents-operationFlow.BLOCKING @2dd2ffaf] [event: 99716950-8818-11e9-90e2-d61515f42856] org.mule.extension.veevavault.internal.service.HttpRequestService: Response received for sync http request :: 'https://[vault-domain]/api/v18.2/query?q=SELECT+name__v%2C+type__v%2C+subtype__v%2C+classification__v%2C+lifecycle__v%2C+status__v%2C+study__v%2C+product__v%2C+id+FROM+documents+WHERE+name__v%3D+%27F22611234--6764%27++LIMIT+1000+OFFSET+0' in 925 milliseconds.

API Limit Threshold

Veeva Vault API limit threshold for Burst API Limit Profile. When the specified limit is reached or exceeded, the connector waits for the specified amount of time. The default is 200.

Wait Time

Amount of time that the connector waits if the API Limit Threshold is reached or exceeded. The default is 5.

Time Unit

Time unit for the wait time. The default is MINUTES.

Daily API Limit Profile

Daily API limit exceed profile configuration to use if the daily API limit of the Veeva Vault API reaches or exceeds the configured threshold. The daily limit is the total number of API calls within any 24-hour window.

The following example shows an application log with a warning message at 2019-06-06 10:47:31,698 and an error message at 2019-06-06 10:47:31,699:

WARN 2019-06-06 10:47:31,698 [[MuleRuntime].io.44: [veevavault-connector-demo].get-documents-operationFlow.BLOCKING @108e7f43] [event: 624cfa50-881a-11e9-90e2-d61515f42856] org.mule.extension.veevavault.internal.service.HttpRequestService: Veeva Daily API Limit remaining calls [10000] has exceeded/reached an Daily API Limit Profile threshold set as [10000]. As per API Limit Profile, Veeva Vault Connector will throw an exception.

ERROR 2019-06-06 10:47:31,699 [[MuleRuntime].io.44: [veevavault-connector-demo].get-documents-operationFlow.BLOCKING @108e7f43] [event: 624cfa50-881a-11e9-90e2-d61515f42856] org.mule.extension.veevavault.internal.service.HttpRequestService: Exception caught while processing Sync request ::: https://xxxxx-xxxxx.veevavault.com/api/v20.1/metadata/vobjects/site__v, Exception ::: \{"responseStatus":"FAILURE","errors":[\{"type":"API_LIMIT_EXCEED","message":"The Veeva Vault Connector has reached/exceeded daily API limit remaining calls [10000]. The configured daily api limit threshold is \(10000\)"}\]}

ERROR 2019-06-06 10:47:31,767 [[MuleRuntime].io.44: [veevavault-connector-demo].get-documents-operationFlow.BLOCKING @108e7f43] [event: 624cfa50-881a-11e9-90e2-d61515f42856] org.mule.runtime.core.internal.exception.OnErrorPropagateHandler:

**********************************************************************************

Message : An error occurred from the Veeva Vault API.
Error Code: API_LIMIT_EXCEED.
Original Error Message: The Veeva Vault Connector has reached/exceeded daily API limit remaining calls [10000]. The configured daily api limit threshold is (10000).
Error type : VEEVAVAULT:API_LIMIT_EXCEED

**********************************************************************************

API Limit Threshold

Veeva Vault API limit threshold for Daily API Limit Profile. When the specified limit is reached or exceeded, the connector waits for the specified amount of time. The default is 10000.

The following image shows an example of configuring the Advanced tab for Basic authentication:

Authentication fields completed in the *Advanced* tab for Basic authentication

View the App Log

To check for problems, you can view the app log as follows:

  • If you’re running the app from Anypoint Platform, the app log output goes to the Anypoint Studio console window.

  • If you’re running the app using Mule from the command line, the app log output goes to your operating system console.

Unless the log file path is customized in the app’s log file (log4j2.xml), you can also access the app log in the default location MULE_HOME/logs/<app-name>.log. You can configure the location of the log path in the app log file log4j2.xml.

Next Step

See Additional Configuration Information for more configuration steps.

View on GitHub