Spark Messaging is a message notification system that allows for loosely coupled, asynchronous, near real-time integration between vaults or external applications. Spark messages are lightweight, signed messages designed to quickly send small amounts of data.
This template demonstrates Spark message end to end real-time integration between Vault and Mule application through Veeva Vault connector operations (like Spark Validator, Query, Update Object Records). Following are the flows in Mule config file – spark-message-validate-and-publish-flow.xml:
1. Validates and Publish Spark Message.
The flow (spark-message-validate-and-publish-flow) listens to Spark message trigger from Vault, validates and verify the message with public key and signature retrieved from Vault. On successful validation and verification, the Spark Message along with attributes (with/without Spark attributes based on configuration) is published on VM queue, otherwise it throws any of the Veeva Vault Connector error/exception.
2. Loan Approval Process.
The flow (loan-approval-process-flow) subscribe the Spark message on VM queue, transforms, retrieves loan approval object details to calculate and process loan approvals of each loan application records. Later the loan application approval status is updated on Vault.
3. Loan Approval Quotes.
The Java Class – LoanApprovalQuotes.java inside Java package (com.mulesoft.loan.approval) calculates and process loan approvals of each records and returns processed data for updating loan object on Vault.
As a Vault user I would like to
- Automate loan approval process integrating an external application with Vault. The loan object records created on Vault should automatically get process and approved.
The above use case can be used for Process Integration.
- Process Integration: This use case where small number of object records to be process and integrate Vault with external application. In this case, loan object records created on Vault is process for approvals in external Mule application using Veeva Vault Connector operations. The loan object records are retrieved as Spark Message triggered from Vault on HTTPS transport is validated and verified in Mule application and then process for loan approvals. For more details refer Spark Messaging and Configuration on Vault.
This template serves as a foundation for integrating object records created on vault with external Mule application through Veeva Vault Connector operations.
This template can also be used as a starting point to adapt your integration to your requirements.