0
votes

We are using the latest Docker images of Business Central and KIE-server, and are interacting with the rules service client using KIE's REST API.

We created a set of rules in Business Central that, when fired, insert a "Response" fact.

We would like to be able to sent requests to KIE Server in a stateless manner; i.e. every time we send a request (typically composed of a chain the following chain of commands: insert-object -> fire-all-rules -> get-objects) to the server, no objects/facts from a previous requests should be returned by the get-objects command.

From what we understand, one way to go about this would be to create a new session for each request. How would one do that? Any other suggestions and/or references?

1
Are you currently getting back objects/facts from previous requests? - Roddy of the Frozen Peas
Yes, until I reset the docker image of KIE Server, all the facts either inserted through a request or upon rule firing persist, and I can retrieve them with a get-objects request. - Yann Vonderscher
Did you configure kie server to use stateless sessions? - Roddy of the Frozen Peas
Thanks for the hint. Indeed, I had not configured KIE Server to use stateless session. The following Stack explains how to do it in Business Central (see Q1 response): stackoverflow.com/questions/57627740/… - Yann Vonderscher

1 Answers

1
votes

Stateless API calls will work once a stateless session is defined. In your API call, refer to the stateless session using the "lookup" key. Here is a reference to another StackOverflow which explains how to create the stateless session in Businsess Central: How to invoke decision service as a stateless session in Kie (RedHat Decision Manager)