Savvion Document Dataslot – Add Documents Programmatically (Free Download Code)
Savvion Business Manager is a leading Business Process Management (BPM) Product. BPM Products provide several Data fields to store data values. One such happens to be Document Dataslots. Document Dataslots in Savvion can store one single document or multiple documents. Adding document dataslots is very simple. You just add a dataslot from Designer which has type, document and add it as a field in your worktep. That’s it the document is available.
Problem comes in if you have a business case to add a document to this dataslot programmatically. This could be a case if you want some documents to be available by default for each submitted request.
This post will help you do that. Note this post assumes you are familiar with creating a process, adding performers, adding dataslots, deploying etc. If you are not, Please refer to other posts on the same.
What are we planning to do?
We are planning to put together a process which will four dataslots
- First Name (Text)
- Last Name (Text)
- ID Proof (Single Document)
- Other Documents (Multiple Documents)
The process starts with user providing First Name and Last Name.
After that there will be an adapter which will add a document “One.png” stored in “C:/documents”) folder on my server to the ID Proof Dataslot and documents “Two.png” and “Three.png” to the Other Documents Dataslot. After that there is a review workstep where you can verify if the documents got attached.
Lets get started.
Step 1: Define a Business Process
For the test we will define a simple Business Process.
- Start Step
- Document Manager Adapter
- Review Workstep
Make creator the performer for the Review Workstep.
Now Add a performer of type Adapter and add it to the workflow. Make sure you have clicked on “Generate java Code ”
Step 2: Add Dataslots
Now Add the required Dataslots one by one. First Add the Two Text Dataslots by clicking the Tab “Dataslots” and then “New”
Similarly Add Last Name as a Text Dataslot. These are just there for dummy reasons, not really required.
Now Add the IDProof Dataslot which will be Single Document by clicking the Tab “Dataslots” and then “New”
Now Add the Other Document dataslot as a Document Bundle