Skip to content
🚀 Play in Aletyx Sandbox to start building your Business Processes and Decisions today! ×

From Models to Execution: BPMN™ in Aletyx Playground

Introduction

Business Process Model and Notation™ (BPMN) is a standardized graphical notation for business process modeling. Aletyx Playground provides a powerful environment for creating, editing, and executing BPMN models. This getting started guide will walk you through exploring and understanding a sample hiring process, identifying key BPMN components, and deploying your process to different environments.

Accessing Aletyx Playground

Aletyx Playground is available in two formats:

A Free to use Cloud Option: - Navigate to playground.aletyx.ai - No installation required, just start playing immediately!

Your Own Containerized Option:

curl -sL https://raw.githubusercontent.com/aletyx-labs/kie-10.0.0-sandbox/refs/heads/main/docker-compose.yaml | docker compose -f - up
curl -sL https://raw.githubusercontent.com/aletyx-labs/kie-10.0.0-sandbox/refs/heads/main/docker-compose.yaml | docker-compose -f - up
curl -sL https://raw.githubusercontent.com/aletyx-labs/kie-10.0.0-sandbox/refs/heads/main/docker-compose.yaml | docker-compose -f - up

Then access Aletyx Playground at http://localhost:9090

The Aletyx Studio Interface

When you access Aletyx Studio, you'll see a welcome screen with several key areas:

Alteryx Playground Welcome Screen

1. Creation Area

The top tiles allow you to create new projects or import existing ones.

2. Import Area

Import existing projects or DMN/BPMN files either from various Git providers or through direct file uploads.

3. Projects Area

The lower section displays your locally imported projects and models.

4. Toolbar

The top bar provides access to:

  • Dev Deployments: Test deployments to connected Kubernetes or OpenShift clusters
  • Extended Services: Connection to the DMN execution service for testing
  • Settings (⚙️): Configure your Playground instance, including DMN version settings
  • Profile (👤): Configure connections to Git providers and Kubernetes environments

Exploring the Sample Hiring Process

Let's examine a sample hiring process BPMN model that demonstrates various workflow patterns to get a basis for understanding what the Aletyx Enterprise Build of Kogito and Drools offers for process design and later process management:

  1. From the welcome screen, click Try Sample under the Process section of the Aletyx Playground Create area to start seeing the basics of a BPMN workflow.

    BPMN - Try Sample

  2. The hiring process BPMN model will open in the editor:

    Sample BPMN Process

  3. If you click the name Sample on the top of the editor, you can change the name. From a best practices point of view, this is typically best to match the process identification that is behind the processID for the BPMN model. For this change, we will shift it from Sample to hiring.

    Change BPMN Name

The properties of the diagram will be explored in more detail later, but to understand the process ID and name, you can get a preview of the panel here

Hiring Properties panel

Understanding the Hiring Process Flow

This hiring process demonstrates a complete hiring workflow with multiple branches:

  1. Start: The process begins with a "New Hiring" event that initializes the candidate evaluation.
  2. Decision Gateway: Evaluates if the candidate meets minimum requirements.
  3. Offer Creation: If qualified, an offer is created with salary and bonus calculations.
  4. Parallel Interviews: HR and IT interviews proceed in parallel.
  5. Interview Timeouts: Both interviews have timer events (180-second timeouts).
  6. Hiring Decision Gateway: Based on approvals from both departments.
  7. Final Steps: Either sending an offer or application denial.

Let's explore each piece in the diagram!

