best grammar app

Savvion Document Dataslot – Add Documents Programmatically (Free Download Code)

Submitted by Abhishek on Sun, 2012-05-20 15:40
Progress SAvvion

            File f3=new File("c:\\documents\\Three.png");

           

            File[] idProof={f1};

            this.iDProof.create("ebms", idProof);

           

            File[] otherdocs={f2,f3};

            this.otherDocuments.create("ebms", otherdocs);

            System.out.println("Done");

           

      }

Here we are doing the following

  • Creating three java.io.File Object to access the three files
  • Creating an Array to store One.png
  • Adding the File to the Dataslot by calling the create method. Please note the first parameter is the user. For testing I have put it as ebms. You can actually pass @creator to the adapter and use that.
  • Add one more Array that stores two files Two.png and Three.png
  • Add this array to the “otherDocuments” Dataslots

You will need to add “sdms.jar” to your classpath from the SBM_HOME/libs to compile this code. You can do that by

  • copying sdms.jar to the libs folder of you project
  • Right click > Properties on your Project
  • In the Libraries Tab click on “Add Jar” and choose the sdms.jar

You Screen should look something like this

   

NOTE: Make sure you have created a folder called “documents” in the C: of your Server. Feel free to modify the path passed in the file parameter to any place where the document is.

A Closer look at the API Docs will reveal that the following are supported

 

Array Of Files

create(java.lang.String user, java.io.File[] files)

 

Single File with a Document Name and Attributes

create(java.lang.String user, java.lang.String docName, java.io.File file, java.util.Map<java.lang.String,java.lang.Object> attributes)

 

An Input Stream with Document Name and Attributes

create(java.lang.String user, java.lang.String docName, java.io.InputStream is, java.util.Map<java.lang.String,java.lang.Object> attributes)

 

A URL With Document Name and Attributes

create(java.lang.String user, java.lang.String docName, java.net.URL srcURL, java.util.Map<java.lang.String,java.lang.Object> attributes)

 

Step 5: Deploy the Process

Lets Deploy the Process. Click on the Deploy Button, Provide you username, password, Deploy URL and Follow the Wizard

Also make sure you have created a Folder called documents in your C: and added the three JPG Files.

 


Abhishek Mishra
Good experience in working with BPM technologies like Savvion, JBPM. Founder and Chief Editor of BPMGeek.com. Founder of Savvion Business Manager Mobility Framework Savmobify| View my BPMGeek Profile
|
best grammar app

About BPMGeek

BPMGeek is an initiative to collaborate and communicate with the growing Business process management community out there. The goal is to help developers connect with experts, ask questions, post their learning and get understanding of BPM Concepts. Often tool specific knowledge of niche areas end up developers perplexed and confused - especially when there are very less number of resources available. We will be coming up several several new features. Have a look at our Roadmap here

BPMGeek is an independent entity not associated with any Product. All BPM product professionals are invited to contribute. The Logos and Names used across the site belong to their respective owners. The viewpoints mentioned by Individual contributors are their own. BPMgeek cannot be held liable for any issues arising out of it.


BPMgeek is promoting the Nounshoun English Grammar App - developed by Constellation Software.