camunda / camunda-modeler

An integrated modeling solution for BPMN, DMN and Forms based on bpmn.io.
https://camunda.com/products/modeler
MIT License
1.5k stars 481 forks source link

BPMN Modeler: Add "Paths" tab to error panel + AI path description for readme (and process landscape) #4633

Open till-stadtler opened 1 day ago

till-stadtler commented 1 day ago

Problem you would like to solve

As a user, I want to easily generate a visual representation and a written description of a path through my BPMN model. As a designer, this can help me model correctly.

As a stakeholder, the visual representation and written description can help me quickly understand the process. Such path depictions and descriptions can be made available on the process landscape via the readme or other means.

Proposed solution

I propose to add a new tab to the error panel, next to the "Variables" tab, called "Paths".

When the tab is first opened, a how-to is displayed. The user is asked to select at least two elements. Once a selection is done (maybe include a button to confirm selection), all possible paths through the selected elements are shown as a list. If more than X paths are found, or the calculations take too long, the user is asked to make a more precise selection.

Each path is described in one row. It consists of a simple sequence of BPMN elements that make up the specific path, including XOR/OR gateways with just one outgoing sequence flow, subprocesses (always expanded), boundary events and event-based subprocesses. As this can require more width than is available, each row can be "scrolled" through.

If a path is selected, it is highlighted on the canvas.

Each path has a toolbox at the start of its row. The path can be exported as BPMN/png/svg, added to the readme, or a written description of the path can be generated via AI, which can then also be exported or added to the readme.

This will be a useful tool to "extract" the happy path of a complex process model as BPMN and/or in form of a written description. This can offer a compact way to understand a process depicted on the process landscape.

This tool might open up more opportunities in the future, including for integrated testing, business intelligence, modeling suggestions,...

Alternatives considered

I have not thought of any other comparable solution. There are certainly details about this feature request than can be improved upon.

Additional context

Here is an example process: full-diagram

After a selection of two elements (start event, and unhappy end event), there are two possible paths: image

Path 1: path-1

Path 2: path-2

Path 2 highlighted (should be done with proper highlighting): image

Path 2 written description created by CamGPT: "In the described business process, a loan application that has been initiated and passed initial automated checks is subject to a more nuanced review. The application's details are verified and a ticket is generated for tracking purposes. The application then undergoes a set of predefined business rules to evaluate its viability. This evaluation determines whether the application should be escalated for manual underwriting.

When escalated, the loan officer steps in to meticulously assess the application. After considering all relevant factors, the officer may decide that the loan should not be granted. This decision leads to the process's conclusion, where the application is formally declined, the applicant receives a notification of this outcome, and the system logs the declined application for record-keeping."

jarekdanielak commented 2 hours ago

The issue seems rather huge.

Is this part of some epic? What's the motivation for building this?

till-stadtler commented 2 hours ago

This is currently not part of an epic, at least formally. This is related to the two initiatives mentioned in the issue:

I would assume that @HanselIdes could be interested in this feature request.

The idea of "paths" had been on my mind for quite some time. The main motivation is to help process designer to create better models, and to automatically create useful documentation assets, e.g., for the readme -> process landscape.

In my experience, process designer do not think about "Paths". For example, they do not model a clear happy path from start to finish. This functionality would help designers to think more clearly about the happy path and thus create better process models. At the same time, the automatically created documentation assets can be helpful (maybe not part of an MVP approach). In the future, this tool might have some synergies, e.g., with the bpmn-auto-layout process.

To me, this is also an interesting use case for AI. It would make little sense to ask an AI to describe an entire BPMN model, but describing a specific path makes a lot of sense.