BPMN Editor with Sample Hiring Process
File Location and Local Status
Within Aletyx Playground you can see the status of a file and where it is located. If the file is saved in the local storage you will have confirmation hovering this icon. Just remember, Aletyx Playground operates in a way that when the memory storage is freed, this will go away.
Start Node
The BPMN End Node signifies the start of a process drawn in BPMN for the particular instance. This is the entry point for the process. These can be a generic start as seen here or triggered from timers, signals or event (like a Kafka event). See Start Events Reference for more details.
Boundary Event Timer
For Tasks (and other services) within BPMN you can set boundary events with timers to escalate, cancel or create new pathways for processes to take. More information on Intermediate Events can be found in our documentation These utilize ISO-8601 time standard, which is covered in 8601 Reference.
BPMN Human Task
The Human task allows ou to configure a task that can be delegated to a human to do work on. In this case we will assign someone to perform work on the HR Interview task. For more information on human tasks refer to Human Task Reference.
New Hiring Script Task
This node shows a BPMN node that does a script task associated with the basis of initializing the process. When you open the properties of this node, you will see things like:
kcontext.setVariable( "hr_approval", false) which is used to initialize the process variables associated with the process.
BPMN Gateway Node - Split
A BPMN Gateway Node can creates a point in which the process can go one to many ways depending on the type of Gateway used. In this case, it is an exclusive gateway signifying if the candidate meets the requirements, the process can move foward, otherwise the application is denied and approaches the end node.. For more information refer to Gateway Reference
BPMN Gateway Node - Join
A BPMN Gateway Node can creates a point in which the process can bring multiple parts of a process back together. For more information refer to Gateway Reference
End Node
The BPMN End Node signifies the end of a process drawn in BPMN for the particular instance. When the process reaches this point it concludes. See End Events Reference..
Apply Accelerator
The accelerators provide a means of easily creating a pre-scaffolded project based on standards attached to referenced projects. This allows you to utilized pre-created templates for building your projects from model to deployment very efficiently. For more information see Accelerators Reference
New File Button
Within the same project folder that you are working in, you can create new Workflow (.bpmn), Decision (.dmn) or (.pmml) files or upload other files from your workstation. This will build it within the project, if you apply an accelerator it will incorporate all of the files associated with the workspace.
Deploy - Using Dev Deployment
From Aletyx Playground you have the capability to trigger a Dev Deployment that can be used for trying out a service. This is not meant to replace a full deployment, but is an excellent quick testing tool! For reference to Dev Deployments, refer to Dev Deployment Reference for more details.
Share - To Sync with Git or Download Files
With the Share button, you are able to synchronize your project with a Git provider utilizing your Git credentials. This also allows you to download the respective file (BPMN or DMN) in the XML format to be utilized elsewhere. For reference to Git connections, refer to Git Configuration for more details.
Custom Tasks
This portion of the BPMN palette allows for the use of custom tasks within the editor. These are typically tied to custom work item handlers.
BPMN Artifacts
BPMN Artifacts are annotations that allow you to describe/group your model, but they have no executable impact.
BPMN Start Nodes Palette
The BPMN End Node signifies the start of a process drawn in BPMN for the particular instance. This is the entry point for the process. These can be a generic start as seen here or triggered from timers, signals or event (like a Kafka event). See Start Events Reference for more details.
Catching and Throwing Nodes Palette
Used to create catching and throwing errors for a process. These can be compensation events, messages, signals, etc.
BPMN End Node Palette
The BPMN End Node signifies the end of a process drawn in BPMN for the particular instance. This is the palette item used for various end nodes. To learn more about these see End Events Reference
BPMN Activities Palette
The BPMN Activities nodes are used to create activities that occur in the BPMN process. Activities include: User tasks, Business Rules tasks, Script tasks, and Service tasks. To learn more about these see BPMN Activities Reference
BPMN Subprocesses Palette
The BPMN palette option for the various types of subprocesses they can be used within the process. For reference, refer to Subprocesses Reference.
BPMN Containers
Containers to help group tasks associated with a user/group by swimlane.
Gateway Palette
The BPMN element for different gateways that a process can utilize. For more on gateways, see Gateway Reference.
Decision Service
A Decision Service allows for decisions to be captured and exposed (or hidden) from execution.
Gate Way Branch
A gateway branch provides a conditional that the BPMN process can follow. These conditions are typically of a DRL syntax (MVEL or Java). For more on gateways, see Gateway Reference.
Properties of Selected item
Clicking the pen and paper icon opens the selected node's properties to be opened.
View Sample DMN Model Sample DMN Model

