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

- Show full page
- Login or register to post comments




Validation Of document dataslot
How do i validate that user has attached file or not?
You will need to use Javascript for it
There are a couple of hidden fields attached to each dataslots. For Example For a document dataslot called IDProof you can have two fields like
<input type="hidden" name="bizsite_dataslot_IDProof" value="" >
<input type="hidden" name="doccheck_mandatory_IDProof" value="false" id="doccheck_mandatory_IDProof">
See if this can help you determine if a document is attached or not.
Another way to do this is to use to Document API