How to Create a Business Process in JBoss BPM Suite

JBoss BPMS helps us manage complex business processes and speed up development

How to Create a Business Process in JBoss BPM Suite

When our business processes become complex, they can be difficult to change.

And if we can't modify our procedures quickly, we won’t be able to adapt to new requirements.

Our products will be out-of-date and our business will struggle.

But we don't want that.

We want an easy way to manage our business processes so we can build great software quickly.

And for that, we need to use JBoss BPM Suite

So..

Why do we use JBoss BPM Suite?

JBoss BPMS (Business Process Management Suite) helps us manage complex business processes. It allows us to easily:

  1. Visualize workflows
  2. Modify business processes and rules
  3. Respond to complex events

BPMS stores our workflow in a centralized location so that everyone in the company understands it.

How do we use JBoss BPM Suite?

We'll create a business process for a credit card application. Our fictional credit card will be called "The Elite Card".

Install JBoss BPM Suite

Step 1: Install JBoss EAP 7.0

  • Download the zip and extract it
  • We'll refer to this extracted location (jboss-eap-7.0) as $JBOSS_HOME

Step 2: Install JBoss BPM Suite 6.4

  • Download JBoss BPM Suite 6 deployable for EAP 7 to the same location as EAP 7.0
  • Extract the zip. When it asks to overwrite files, say yes
  • If you're on Mac, you'll need to extract this in the terminal
$ unzip

Step 3: Add a user

  • In a terminal, go to $JBOSS_HOME/bin and run (for Windows, add-user.bat)
./add-user.sh -a --user bpmsAdmin --password bpmsAdmin1! --role kie-server,admin,rest-all,analyst

Open Business Central

Step 1: Start JBoss Server

  • In a terminal, go to $JBOSS_HOME/bin and run (for Windows, standalone.bat)
./standalone.sh

Step 2: Open Business Central

Step 3: Login with your username and password

Create a Business Process

Step 1: Click Authoring -> Project Authoring

Step 2: Click New Item -> Business Process

Step 3: Create process variables

  • Open the properties menu
  • Open Variable Definitions
  • Add 3 variables and save your changes - applicantName (String), ssn (String), annualIncome (Integer)

Step 4: Create a process task named Collect Applicant Info

  • Click the start node and click the rectangular box that pops up
  • Double-click the task to change the name to Collect Applicant Info
  • Open the properties menu (<<), and change Task type to Script
  • To the right of Script, click the drop down and add the following
System.out.println("Collecting Applicant Info");

Step 5: Create process task named Verify Identity

  • Click the Collect Applicant Info task box and click the rectangular box that pops up
  • Name this task Acquire Credit Score
  • Change the task type to script and add the following script
System.out.println("Acquiring Credit Score");

Step 6: Create process task named Calculate Credit Line

  • Repeat the process above to create another script task named Calculate Credit Line
  • Add the following script
System.out.println("Calculate Credit Line");

Step 7: Create an End Node

  • Click the Check Ability to Pay task box and click the circle that pops up
  • Save your changes

Run a Business Process

Step 1: Build Your Project

  • Open the Project Editor
  • On the right, click Build -> Build & Deploy

Step 2: Run Your Process

  • Go to Process Management -> Process Definitions
  • Under Actions, click Start
  • Submit the blank form

Step 3: Check your server terminal. You should see three process messages

Great Work! Let's review what we just did.

Recap

Install JBPMS

  • We installed JBoss BPM and JBoss EAP
  • JBoss BPM Suite can be deployed to EAP and other application servers
  • We created a user for JBoss BPM and assigned it to a few roles

Open Business Central

  • We logged in to business central
  • Business Central is the location for all our business processes and rules

Create a Business Process

  • We created a business process model to visualize our process. These models are also easy to modify
  • Process variable - store data during our process
  • Process task - a single action that occurs in a process
  • End Node - signifies the end of our process
  • All processes are written in BPMN notation

What's a best practice for using BPMS?

Since BPM systems add a certain amount of overhead, you should only use them for certain types of processes.

BPMS works best for processes that have at least one of the following characteristics:

  1. Complex - multiple systems, rules, human interaction
  2. Frequently changing - due to regulations or requirements
  3. Long-running - hours, days, weeks or more

JBoss BPM is a great fit for industries like travel, finance, or insurance.

So…

  1. BPMS helps us manage complex business processes. We can easily visualize workflows, modify processes, and respond to complex events.
  2. We use Business Central to create and manage our business processes
  3. BPMS is a great fit for complex, frequently changing, or long running processes
  1. How to Import a Project in JBoss BPMS
  2. JBoss BPMS Example Projects & Videos
  3. Red Hat BPM & BRMS Video

That's all for today!

Happy Coding,

-T.O.