Wednesday, 26 August 2009

JBPM and JSF file upload

I am currently using JBPM 3.2.1 and JSF for a project for British Airways. JSF is the default expression language supported by JBPM and it was decided to go for it ( by my ancestors in the company). They did not realise how wrong they were. JSF is a very less intuitive language and surrounded by the JBPM process engine it almost is extremely restrictive.

Today i wanted to include a file upload button in one of the task forms for JBPM. Sounds very simple -innit? but it is really not. JSF does not support file upload functionality and you have to use a custom file upload component ( if you want some of the inbuild functionality). I went for the most popular choice "the myFaces" input file upload component.

Follow this article on how to setup your environment and configurations.
http://balusc.blogspot.com/2008/02/uploading-files-with-jsf.html

I did all that , but my uploadedFile was always passed as null. I had to put this h:form inside my jbpm:dataform and it chokes the whole system. I could not get much help on the internet as JSF is kind of deprecated(!!!) by the JBPM architects and they have followed SEAM in all new implementation. So there are no javadocs, no tutorials..nothing!!!. I was kind of stuck up as to how to proceed on this. I will post my experience very soon!!. bye for now..

No comments:

Post a Comment

Please feel free to post your comments!

Welcome to Planet-Sujie!!

Here you can view technical articles, challenges and solutions and some of my BLOGS.


View My Stats