Business Process Modeling - BTMSoftwareSolutions.com

Wednesday, September 28, 2011

Orbeon xForms Upload/Retrieve Docs from Database

The following screen cast shows how you can use the orbeon upload control to capture document information from a file and then use one submission to store the file to a database and another submission to retrieve the file from the database. 

To store the file to the database an xpl file is called which calls an xslt processor to format the input-config element of the url-generator.  The url-generator processor receieves the url of the temp file passed in on instance data dynamically created by xslt processor.  The url-generator processor grabs the file data in binary mode.  We then use an identity processor to aggregate the instance data passed in on the submission and the output of the url-generator.  We call another xlst processor to dynamically create the input-config element for the SQL processor which will insert the document into the database along with metadata about the file - mediatype, filename, size, ids, etc.

To retrieve the document from the database we call another submission which executes another xpl file.  We pass in instance data about the row of the file we selected to be used as parameters in the sql processor.  So we call sql processor and select the appropriate document.  Then we call an xslt processor and to dynamically configure the config-input element of the http-serializer.  We call a second xslt processor to wrap the document base64Binary data with a root document element and pass as the config-data to the http-serializer.

For assistance on your Orbeon xForms project with storing files and/or integrating with Intalio BPM workflow tool please contact us at BTM Software Solutions, LLC.

Unable to display content. Adobe Flash is required.