How to Execute DRL Business Rules via Red Hat's Process Automation Manager RESTful Interface
Автор: vlogize
Загружено: 2025-05-26
Просмотров: 2
Описание:
Discover how to test DRL business rules using Red Hat's Process Automation Manager with RESTful services for streamlined execution.
---
This video is based on the question https://stackoverflow.com/q/66756673/ asked by the user 'littleK' ( https://stackoverflow.com/u/123891/ ) and on the answer https://stackoverflow.com/a/66773970/ provided by the user 'littleK' ( https://stackoverflow.com/u/123891/ ) at 'Stack Overflow' website. Thanks to these great users and Stackexchange community for their contributions.
Visit these links for original content and any more details, such as alternate solutions, latest updates/developments on topic, comments, revision history etc. For example, the original title of the Question was: Is there a RESTful Interface for Executing DRL Business Rules via Red Hat's Process Automation Manager / KIE Decision Server?
Also, Content (except music) licensed under CC BY-SA https://meta.stackexchange.com/help/l...
The original Question post is licensed under the 'CC BY-SA 4.0' ( https://creativecommons.org/licenses/... ) license, and the original Answer post is licensed under the 'CC BY-SA 4.0' ( https://creativecommons.org/licenses/... ) license.
If anything seems off to you, please feel free to write me at vlogize [AT] gmail [DOT] com.
---
Exploring the RESTful Interface for Executing DRL Business Rules
If you're venturing into the world of business rules and automation with Red Hat's Process Automation Manager, you may encounter a common question: Is there a RESTful interface to execute DRL business rules? This post will guide you through the capabilities available for invoking your DRL rules efficiently without needing to write additional client code.
The Challenge: Executing DRL Rules
As you may know, Red Hat's Process Automation Manager offers several ways to define business rules - from Decision Model and Notation (DMN) and guided decision tables to plain Drools Rule Language (DRL). However, if you're aiming to interact with DRL rules using the RESTful interface, specifically through the KIE Server (Knowledge Is Everything), the documentation can be a tad sparse.
This leaves you with a pressing question: Can I utilize Swagger UI to test DRL rules just like I can with DMN or guided tables? The answer is a resounding yes, and in this guide, we will walk you through the steps needed to achieve this.
Solution: Executing DRL Rules via KIE Server RESTful API
To execute DRL business rules using the KIE Server's RESTful services, follow these structured steps:
Step 1: Deploy Your DRL Rules
Before you can execute a rule, ensure that your DRL rules are deployed correctly. Start by deploying a container with your DRL business rules in Red Hat's Process Automation Manager. A simple way to check the status of your deployment is by accessing the KIE Server Execution Docs, which can typically be found at:
[[See Video to Reveal this Text or Code Snippet]]
Step 2: Access KIE Session Assets
Once your DRL rules are deployed, you will need to work within the KIE session assets. Navigate through the API documentation and choose the KIE Session Assets section to prepare for invoking your rules.
Step 3: Post Your Commands
Now that you've identified your container, you can execute your DRL rules by sending a POST request to the following endpoint:
[[See Video to Reveal this Text or Code Snippet]]
Make sure to replace {containerId} with your actual container ID (e.g., rules_1.0.0-SNAPSHOT).
Step 4: Example Request Body
To execute your DRL business rule, you'll need to structure your request body properly. Here’s a sample JSON body you can use to test your rules:
[[See Video to Reveal this Text or Code Snippet]]
Notes on Your Business Logic
Object Structure: Ensure that the object property matches the data structure defined in your DRL rules.
Output Identifier: The out-identifier allows you to specify the context in which the current object is being identified within the session, making it easier to reference later.
Conclusion
Executing DRL business rules using Red Hat's Process Automation Manager RESTful interface is both straightforward and powerful. By following these steps, you can streamline your business logic evaluation right through the Swagger UI, much like you would with DMN or guided decision tables. Happy automating!
Повторяем попытку...

Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: