deliveredtechnologies / rulebook

100% Java, Lambda Enabled, Lightweight Rules Engine with a Simple and Intuitive DSL
http://www.deliveredtechnologies.com
Apache License 2.0
716 stars 124 forks source link

When using RuleBookBuilder.create Rules aren't audited even when .asAuditor() is used #168

Closed mikelear closed 4 years ago

mikelear commented 5 years ago

I've added a new test that is the same as ruleBookAuditorCanAuditRules but instead uses a class (SimpleRuleAdds) which has the same rules but defined in defineRules. This test would fail as the Audit doesn't work. The example test shows that you extend RuleBookAuditor and that you have to create a Runner in the constructor , and then there are some changes to pass the Auditor down the chain.

VasuBhaskar commented 5 years ago

@Clayton7510 am exactly facing the same issue . could you please help us with this

mikelear commented 5 years ago

hi @Clayton7510 sorry to pester , have you had a chance to review this with the changes made (remove the GetAudit() ) , thanks

VasuBhaskar commented 4 years ago

hi @Clayton7510 sorry to pester , have you had a chance to review this with the changes made (remove the GetAudit() ) , thanks

@Clayton7510 I am waiting on this functionality to be available as well. any help would be very much appreciated.

Clayton7510 commented 4 years ago

My apologies. We had a hurricane scare in FL and this week is HashiConf. I will review b4 the weekend. Thanks!

Clayton7510 commented 4 years ago

Working on this... many files changed, so it may take me a couple more hours. One thing, I noticed was that the build failed. The immediate issue, of course, is that TravisCI no longer works with Oracle's Java8 image. So, the develop branch was updated to use OpenJDK. And the base branch is not up to date with the develop branch.

I just did an auto-update through this PR and it's re-running the build.

Looks like that worked. Resuming... ;)

mikelear commented 4 years ago

thanks @Clayton7510 , yep more than happy with these changes , I'll get to it soon (hopefully!) just traveling at the moment but should be back in England tomorrow , thanks

Clayton7510 commented 4 years ago

I like the ideas here and it was a good catch finding the problem. But this has sat out there for too long. So, I am going to pull over the changes, merge the requested updates in and close the PR. That does mean the author won't get credit in the commit log. But I will put attribution in the Maven POM.