Blog Posts BPMN DMN

Developing business processes more efficiently with Runtime Tools Quarkus extension – Part 1

Blog: Drools & jBPM Blog

This the first of a series of posts presenting our new Runtime Tools Quarkus extension, which brings the main features of both Management and Task consoles to the development environment in a much easier way to set up.

History

In the past, to use features like process instances list, jobs management and task inbox locally, it was necessary to set up both Management and Task consoles. This requires a full environment filled with external services, similar to what you would need in production.

In the first release of this extension, it still requires some services, but we are removing the need for them step by step, until the extension is able to run without depending on them.

Installation

To install the extension, you just need to add it as a dependency of your project:

<dependency>
    <groupId>org.kie.kogito</groupId>
    <artifactId>runtime-tools-quarkus-extension</artifactId>
    <version>1.11.0.Final</version>
</dependency>

And also add some properties to your project src/main/resources/application.properties file:

# Data-index service URL
org.kie.kogito.runtime.tools.quarkus.extension.runtime.dataindex.DataIndexClient/mp-rest/url=http://localhost:8180

# Mocked users and groups for the task inbox screen
quarkus.kogito-runtime-tools.users=jdoe,admin,user
quarkus.kogito-runtime-tools.users.jdoe.groups=admin
quarkus.kogito-runtime-tools.users.admin.groups=admin
quarkus.kogito-runtime-tools.users.user.groups=user

As mentioned before, this release still needs a few external services to function properly: Data-index, Jobs service and Kafka.

Execution

To try the extension out, we will use the process-usertasks-timer-quarkus-with-console in the kogito-examples repository. There you can also find a comprehensive README on how to run the example and run a process.

The following steps will run all external services needed and also the consoles, if you want to try them out as well:

  1. Clone repository
git clone https://github.com/kiegroup/kogito-examples
  1. Build the example
cd process-usertasks-timer-quarkus-with-console
mvn clean install -DskipTests
  1. Run Docker images
cd docker-compose
./startServices.sh
  1. Start runtimes
cd process-usertasks-timer-quarkus-with-console
mvn clean compile quarkus:dev

Once this is executed, you can access the Quarkus Dev UI in the browser: http://localhost:8080/q/dev/

Walk-through

Once you open de Quarkus Dev UI, you will see something like this:

At the top-right corner, you can see the card of our extension, Kogito Runtime Tools. There you can check the counts for process instances, tasks and jobs, and also enter the extension by clicking in one of them:

Now let’s start a new process instance by making the following request:

curl -H "Content-Type: application/json" -H "Accept: application/json" -X POST http://localhost:8080/hiring -d @- << EOF
{   
    "candidate": {
        "name": "Harry Potter",
        "email": "harrypotter@example.com",
        "salary": 30000,
        "skills": "Java, Kogito"
    }
}
EOF

Now if we refresh the list we can see our new process instance:

And if we click in the instance, we can see its details:

As you can see in the diagram in the process details, this instance is currently waiting for the IT Interview user task to be completed. If we go to the tasks list using the left menu, we can see it:

And when we click in its name, we can complete the task:

Once the user task is completed, the process instance will finish, and you can verify that by going back to the process instance details screen.

Next steps

In the next releases, we are planning to add new features and capabilities that will improve the extension experience. Here are some of them:

One of our goals is to remove all the need for external services when using the extension. The first of those will be the data-index.

As you saw during the walk-through, a manual request was made to start a new process instance, because currently it is not possible to start them using the UI. We plan to add a process list screen, where it will be possible to see the processes available at runtime and start them, passing the needed information.

In our current distributions, user tasks forms are automatically generated based on its schema. With this feature, we plan to allow developers to make custom forms using React or HTML and use them instead of the generated ones.


Stay tuned, this is the first part of a series of posts that we will be making along with new releases of the extension. We hope these new features will help make the development of business processes easier and more powerful.

The post Developing business processes more efficiently with Runtime Tools Quarkus extension – Part 1 appeared first on KIE Community.

Leave a Comment

Get the BPI Web Feed

Using the HTML code below, you can display this Business Process Incubator page content with the current filter and sorting inside your web site for FREE.

Copy/Paste this code in your website html code:

<iframe src="https://www.businessprocessincubator.com/content/developing-business-processes-more-efficiently-with-runtime-tools-quarkus-extension-part-1/?feed=html" frameborder="0" scrolling="auto" width="100%" height="700">

Customizing your BPI Web Feed

You can click on the Get the BPI Web Feed link on any of our page to create the best possible feed for your site. Here are a few tips to customize your BPI Web Feed.

Customizing the Content Filter
On any page, you can add filter criteria using the MORE FILTERS interface:

Customizing the Content Filter

Customizing the Content Sorting
Clicking on the sorting options will also change the way your BPI Web Feed will be ordered on your site:

Get the BPI Web Feed

Some integration examples

BPMN.org

XPDL.org

×