The CRUD business process
The CRUD actions are based on an Object of type Person created using the Data Modeller tool:
|The object used in our CRUD. It was created using the data modeller|
The business process to create the CRUD make use of human tasks to get users input. A human task is responsible for creating an application menu for the user, the other tasks read users provided data. See the process diagram:
|A jBPM CRUD Diagram|
The box with text "Select Contact" is a reusable subprocess which goal is let users select one of the existing contacts (Person):
|User can select a contact from the existing contacts|
If you know BPMN, you might already understand how it works. There's no need to look any source code or read documentation, the diagram above tells you everything about the application.
Our process has variables to hold the users input. To pass information from users to the process, we must first understand how we can actually execute the process, and there are three ways:
- Use the jBPM Console tool as the process executor engine. This way you can interact with the process using the console itself or the console remote APIs;
- Create an application that use jBPM APIs to control the process execution using Java;
- Use the new KIE Execution server. Recently it was added BPM capabilities to the server, so you can deploy your business process to it and control the execution using the KIE Server remote APIs.
|Form for a task of our CRUD process|
If you use the jbpm console itself as the process execution server, it will render the form for you when starting process and completing tasks, and you can even embed the form in an external web application!
The CRUD full project is also available in github, but here's a small video showing it in action with everything I described above: