Manage Processes and Tasks using Kogito consoles

This is an introduction to web-based Kogito consoles that allow you to manage processes and tasks. It covers two different consoles available on Kogito: Management console and Task console.

Setup

At present, to run the Management console and Task console applications, you need supporting services like data-index, job services, Kafka and infinispan running. To make this process simple, we have a dedicated example application here, which you can clone and run on your machine.

The steps to run the example application are as follows:

  1. Clone repository
  1. Install dependencies
  • Navigate to the example project process-usertasks-timer-quarkus-with-console, by running the command: cd ./process-usertasks-timer-quarkus-with-console
  • On the cloned path, open terminal and run command: mvn clean install -DskipTests
  1. Run docker images
  • Navigate inside docker-compose folder by running the command: cd ./docker-compose
    • For Linux and MacOS: run ./startServices.sh. This will start all the kogito services along with consoles.
    • For Windows:
      • Create a .env file with the content containing the version of the Kogito images you would like to run, for example: KOGITO_VERSION=1.0.0
      • Execute the command docker-compose up. This will start services on Windows machines.
  1.  Start runtimes and create a process
  • To start the runtimes run the following commands:
    • cd .. this will take you back to the root directory of the example project.
    • To start the runtimes application run mvn clean compile quarkus:dev
  • To create a process on the runtimes application, run the following curl command:
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
  1. Open consoles
  • After setting up all the above services, you can open the Management console and Task console applications on the below mentioned URLs on your web browser.
Management console

The Kogito Management Console is a user interface for viewing the state of all available Kogito services and managing process instances. This console is developed using two powerful and currently trending technologies: React and Apollo GraphQL.

You can use the Management console to:

  • View process instances
  • View subprocess instances
  • View current instance status
  • Abort process instances
  • View domain-specific process data.

The Management Console uses three key components of Kogito in order to provide the results, and these are prerequisites to run the Management console application:

Kogito Data Index Service

Enables the Management Console to access stored events related to process instances and domain data from the Kogito services. Document briefing about the data index service can be found here.

Kogito Process Management add-on

This enables the Management Console to interact with the process data from your Kogito services through the add-on REST endpoint /management/processes.

<dependency>
  <groupId>org.kie.kogito</groupId>
  <artifactId>kogito-addons-quarkus-process-management</artifactId>
</dependency>
Kogito Process SVG add-on

Enables the process SVG diagram for process instance execution path view. 

<dependency>
  <groupId>org.kie.kogito</groupId>
  <artifactId>kogito-addons-quarkus-process-svg</artifactId>
</dependency>

There are three main sections available on Management console UI, that allows you to interact with your process instances and domain data.

Process Instances

Use this tab to find process and subprocess instances by status or business key.

When you select a process instance on the Process Instances page, it redirects you to the Process Details page, providing the process instance details, including interactions with the process instance.

Domain Explorer

Use this tab to explore your process instances in the Kogito services using specific data of the domain. When you select a domain, you can use the same domain to set the filters and columns. The filters and columns are used to localize the domain data and access the related process instances.

Jobs

Use this tab to view a list of available jobs, filter them by status, and perform actions for individual jobs, such as view details, reschedule, or cancel.

Task console

The Kogito Task Console is a user interface for viewing and interacting with user tasks in Kogito process services. Task console currently allows you to view your assigned tasks and their details, and move them to the next phase of their lifecycle.

The Task Console requires Kogito services to use the Kogito Data Index Service.

Kogito Data Index Service

The Data Index Service enables the Task Console to access stored events related to tasks and domain data from your Kogito services. The Kogito Data Index Service requires Infinispan or MongoDB persistence and Apache Kafka messaging for the Kogito service. Document briefing about the data index service can be found here.

At present, there are two main sections available on the Task console:

Task Inbox

The Task Inbox page lists the available user tasks that you can interact with, using the toolbar options at the top to filter the tasks. You can also search for tasks by full or partial name.

Task Details

Select a task name to view its details and interact with it. Depending on the current phase of the selected task, you can select from its available actions, such as Abort, Release, Skip, or Complete, to move it to the next phase.

Conclusion

This was an overview of the features that are currently available on Kogito consoles. We are continuing to include more features, enabling consoles to be more powerful and delivering more capabilities to interact with processes, tasks, and jobs along with other Kogito services.

And that’s all for today. Thanks for reading! 😃

5 4 votes
Article Rating
Subscribe
Notify of
guest
3 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments