Skip to content

Comments

API documentation for process management apis#173

Closed
Christine-Jose wants to merge 7 commits intoIBM:9.2.0from
Christine-Jose:DBACLD-171361-process-compact-architecture
Closed

API documentation for process management apis#173
Christine-Jose wants to merge 7 commits intoIBM:9.2.0from
Christine-Jose:DBACLD-171361-process-compact-architecture

Conversation

@Christine-Jose
Copy link
Contributor

API documentation of process management REST API endpoints of workflow application in process-compact-architecture.

@Christine-Jose Christine-Jose force-pushed the DBACLD-171361-process-compact-architecture branch from 7a9c385 to ce9553f Compare March 26, 2025 14:44
= Management API
include::../partials/attributes.adoc[]

Process management in Kogito applications refers to the orchestration and execution of business processes and workflows, enabling the automation of complex tasks and decision-making in a cloud-native environment.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this sentence is too generic. To me, it does not provide much value in reference to the rest of the doc. I'd suggest to delete it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes are done.


Process management in Kogito applications refers to the orchestration and execution of business processes and workflows, enabling the automation of complex tasks and decision-making in a cloud-native environment.

In Kogito, Process Management APIs are crucial for interacting with business processes, including starting, querying, and managing the lifecycle of processes. Kogito provides RESTful APIs to manage processes and tasks in workflows, leveraging its integration with jBPM for business process management (BPM) and Drools for business rule management.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please replace Kogito with {PRODUCT_SHORT}

including starting, querying, and managing the lifecycle of processes.

I don't think that all of this is possible through the Management APIs. I also wouldn't bring tasks and Drools into the picture here.

What about this?

In {PRODUCT_SHORT}, Process Management APIs are provided to interact with business process definitions and active process instances. These APIs allow to obtain metadata information about process definitions, as well as provide management endpoints for active process instances.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes are done.

In Kogito, Process Management APIs are crucial for interacting with business processes, including starting, querying, and managing the lifecycle of processes. Kogito provides RESTful APIs to manage processes and tasks in workflows, leveraging its integration with jBPM for business process management (BPM) and Drools for business rule management.

== Process Management APIs
The kie-addons-quarkus-process-management is an extension for Kogito that integrates Quarkus with Kie (Drools and jBPM), enabling process management features for business workflows in a Quarkus-based microservice architecture. It provides the necessary infrastructure for running and managing business processes (from jBPM) and rules (from Drools) within a Kogito service on Quarkus.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion:

The kie-addons-quarkus-process-management is an extension for {PRODUCT_SHORT} that enables process management features for business workflows in a Quarkus-based microservice architecture. (remove the second sentence)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes updated.

|===
|*Type* |GET

|*Description* | It returns the list of process names that are currently executing.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion:

It returns the list of process definition names that are deployed in the runtime.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes are done.


|*Inputs* |

|*Output* a| A JSON List of _Process names_ that are currently executing.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes are done.


|*Example* |curl -X 'GET' \
'http://localhost:8080/management/processes' \
-H 'accept: */*'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These examples are not rendered correctly. I'd suggest to:

  • surround them with +curl example+ to mark them as code
  • remove the \ line demarcations

Note this applies to all curl commands here, as well as in the user tasks api doc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the changes for all curl commands in process-management & user task doc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

surround them with +curl example+ to mark them as code

I am sorry - this got formatted badly and sent you in the wrong direction.
What I meant to suggest were changes similar to the ones in https://github.com/IBM/bamoe-docs/pull/179/files

|*Description* |It returns the complete process information of the specified processId.

|*Inputs* |
* processId: String (PathParameter)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make sure all the Inputs lists are properly formatted. This requires the second column to be marked as AsciiDoc (a), either in

|*Inputs* a|

or right when the table is defined:

[cols="1,1a"]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes are done.


== Source File Management APIs
Source file management in Kogito, a cloud-native business automation platform, typically involves managing files related to business process management (BPM), decision management (DMN), and other related artifacts.
The kie-addons-quarkus-source-files extension is part of Kogito's integration with Quarkus and is primarily used for loading source files (such as BPMN, DMN, and DRL files) in a Quarkus-based Kogito project. This extension allows Kogito applications to dynamically load these source files, which are essential for executing business processes, decision tables, and rules within a Quarkus runtime.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion for an intro sentence:

The Source File Management APIs in {PRODUCT_SHORT} provides endpoints that allow users to dynamically retrieve BPMN source files at runtime. This API is provided by the kie-addons-quarkus-source-files extension.

Note:
Just FYI - the list of files that are returned by this API is defined here:
kie-addons-quarkus-source-files
and it is used here as a filter:
https://github.com/apache/incubator-kie-kogito-runtimes/blob/main/quarkus/addons/source-files/deployment/src/main/java/org/kie/kogito/addon/source/files/deployment/KogitoAddOnSourceFilesProcessor.java#L104

That's why it doesn't make sense to add anything but BPMN here (as BAMOE doesn't support serverless workflow).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes are done.

== Callback Jobs Service Management APIs

In Kogito, Callback Jobs Service Management APIs are used to manage callback jobs, which are jobs or tasks that are triggered at a specific point in a process or workflow. These callbacks allow external systems to be notified about events occurring within the Kogito process engine or business workflows. Kogito allows users to schedule and handle jobs, including callback jobs that can invoke external systems or APIs.

Copy link
Contributor

@martinweiler martinweiler Mar 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion:

In {PRODUCT_SHORT}, the Callback Jobs Service Management APIs are used to manage callbacks into the runtime engine from an external job service. These callbacks allow external systems, such as the job service, to trigger the execution of a TriggerJobCommand. If successful, the process instance linked to this command gets signalled and resumes its execution. This API is provided by the kogito-addons-quarkus-jobs-management extension.

 <dependency>
      <groupId>org.kie</groupId>
      <artifactId>kogito-addons-quarkus-jobs-management</artifactId>
</dependency>

NOTE: This API endpoint is not primarily intended for manual invocation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes are done.

-H 'Content-Type: application/json' \
-d '"string"'

|===
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please comment this whole section. As per the statement above, this is more for internal usage than for anyone invoking this endpoint manually. We might want to document it at some point, so you don't have to remove these details completely, but at this point I'd not have it in the generated docs. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented the code.


|===

== Job Service Management APIs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove the whole section. I don't see this endpoint useful in the compact architecture setup. I have created a JIRA to investigate about it's potential removal:
https://jsw.ibm.com/browse/DBACLD-172132

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so, IMO sticking to process instance management and sources would be the best.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the section.

@martinweiler
Copy link
Contributor

Thanks for your hard work on this one @Christine-Jose - I think this is a tricky chapter, apologies for the many remarks and suggestions.

Comment on lines 11 to 14
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-addons-quarkus-process-management</artifactId>
</dependency>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-addons-quarkus-process-management</artifactId>
</dependency>
[source,xml]
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-addons-quarkus-process-management</artifactId>
</dependency>
----

Comment on lines 498 to 501
<dependency>
<groupId>org.kie</groupId>
<artifactId>kogito-addons-quarkus-jobs-management</artifactId>
</dependency>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<dependency>
<groupId>org.kie</groupId>
<artifactId>kogito-addons-quarkus-jobs-management</artifactId>
</dependency>
[source,xml]
<dependency>
<groupId>org.kie</groupId>
<artifactId>kogito-addons-quarkus-jobs-management</artifactId>
</dependency>
----

Comment on lines 390 to 480
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-addons-quarkus-source-files</artifactId>
</dependency>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-addons-quarkus-source-files</artifactId>
</dependency>
[source,xml]
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-addons-quarkus-source-files</artifactId>
</dependency>
----

|===
|*Type* |DELETE

|*Description* |It cancels the specific processInstanceId for the given processId
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should say something like:
It aborts a specific process instance of a given process

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that in the endpoints descriptions you sometimes refer to processInstanceId/processId and in other process instance and process.

I'd try to use same wording, IMO process instance and process will make it more clear

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes are done.


|===

== Job Service Management APIs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so, IMO sticking to process instance management and sources would be the best.

@Christine-Jose Christine-Jose force-pushed the DBACLD-171361-process-compact-architecture branch from 2aa6f0f to 525933c Compare March 28, 2025 09:36
Signed-off-by: christinejose <christine.jose@ibm.com>
Signed-off-by: christinejose <christine.jose@ibm.com>
Signed-off-by: christinejose <christine.jose@ibm.com>
@Christine-Jose Christine-Jose force-pushed the DBACLD-171361-process-compact-architecture branch from 525933c to 3e3236b Compare March 28, 2025 09:41
@pefernan
Copy link
Member

I'm ok with the content, not sure if the nav.adoc is right

@martinweiler
Copy link
Contributor

Closing - this has been superseded by PR #180

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants