JBoss.orgCommunity Documentation
This chapter provides a walkthrough of a pre-made Red Hat JBoss BPM Suite example project. In this chapter, you will:
Import a number of pre-made example projects into your JBoss BPM Suite
Learn about the Human Resources Example and its usecase
Build and deploy the example project
Instantiate and explore the project
The project, together with many other example projects, can be imported through github. To learn how to import projects through github, see the JBoss BPM Suite Getting Started Guide.
The web-based workbench by default will install two sample repositories that contain various sample projects that help you getting started. This section shows different examples that can be found in the jbpm-playground repository (also available here: https://github.com/droolsjbpm/jbpm-playground). All these examples are high level and business oriented.
If you want to contribute with these examples please get in touch with any member of the jBPM/Drools Team.
The Human Resource Example's use case can be described as follows: A company wants to hire new developers. In this process, three departments (that is the Human resources, IT, and Accounting) are involved. These departments are represented by three users: Katy, Jack, and John respectively.
Note that only four out of the six defined activities within the business process are User Tasks. User Tasks require human interaction. The other two tasks are Service Tasks, which are automated and connected to other systems.
Each instance of the process will follow certain actions:
The human resources team performs the initial interview with the candidate
The IT department team performs the technical interview
Based on the output from the previous two steps, the accounting team creates a job proposal
When the proposal has been drafted, it is automatically sent to the candidate via email
If the candidate accepts the proposal, a new meeting to sign the contract is scheduled
Finally, if the candidate accepts the proposal, the system posts a message about the new hire using Twitter service connector
Note, that Jack, John, and Katy may represent any employee within the company with appropriate role assigned.
The Authoring Perspective contains the hiring.bpmn2 process and a set of forms for each human task. You may explore these knowledge assets by clicking on them. Notice that different editors open for different types of assets. If you click on the Business Process file, the Process Designer opens:
You may also explore the forms. Notice that the Form Modeller will be opened, which allows you to edit the forms to fit your requirements.
In order to build the Project, you need to go to the Authoring Perspective and open the Project Editor panel:
Once you open the Project Editor, you will see in the top right corner of the panel . This button allows you to create a new JAR artifact that will be deployed to the runtime environment as a new deployment unit.
Once you get the visual notification that the project was built and deployed successfully, you may verify its presence in the Deployments tab. To do so, click → .
You may find all the deployed units in the Deployments tab. When you Build & Deploy a project from the Project Editor, it is automatically deployed using the default configurations. Therefore, Singleton Strategy, the default KIE Base and the default KIE Session will be used.
In case you wish a more advanced deployment, you may undeploy and re-deploy your artifacts using their GAV and selecting non-default settings. By doing so, you will be able to set a different strategy, or use non-default KIE Base or KIE Session.
Once your artifact that contains the process definition is deployed, the Process Definition will become available in
→ .In order to create new Process Instances click
→ .The Process Definitions tab contains all the available process definitions in the runtime environment. In order to add new process definitions, build and deploy a new project.
Most processes require additional information to create a new process instance. This is done through forms. For this project, fill in the name of the candidate that is to be interviewed.
By clicking the start button, a new process instance will be created. This creates the first task, that is available for the Human Resources team. In order to see the task, you need to logout and log in as a user with the appropriate role assigned, that is someone from the Human Resources.
Once you have started the process, you may interact with the human tasks. To do so, click
→ . Note that in order to see the tasks in the task list, you need to belong to specific user groups, for which the task is designed. For example, the HR Interview task is visible only for the members of the HR group, and the Tech Interview Task is visible only to the members of the IT group.