jBPM Workflow Tutorial: Hello World ⚙️ Script Task

🚀 Introduction

In this tutorial, we’ll create the simplest possible workflow in jBPM using a ⚙️ Script Task. The process runs automatically from 🔵 Start → ⚙️ Script Task → ✅ End, printing a message in the console logs.

This is the classic “Hello World” example for business process automation.


🛠️ Prerequisites

  • 💻 jBPM/Business Central & KIE Server bundle installed (7.x or 8.x community)

  • ☕ JDK 11+ (JDK 17 also works)

  • 🌐 Access to Business Central:

    http://localhost:8080/business-central

📝 Step 1: Create a New Process

  1. 🔑 In Business Central → open your project or create a new one.

  2. ➕ Click Add Asset → Business Process.

  3. ⚙️ Set properties:

    • Name: HelloWorldProcess

    • Id: com.example.helloworld

    • Package: com.example


🎨 Step 2: Design the Workflow

  1. 🔵 Add a Start node.

  2. ⚙️ Add a Script Task.

  3. ✅ Add an End node.

  4. 🔗 Connect them: Start → Script Task → End.


✍️ Step 3: Configure the Script Task

  1. ⚙️ Select the Script Task → go to Properties.

  2. Set values:

    • 🏷️ Name: Print Hello World

    • 💻 Script Language: Java

    • 📜 Script Content:

      System.out.println("Hello World from jBPM!");

🔨 Step 4: Build and Deploy

  1. 💾 Save the process.

  2. 🛠️ Use the Build & Install button.

  3. 📦 Confirm the container is deployed to KIE Server.


▶️ Step 5: Run the Process

  1. Go to Manage → Process Definitions.

  2. ▶️ Select HelloWorldProcessNew Process InstanceStart.

  3. ✅ The process completes instantly.


🖥️ Step 6: Check the Output

Open the application server logs (where you started jBPM with standalone.bat or standalone.sh).
You’ll see:

Hello World from jBPM!

📌 Next Steps

  • 📝 Add process variables and print them in the script.

  • 👤 Combine Script Task with Human Task for richer workflows.

  • 🔀 Extend with Gateways, ⚙️ Service Tasks, or 📧 Email Tasks.

👉Watch jBPM Workflow script task Practical in Action better:

Here's a quick video to help you understand jBPM Workflow Automation in Practical in Action better: JBPM Tutorial | Human Task & Hello World Script Flow



🎯 Conclusion

The ⚙️ Hello World Script Task is the most basic workflow you can build in jBPM. While simple, it introduces the core concept of automating actions with Script Tasks and validates that your environment is running correctly.

From here, you can evolve into more advanced workflows that include 👤 Human Tasks, 🔀 Gateways, and ⚙️ Service Integrations. Mastering this simple example lays the foundation for building more powerful and scalable business processes in jBPM.


💼 Professional Support Available

If you are facing issues in real projects related to enterprise backend development or workflow automation, I provide paid consulting, production debugging, project support, and focused trainings.

Technologies covered include Java, Spring Boot, PL/SQL, Azure, and workflow automation (jBPM, Camunda BPM, RHPAM).


Comments

Popular posts from this blog

jBPM Installation Guide: Step by Step Setup

Scopes of Signal in jBPM

OOPs Concepts in Java | English | Object Oriented Programming Explained