Mortgage Application Form

Building a BPMS Web Application Part 1: Code Generation

(This article assumes some basic knowledge of the JBoss BPM Suite including using Business Central.)

In a previous article, I described how to use the new jBPM Form API to build a BPMS web application. I also outlined a different approach in which code generation can be used to replicate the forms to the web application using the form metadata on the BPMS Execution Server. Although I provided a link to my OpenShift implementation of such a BPMS web application, the technical details on how this is achieved is still scarce. This article remedies that. Here is a recap on why we want to build a web front end to a business process. BPMS forms are generated and customised by business analysts when they create business processes. Few customers use the forms on the BPMS Execution Servers. They prefer to build a web application that interacts with the business process remotely running on a BPMS Execution Server so that fine-grained access control, consistent look-and-feel and better client interaction can be achieved. One way to do this is by using the new jBPM Form API and the other way is to use code generation to replicate the forms using the form metadata.

Generating BPMS Forms

In the code generation approach, I am going to make use of the BPMS form metadata, run it through a code generator to produce JSPs for the UI and Java classes to handle these JSPs (for business process instantiation and manual task interaction). The Java classes constitute the Model part in the MVC (Model-View-Controller) design pattern.

This article is presented in 2 parts:

  • Part 1 – (this article) shows the use of code generation to generate JSPs and Java code to build the BPMS web application
  • Part 2 – (a subsequent article) describes how a web application can interact and control a BPMS business process running on a BPMS Execution server using the BPMS Remote Java API


The business process used in this demo is the BPMS Example App Mortgage Approval Process, the same business process used in the jBPM Form API article. The mortgage application begins at the start node by using a graphical form designed using the graphical Form Designer of the JBoss BPM Suite to input data from the applicant, which includes the applicant’s personal information, annual income, so