3

Manage Processes and Tasks using Kogito consoles - KIE Community

 2 years ago
source link: https://blog.kie.org/2021/09/manage-processes-and-tasks-using-kogito-consoles.html?utm_campaign=Feed%3A+droolsatom+%28Drools+-+Atom%29
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

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": "[email protected]",
        "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.
rkAb_bkjb3n84IZMPogv_tjXg_mYPKx6JqPc6U2-BdguGO3aE973JO9-hiwoHQBZhg_rVPf778O20DIlwhEDpZcAdII-r6xZ2O4sSiUTboo8eDPWb27DUew-TQH22nPqW6IWS45Y=s0

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.

ZbkzX9gLVu0iHTv9LfRq9VnoWe6gvSny0goA_SHAFYFhtwXSr-a6jemayze4TzXWDjB54jrmUlA-pRy6roJzkMcuzvgV97StBiETmQM9u4W10Qv0KNc7k3XpxSsWkIDL0JpM__2M=s0

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.

lpknRNSiBJQIocRUrQiWd0vEJIVTSkl-nckhJGzNEd3n0-ZH8gzUAfbbF0gpOiOpzae6KLW_43UHMOe_csG6RRE_JEFFG3TUXcBWZ5h75iWz-iVxbAKPFzlljdgMLgEvdmfGh-Lb=s0Domain 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.

vTcJC7Npe40EoX8OxWfJyBDKiu25VtmtBZ3wFH4EYg5-MQhePyh2ExLqll8H7OEWjc4WXju0OwIcIuSVfGuZNge7oD3BZ-Q15WPBNjyVc8W1i93qWN5yYA5yFUDsSwczobXikRka=s0Jobs

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.

dUb0bemcTkxEbc_n4_fgDSqoe085S7s6LRyHFcSEStDs2gcPHYGUZc9vNJLJOhA_orxMKLBucW1jn-C7C8elnGUPltzrkd8EoxRJbxgll-xCv5_14EXPTocm4PAJNq6Njr38QMpG=s0
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.

OWr3SOMbAj6_z4zKXcwhuo9u8G-iheRdx1A5nS5F6yY-74VO-55E_wqkhOTAaGVXPCEh7jgXWCIInV1zof313oAjTxPhsHbtLgN-x1fI0ADYlLk2f0W8IxxUjM4Q155grAdWx6yW=s0

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.

1FzIeoJZLdaItKaa6Jn7FIEzSTk68zwU23uQHlVUHBdhsDPP8HUbrGYm8420m6Je2JqEEmCQUuphsSfAh1DpfgnISPE4TzasR4uQokckQvOfERRjffHgm3aq6jmiofoWafoz8JBa=s0Task 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.

aapzpo1cQtpYXPqAd4SCr3UAr9FTKPFJ5DRmIG1CfyQ1wu-vIoT5Hns-tLpE8PPd_oW5Ey3PtUn9pOzV_TGrt2XU7SGu72xTAafFcjDimTarG6yWQOBz0SY1FL4f7IVHcbTnYcsd=s0
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! 😃


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK