Chapter 5. Creating a Process Project in the KIE Workbench

Even if jBPM6 uses BPMN 2.0, an XML-based standard, to define its processes, it's just not practical to write such files with a simple text editor. We need a way to define our process in a user-friendly environment that will aid both technical and non-technical people who know about the specifics of the steps involved in a process to define a process definition.

The BPMN 2.0 specification not only defines the behavior syntax for our processes, but also the look and feel for the process diagrams as well. This chapter will show you a step-by-step approach to learn how to use the jBPM6 Web Process Designer that lives inside the KIE Workbench to define BPMN 2.0 files using a diagram-writing UI. In this chapter, we will learn:

  • To define our processes
  • To test our processes with simulations
  • To extend the BPMN 2.0 model to add our own types of tasks

An IDE to our knowledge

The main purpose of BPMN 2.0 is to provide business process representations that can be understood without the need for technical skills. Its concepts are not technical at all. There are abstract representations for when tasks need to be performed, decisions should be taken, and information needs to flow from one point to another—not tied to any technical implementation at the business process definition level.

The implementation, however, handles specific technical concepts that allow BPMN 2.0 to define connections to specific components in order to make it run on defined runtimes. These connections have several complex parts intrinsic to a technical implementation that require a deep understanding of IT. BPMN 2.0 needs to provide a way to work with these two perspectives, and this is why jBPM6 adds specific extensions provided by the tooling to configure all the specific components needed to define and run our process inside the jBPM6 runtime.

In this way, we can say that the graphical representation of the diagram is a business perspective of the process designer, while the specifics of configuring its properties and validating the process rely on a more technical profile.

A variety of process designers

When we start using jBPM6, one of the most confusing things is the fact that we have three different process designers to choose from. For those who are new to jBPM6 or who have used previous versions of it, it can be very confusing. Let's take a look at all the available options.

The BPMN 2.0 Eclipse editor

This is a graphical modeling tool for the creation and editing of processes in BPMN 2.0 (shown in the following screenshot), distributed as a plugin in the Eclipse IDE. If you wish to edit your BPMN 2.0 files from your own IDE, it is perhaps the best alternative to do so. Have a look at the following screenshot:

The BPMN 2.0 Eclipse editor

It has extended support for the BPMN 2.0 specification and for some jBPM6-specific characteristics. However, it is not fully integrated to jBPM6 runtime configurations, so some of the components that we might create with this editor might not be supported by the runtime afterwards. It is recommended to be used as a portable tool for IDEs to see process definitions exported from other designers (something we will see in more detail later in this chapter), but not for creating them from scratch.

The Web Process Designer

The jBPM6 Web Process Designer is an adaptation and almost complete reconstruction of an open source web editor capable of creating a full BPMN 2.0 diagram called Oryx. This project has been adapted, reconfigured, extended, and adapted again to the new web-based workbench applications provided for jBPM6 distribution into a completely new tool, and is now called the jBPM6 Web Process Designer. It is embedded in the workbench structures of UberFire and works as another editor for projects in the KIE Workbench, as shown in the following screenshot:

The Web Process Designer

Today, the Web Process Designer is the official process editor that comes with the KIE Workbench. This designer is heavily maintained at the moment, with new features and bug fixes being implemented on a regular basis to keep track with all the jBPM6 changes. Because it is the designing tool most aligned with jBPM6 features, for the rest of this chapter, we are going to cover the usage of this editor.

The jBPM Eclipse plugin

The jBPM Eclipse plugin was the first plugin supplied with the early versions of jBPM5. This plugin was a straightforward migration from the already existing Drools Flow Eclipse plugin. When Drools Flow was rebranded into jBPM5, the decision was to stop supporting the RuleFlow (RF) proprietary language for process definitions and embrace the new BPMN 2.0 standard instead. This editor is now officially discontinued. No new features have been introduced in it for a long time. You can still use this editor to create really simple processes, but its usage is strongly discouraged.

Interacting with the Web Process Designer

The KIE Workbench comes with the latest stable version of the Web Process Designer. After the JBoss instance is launched (see Chapter 4, Understanding the KIE Workbench), we will have to access the process designer by going to the Authoring | Project Authoring perspective and interact with an existing project to work with its process definitions (and other types of knowledge).

In this section, we are going to explain how to create, modify, and delete processes in the KIE Workbench. After these three operations are explained, we will be ready to cover the different features provided by the Web Process Designer in detail as well as how we can use them to define some of the processes that have already been covered in previous chapters of this book.

Creating new processes

In Chapter 4, Understanding the KIE Workbench, we had a glimpse of how to list the processes residing in a project folder. We used the playground repositories and project already provided by the KIE Workbench by default as a demo. But of course, before we can list the processes of a project, we need to create them. If we want to create a new process, we need to go to the New Item action toolbar option of the Project Authoring perspective and select the Business Process option.

Before the new process is created, we need to provide some information using the pop-up window that is opened, shown in the following screenshot. It will provide us with a textbox for selecting a name for our process. It is also going to give us a Virtual File System (VFS) path for the folder where the process will be created.

Tip

The KIE Workbench will store all knowledge assets we create in a VFS, which for the current version is implemented in Git repositories.

Please enter the resource name when this screen pops up.

Creating new processes

The name we choose for the business process must be unique among all the assets in the same folder, as it's going to be used by the KIE Workbench to internally identify the process. Once we have selected a suitable name, sprintManagement, for our first process definition, we can create the new process by clicking on the Ok button. This will create an empty process definition and invoke the Web Process Designer so that we can start working.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset