Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

Running an event-driven health management business process through a few scenarios: Part 1

<p>&nbsp;</p> <quillbot-extension-portal></quillbot-extension-portal>

March 31, 2020
Maurizio Carioli
Related topics:
Event-drivenJava
Related products:
Developer Toolset

    In the previous series of articles, Designing an event-driven business process at scale: A health management example (which you need to read to fully understand this one), you designed and implemented an event-driven scalable business process for the population health management use case. Now, you will run this process through a few scenarios. In this way, you will:

    • Gain a solid understanding of how the business process works.
    • Have a chance of validating if your implementation is correct.
    • Learn how to wire the user interface of the business application driven by the business process.

    Ultimately, this series is a demonstration of a population health management solution encompassing several technologies besides business process management (BPM), such as decision management (business rules), streaming data, monitoring and analytics, etc. Future posts will cover how to implement and integrate the various components.

    Prerequisites

    You need to have Java, Git, and Maven installed to follow along with this article. To ensure that you have a compatible version of Java, run the following on the console (either version 8 or 11 will do):

    $ java -version

    You also need to be able to download, install, and run jBPM on your system. In this article, I assume that the directory where jBPM is installed is jbpm-server-7.33.0.Final-dist. However, you should use the actual name you get after you unzip the jBPM single zip distribution.

    Event listeners

    Now, make sure that jBPM is not running. If you started it, just stop it or kill it. You need to clone the Git repositories that contain the projects housing the event listeners that you will use to trace process activity:

    $ git clone git@github.com:mauriziocarioli/Tracing.git
    Cloning into 'Tracing'...
    
    remote: Enumerating objects: 135, done.
    remote: Counting objects: 100% (135/135), done.
    remote: Compressing objects: 100% (61/61), done.
    remote: Total 135 (delta 66), reused 122 (delta 53), pack-reused 0
    Receiving objects: 100% (135/135), 50.28 KiB | 1.03 MiB/s, done.
    Resolving deltas: 100% (66/66), done.
    
    $ git clone git@github.com:mauriziocarioli/PHM-Tracing.git
    Cloning into 'PHM-Tracing'...
    
    remote: Enumerating objects: 58, done.
    remote: Counting objects: 100% (58/58), done.
    remote: Compressing objects: 100% (27/27), done.
    remote: Total 58 (delta 28), reused 53 (delta 23), pack-reused 0
    Receiving objects: 100% (58/58), 21.15 KiB | 21.15 MiB/s, done.
    Resolving deltas: 100% (28/28), done.
    

    Go into the Tracing directory and run:

    $ mvn install
    [INFO] Scanning for projects...
    [INFO]
    
    [INFO] -------------------< com.redhat.batigerteam:tracing >-------------------
    [INFO] Building tracing 1.0.0
    
    [INFO] --------------------------------[ jar ]---------------------------------
    

    Note: The first time you run this, it will download many jar files from the Maven central repository, which can take a long time.

    After the mvn install finishes successfully, copy target/tracing-1.0.0.jar into jbpm-server-7.33.0.Final-dist/standalone/deployments/kie-server.war/WEB-INF/lib.

    Now go up and into the PHM-Tracing directory. Run mvn install again and then copy target/phm-tracing-1.0.0.jar into the same directory as the previous jar file.

    Congratulations, you installed the tracing jars.

    jBPM projects

    Now, start jBPM. For example, on either a Mac or Linux, run:

    $ jbpm-server-7.33.0.Final-dist/bin/standalone.sh -c standalone.xml -b 0.0.0.0

    Or on Windows, run:

    $ jbpm-server-7.33.0.Final-dist/bin/standalone.bat -c standalone.xml -b 0.0.0.0

    If you worked your way through the previous series, you already know how to do what follows. Even so, this information will be useful to you in case you want to restart from scratch without having to redo your implementation.

    There are two scripts in the src/main/sh directory of the project PHM-Processes. If you are on either macOS or Linux, run the script add-users.sh. If you are on Windows (with PowerShell) run add-users.ps1. These scripts create all of the users and groups needed to test these scenarios.

    After jBPM has started, open your browser, go to http://localhost:8080/business-central/kie-wb.jsp, and log in as wbadmin with the password wbadmin.

    Set up your space

    In Business Central (Figure 1), find the Design section and click the projects link. This is where processes are designed and implemented.

    Business Central - Design - projects
    Figure 1: Business Central - Design - projects

    You will find yourself at the spaces level of the Design section. Design artifacts are organized in projects which are found in spaces. It's a basic organizational hierarchy where selective permissions can be applied both at the space and project levels. You need to create a new space named Health-Insurance and then enter this space, so the top path of any design artifacts in the projects within will be com/health_insurance.

    Add the sample projects

    In the space Health-Insurance, click the Add Project drop-down list and select Import Project as shown in Figure 2.

    Add Project - Import Project
    Figure 2: Add Project - Import Project

    Then, enter the GitHub link to the Git project repository containing the data model as shown in Figure 3.

    Import Project - Repository URL
    Figure 3: Import Project - Repository URL

    Click Import to continue. Now, repeat the project import this time with the Git repository containing the business process and subprocesses.

    You now have two projects in the Health-Insurance space (Figure 4).

    Business Central - Projects
    Figure 4: Business Central - Projects.
    Figure 4: One space containing multiple projects.

    Deploy the projects and servers

    Go into the PHM-Model project, wait for indexing to complete, and then click the Deploy button as shown in Figure 5.

    Business Central - Deploy project
    Figure 5: Business Central - Deploy project.
    Figure 5: Deploy the PHM-Model project.

    Deploy the PHM-Processes project in the same manner. Then, go to Business Central's, find the Deploy section, and click servers (Figure 6).

    Business Central - Deploy - servers
    Figure 6: Business Central - Deploy - servers.

    You should see the two deployment units shown in Figure 7. These are custom jar files (kjar files) containing the executable artifacts of each project deployed to the process server (or KIE server).

    Business Central - Server configurations and deployment units
    Figure 7: Business Central - Server configurations and deployment units.

    Figure 7: View the deployment units that this server is running.

    Clone the Get the Data repository

    You are almost done with setting everything up. You just need to clone the Get the Data service REST API's Git repository (described in the previous series), install the dependencies, and start the service on Node.js:

    4> git clone https://github.com/mauriziocarioli/PHM-API.git
    Cloning into 'PHM-API'...
    remote: Enumerating objects: 17, done.
    remote: Counting objects: 100% (17/17), done.
    remote: Compressing objects: 100% (13/13), done.
    remote: Total 17 (delta 6), reused 15 (delta 4), pack-reused 0
    Unpacking objects: 100% (17/17), done.
    [ec2-user@ip-172-31-33-184.ec2.internal/~/Demos]
    5> cd PHM-API
    [ec2-user@ip-172-31-33-184.ec2.internal/~/Demos/PHM-API]
    6> ls -al
    total 44
    drwxrwxr-x.  3 ec2-user ec2-user   127 Feb  5 15:23 .
    drwxrwxr-x. 10 ec2-user ec2-user   236 Feb  5 15:23 ..
    -rw-rw-r--.  1 ec2-user ec2-user  3636 Feb  5 15:23 app.js
    drwxrwxr-x.  8 ec2-user ec2-user   163 Feb  5 15:23 .git
    -rw-rw-r--.  1 ec2-user ec2-user   256 Feb  5 15:23 .gitignore
    -rw-rw-r--.  1 ec2-user ec2-user 11357 Feb  5 15:23 LICENSE
    -rw-rw-r--.  1 ec2-user ec2-user   360 Feb  5 15:23 package.json
    -rw-rw-r--.  1 ec2-user ec2-user 14282 Feb  5 15:23 package-lock.json
    -rw-rw-r--.  1 ec2-user ec2-user   595 Feb  5 15:23 README.md
    [ec2-user@ip-172-31-33-184.ec2.internal/~/Demos/PHM-API]
    7> npm install
    npm WARN phmapi@1.0.0 No repository field.
    
    added 50 packages from 37 contributors and audited 158 packages in 0.781s
    found 0 vulnerabilities
    
    [ec2-user@ip-172-31-33-184.ec2.internal/~/Demos/PHM-API]
    8> npm start
    
    > phmapi@1.0.0 start /home/ec2-user/Demos/PHM-API
    > node app.js
    
    running at port 3200
    

    Conclusions

    Before you could run some scenarios of this Population Health Management application you needed to install and configure several components.

    • The event listeners, which are very important to monitor as well as react to the activities in the process.
    • The jBPM projects themselves.
    • The Node.js REST service that is used to provide the data needed by the jBPM processes to execute.

    Now you are ready to go through the scenarios in the next post.

    Last updated: February 6, 2024

    Recent Posts

    • Red Hat Enterprise Linux 10.2 and 9.8: Top features for developers

    • What GPU kernels mean for your distributed inference

    • Debugging image mode with Red Hat OpenShift 4.20: A practical guide

    • EvalHub: Because "looks good to me" isn't a benchmark

    • SQL Server HA on RHEL: Meet Pacemaker HA Agent v2 (tech preview)

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Chat Support

    Please log in with your Red Hat account to access chat support.