Key BPMN Components

1. Events

Events represent significant occurrences in a process. In our hiring process, we have:

  • Start Event: Marks the beginning of the process
  • End Events: Marks process completion
  • Boundary Timer Events: The clock symbols attached to interview tasks that trigger after 180 seconds

2. Activities

Activities represent work performed in the process:

  • Script Tasks: "New Hiring", "Create Offer", "Send notification HR Interview avoided", etc.
  • User Tasks: "HR Interview" and "IT Interview" requiring human interaction
  • Service Tasks: Automated tasks that execute system services (not in this example)

3. Gateways

Gateways control the flow of the process:

  • Exclusive Gateways (Diamond with X): Decision points like "Candidate meets requirements?"
  • Parallel Gateways: Points where the process splits into parallel paths (not explicitly shown but parallel flow exists)
  • Inclusive Gateways: Points where some paths are taken based on conditions (not in this example)

4. Sequence Flows

The arrows connecting the elements represent the sequence of execution:

  • Normal Flow: Standard progression path
  • Conditional Flow: Follows specific conditions (e.g., "Candidate doesn't meet requirements")
  • Default Flow: Followed when no other conditions are met

5. Data Objects

Data that flows through the process:

  • Process Variables: candidate, experience, skills, category, salary
  • Input/Output Mappings: Data passed between tasks

Working with the BPMN Editor

Understanding the Editor Interface

  1. Left Palette: Contains BPMN elements you can drag onto the modeller
  2. Modeller: The main editing area where you build your process
  3. Properties Panel: Right-side panel for configuring selected elements
  4. Top Menu: Tools for saving, deploying, and validating your model

Exploring Element Properties

Let's examine the properties of key elements:

  1. HR Interview Task Properties:
  2. Click on the "HR Interview" task to select it
  3. Open the properties panel (right side)
  4. Observe:

    • General: Name, ID, Documentation
    • Implementation: User task details
    • Data Assignments: Input/Output mappings
    • Actors: Who can perform this task ("jdoe")
  5. Gateway Properties:

  6. Click on the gateway after "Create Offer"
  7. The properties panel shows:

    • Gateway type
    • Default flow
    • Outgoing conditions
  8. Script Task Properties:

  9. Click on the "Create Offer" script task
  10. Examine the script content calculating salary and bonus
// Example script from "Create Offer" task
if(experience <= 5) {
    salary = 30000;
    category = "Software Engineer";
} else if (experience <= 10) {
    salary = 40000;
    category = "Senior Software Engineer";
} else {
    salary = 50000;
    category = "Software Architect";
}

bonus = skills.split(",").length * 150;

kcontext.setVariable("category", category);
kcontext.setVariable("salary", salary);
kcontext.setVariable("bonus", bonus);

Modifying the Process

Let's make some modifications to understand the editor better:

Adding a New Task

  1. From the left palette, drag a "User Task" onto the modeller after "Create Offer"
  2. Connect it to the flow:
  3. Click on the sequence flow between "Create Offer" and "HR Interview"
  4. Delete it by pressing Delete/Backspace
  5. Use the arrow tool to connect "Create Offer" to your new task
  6. Connect your new task to "HR Interview"
  7. Configure the task:
  8. Name it "Manager Approval"
  9. Set the actor to "manager"
  10. Add data inputs/outputs as needed

Adding a Condition to a Gateway

  1. Click on the exclusive gateway after "New Hiring"
  2. In the properties panel, select a sequence flow to edit
  3. Add a condition like: return experience >= 2;

Adding a Service Task

  1. Drag a "Service Task" from the palette to the modeller
  2. Configure it with:
  3. Name: "Background Check"
  4. Implementation: Select "Java" implementation type
  5. Class name: org.acme.hiring.BackgroundCheckService
  6. Method: performCheck

