Vault Java SDK Sample - vsdk-helloworld
For full reference, please refer to Getting Started.
To make getting started easy, we created a sample vSDK Hello World project that demonstrates the Vault Java SDK. The trigger returns a "Hello, world" error message when a vSDK Hello World record is created within vault!
How to import
Import as a Maven project. This will automatically pull in the required Vault Java SDK dependencies.
For Intellij this is done by:
- File -> Open -> Navigate to project folder -> Select the 'pom.xml' file -> Open as Project
For Eclipse this is done by:
- File -> Import -> Maven -> Existing Maven Projects -> Navigate to project folder -> Select the 'pom.xml' file
First, you need to configure your vault so the sample trigger runs smoothly. You can do this by deploying a prepackaged set of components (.vpk), or by manually creating a "vsdk_hello_world__c" object in Vault.
Deploying the vSDK Hello World VPK Package
- Log in to your vault and navigate to Admin > Deployment > Inbound Packages and click Import.
- Locate and select the \deploy-vpk\vsdk-helloworld-components\vsdk-helloworld-components.vpk file on your computer. Vault opens and displays the details for the package.
- From the Actions menu, select Review & Deploy. Vault displays a list of all components in the package.
- Click Next.
- On the confirmation page, review and click Finish. You will receive an email when Vault completes the deployment.
How to run
- Log into your Vault: https://login.veevavault.com/
- Start the Vault Java SDK Debugger.
- Go to Admin -> Business Admin tab and click on vSDK Hello World in the left navigation panel
- Click the Create button in the list page
- Enter your name in the Name field
- Click Save and you should see a "Hello, world." error in a dialog box.
- Stop Running the project.
That’s your trigger in action! The “Hello, World” code only executes while the debugger is running. Once the debugger is stopped, this trigger will no longer appear in your vault.
Continue to Deploying Code to learn how to deploy this code and enable it to always run on your vault.
This code serves as an example and is not meant for production use.
Copyright 2018 Veeva Systems Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.