we use Trace very often in development environment, and this is a great tool. But we need something like a Logs in production for every rule execution. We need to keep track of wich decisions were made for each person. If user asks why they didnt get a product or something, we need to have stored the reasons why we decided to not give him this.
I see that i can create a Method table and use LoggerFactory inside of it, and call my Method everytime i want a log in spreadsheet. But this will make my rules ugly, as I have to call this method in every step. Anyway to have those logs out of the box from openl? or anyway to execute my method for every step of a spreadsheet, with Step and Value as parameters?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OpenL WebService has logging functionality, which allow to store request and responses.
You can turn on it using ruleservice.logging.enabled = true property.
Regards,
Yury.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
anyway to log every rule/decision? this ruleservice.logging seems to log only input and output of webservice, but theres no way to know wich rules were executed, as my rules call another rules. It would be good if only i could log the calls to the Rule method invoke bean (if theres something like that)...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The approach to use is to configure ruleservice.logging to store SpreadsheetResults with details of rules calculations. It will depend on the structure of current rules but usually all Spreadsheet tables can be switched to use SpreadsheetResult and store the calculation tree using these details.
Another option is to implement Aspect which will be storing the details about every executed rule and its results. The log can be stored as needed and all the rules inherit the same interface so the aspect can be easily attached to it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Did you make something like that Aspect? it would be great if you could share some example with me. Do I have to generate a new WAR or i can still use it in openl tablets original one?
Last edit: Jean Robert 2019-01-29
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You will have a new WAR file.
Intercepting method is org.openl.rules.method.ExecutableRulesMethod#invoke
This method is invoked for all type of tables with a list of parameters.
Thanks, Marat.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Whats is the best way to have a calculation memory?
In future, I want to know wich rules/values were used in my decisions.
Any ideia on how to keep track of this? can we Log something about the decisions?
Last edit: Jean Robert 2019-01-23
Hello,
Please use "Trace" functioanlity for this.
You can find more details in "OpenL Tablets - WebStudio User Guide" - "Tracing Rule" section.
Best Regards,
Alena.
we use Trace very often in development environment, and this is a great tool. But we need something like a Logs in production for every rule execution. We need to keep track of wich decisions were made for each person. If user asks why they didnt get a product or something, we need to have stored the reasons why we decided to not give him this.
I see that i can create a Method table and use LoggerFactory inside of it, and call my Method everytime i want a log in spreadsheet. But this will make my rules ugly, as I have to call this method in every step. Anyway to have those logs out of the box from openl? or anyway to execute my method for every step of a spreadsheet, with Step and Value as parameters?
Hi Robert,
OpenL WebService has logging functionality, which allow to store request and responses.
You can turn on it using ruleservice.logging.enabled = true property.
Regards,
Yury.
anyway to log every rule/decision? this ruleservice.logging seems to log only input and output of webservice, but theres no way to know wich rules were executed, as my rules call another rules. It would be good if only i could log the calls to the Rule method invoke bean (if theres something like that)...
The approach to use is to configure ruleservice.logging to store SpreadsheetResults with details of rules calculations. It will depend on the structure of current rules but usually all Spreadsheet tables can be switched to use SpreadsheetResult and store the calculation tree using these details.
Another option is to implement Aspect which will be storing the details about every executed rule and its results. The log can be stored as needed and all the rules inherit the same interface so the aspect can be easily attached to it.
Did you make something like that Aspect? it would be great if you could share some example with me. Do I have to generate a new WAR or i can still use it in openl tablets original one?
Last edit: Jean Robert 2019-01-29
Sorry, we don't have examples with AspecJ. Please, refer https://www.eclipse.org/aspectj/docs.php AspectJ documentation.
You will have a new WAR file.
Intercepting method is org.openl.rules.method.ExecutableRulesMethod#invoke
This method is invoked for all type of tables with a list of parameters.
Thanks, Marat.