Process Variables and Data Flow

The hiring process uses several variables:

  1. Input Variables:
  2. candidate (String): Candidate's name
  3. experience (Integer): Years of experience
  4. skills (String): Comma-separated list of skills

  5. Process Variables:

  6. hr_approval (Boolean): HR interview approval
  7. it_approval (Boolean): IT interview approval

  8. Output Variables:

  9. category (String): Job category based on experience
  10. salary (Integer): Base salary calculation
  11. bonus (Integer): Bonus calculation based on skills

Data Mapping Example

Let's examine how data is passed between tasks:

  1. HR Interview Task:
  2. Inputs:
    • candidate: Candidate name
    • approve: Current approval status (hr_approval)
    • category: Job category
    • baseSalary: Salary amount
    • bonus: Bonus amount
  3. Outputs:
    • approve: Updated approval status (hr_approval)
    • category: Potentially modified category
    • baseSalary: Potentially modified salary
    • bonus: Potentially modified bonus

Process Execution and Testing

Testing Your BPMN Process

  1. Click the "Deploy" button in the top-right corner
  2. Select "Deploy to Dev" option
  3. Once deployed, click "Start Process"
  4. Enter test data:
  5. Candidate: "John Doe"
  6. Experience: 8
  7. Skills: "Java,Spring,Drools"
  8. Click "Start" to begin the process instance
  9. Navigate to the "Instances" tab to see the running process
  10. Complete user tasks as they appear in the "Tasks" tab

Monitoring Process Execution

  1. In the "Instances" tab, click on a running instance
  2. View the process diagram with highlighted current state
  3. Examine the "Variables" tab to see current values
  4. Check the "Logs" tab for execution history

Deployment Options

Local Deployment

For local testing with the Dev Deployment option:

  1. Click "Deploy" in the top menu
  2. Select "Deploy to Dev"
  3. Access runtime at http://localhost:9090/management

Kubernetes® Deployment

For deploying to Kubernetes®:

  1. Set up Kubernetes configuration:
  2. Click on the Profile icon (👤)
  3. Select "Kubernetes" tab and add your cluster
  4. Deploy to Kubernetes:
  5. Click "Deploy" in the top menu
  6. Select your Kubernetes environment
  7. Configure deployment options (replicas, resources)
  8. Click "Deploy"

Integrating BPMN with DMN™

The hiring process could be enhanced with decision models:

  1. Create a DMN model for determining eligibility:
  2. Click "New File" > "Decision"
  3. Name it "CandidateEligibility"
  4. Create decision table with inputs for experience and skills
  5. Connect it to your BPMN model

  6. Integrate the DMN with your BPMN:

  7. Replace the exclusive gateway condition with a business rule task
  8. Configure the task to call your DMN model
  9. Map process variables to DMN inputs/outputs

Java Application Integration

Setting Up a Java™ Project

<!-- Maven dependency for KIE API -->
<dependency>
    <groupId>org.kie</groupId>
    <artifactId>kie-api</artifactId>
    <version>10.0.0</version>
</dependency>

Invoking the Process from Java

import org.kie.kogito.process.Process;
import org.kie.kogito.process.ProcessInstance;

@Inject
Process<HiringModel> hiringProcess;

public void startHiringProcess(String candidate, int experience, String skills) {
    HiringModel model = HiringModel.builder()
        .candidate(candidate)
        .experience(experience)
        .skills(skills)
        .build();

    ProcessInstance<HiringModel> instance = hiringProcess.createInstance(model);
    instance.start();
}

Next Steps

Now that you're familiar with BPMN in Aletyx Playground, here are some recommended next steps:

  • Create Custom Service Tasks: Develop Java components for integration
  • Use Process Variables: Define complex data structures
  • Add Error Handling: Implement boundary error events and compensation
  • Create Multi-Instance Tasks: Handle collections of data in parallel
  • Build End-to-End Applications: Combine BPMN with DMN and Java services

Additional Resources