With community's timely help I have managed to create a web application after getting rid of h2 database. I am posting the application here as I see a lot of people getting troubled with this.I hope this helpful in some way.
It uses a mina task service and db2 at backend. And can be used with any other database. The attached war is configured to run on websphere web server. Although it can run on other web servers too. Configuring the datasource in the target web container and making changes to the appropriate transaction factory value would do the trick.
I use jsps and servlets.
Target DB can be changed by making changes to the persistence and the connection properties listed in the file projectProp.properties
To get the task service going without the need of human task war, I took the HumanTaskServlet from bpmn2user's blog, which initiates at startup.
To add more process definitions, the id, name and image file name would need to be listed in the file ProcessDefInfo.xml. And the bpmn file would be required in the classpath. The corresponding image file would need to go in /img/workflow-img/
The path of the file ProcessDefInfo.xml would need to be mentioned as a property in the file projectProp.properties. As it would be required at startup by the HumanTaskServlet to load the process definitions.
The application is loaded with the following 4 users :
3 for jbpm. and 1 admin user for initiating the processes.
2) krisv - no authentication
3) mary - no authentication
4) john - no authentication
1) If the administrator logs in, it gets an additional menu option to initiate the process :
Clicking on which gives the following page :
a) Start: To start an instance of the process.
b) Stop: Clicking on Stop gives a list of all the active process instances for that particular Process Definition. Clicking on Stop Process stops the process instance and removes its tasks from the assigned user task lists. This functionality is currently not in function. I am working on this.
c) Delete: Clicking on Delete gives a list of all the process instances for that particular Process Definition whether active or inactive. Clicking on Delete Process deletes the process instance history and removes its tasks from the assigned user task lists. This functionality is currently not in function. I am working on this.
2) There is a tab called Status in the top menu which is available to all the users. It gives a list of all the process instances for all the process definitions whether active or inactive and provides 2 additional options along with the process instance.
a) Graphical View : This Option is enabled only for the active process instances. Clicking on which shows the image of the process with the current pending task highlighted.
b) Report View : This option gives the task wise status of the process instance.
3) TaskList : Each user has an option to view its own task list. The task list is divided in two halfs. Upper half shows the list of tasks which are only assigned to the logged in user. And it gives option to Start a task, stop a task, complete a task or reassign it to another user.
The second half of the screen shows the list of tasks which are assigned to the user and also to other users. In that case, user gets option to claim the task which adds the task to its personal task list in the first half.
To complete a task, it needs to be started first. To reassign it, it needs to be in reserved state.
The list of library I use is the following :
There will be a lot of bad code at places. The main purpose of this application is to work out the functionality of jBPM 5.4.
WebApplication2.war 98.4 KB