<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>Pretty much correct.</div><div><br></div><div>re. 5 - It depends on what you mean by it becoming clear that a release is a bad one.</div><div><br></div><div>I have tended to code up my own knowledge base reloads and check for errors, but I’m pretty sure that if your rules don’t compile, then neither the KnowledgeAgent nor the KieScanner will deploy them. If you use Guvnor, then your project will not be built and packaged if the rules don’t compile.</div><div><br></div><div>However, if the problem is that the new rules are just ‘wrong’ within your domain, then it’s hard to think of any way in which that could be detected automatically, other than by you yourself writing the validation.</div><div><br></div><div>To help with this, I have previously set up a FitNesse server which would load in the latest rules and evaluate them, ensuring that output expectations are met. However, no such test suite is perfect. It may be that a change is made which needs a new test to evaluate it. If that test is not written, then the suite of tests still passes.</div><div><br></div><div>Similarly, you can write unit tests for the build. You can deploy to a staging server, where the rules can be evaluated with as-live data, so that you can regression test the rules service in isolation from the rest of your application.</div><div><br></div><div>Looking at rollback, in one Guvnor-based system, I have the users take a snapshot for each rules deployment. They then copy that snapshot to an “approved” snapshot. This way, rollback is just a case of copying the previous version to “approved” and deploying that. The users are legal and back office operations teams, and they are pretty efficient at following this process these days.</div><div><br></div><div>However, in the end it comes down to things like:</div><div><ol class="MailOutline"><li>What kind of rule changes do users typically make? i.e. Are they just changing some numbers in existing decision tables?</li><li>Can you trust the users to only make non-risky changes? Guvnor won’t stop them from altering the structure of decision tables, or adding new non-decision-table rules.</li><li>How risk-averse are you?</li></ol></div><div><br></div><div>Steve</div><div><br></div><br><div><div>On 23 Apr 2014, at 19:10, Pykhtin, Alex <<a href="mailto:apykhtin@ebay.com">apykhtin@ebay.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div lang="EN-US" link="blue" vlink="purple" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div class="WordSection1" style="page: WordSection1;"><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 10pt; font-family: 'Courier New';">Thank you, Steve,<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 10pt; font-family: 'Courier New';">I looked at KnowledgeAgent and KieScanner documentation and looks like this is something that can help in hot deployment, but not so much in safe proofing.<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 10pt; font-family: 'Courier New';"> </span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 10pt; font-family: 'Courier New';">Here are some basic facts (or misconceptions) that I have gathered so far:<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 10pt; font-family: 'Courier New';"> </span></div><div style="margin: 0in 0in 0.0001pt 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: -0.25in;"><span style="font-size: 10pt; font-family: 'Courier New';"><span>1.<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-family: 'Times New Roman';"> <span class="Apple-converted-space"> </span></span></span></span><span style="font-size: 10pt; font-family: 'Courier New';">KnowledgeAgent and KieScanner are able to dynamically detect changes in the rules (and other resources) and hot-deploy them to running Drools installation;<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: -0.25in;"><span style="font-size: 10pt; font-family: 'Courier New';"><span>2.<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-family: 'Times New Roman';"> <span class="Apple-converted-space"> </span></span></span></span><span style="font-size: 10pt; font-family: 'Courier New';">KnowledgeAgent belongs to Drools 5.X. In 6.X it is deprecated in favor of KieScanner (which is available starting 6.0.X);<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: -0.25in;"><span style="font-size: 10pt; font-family: 'Courier New';"><span>3.<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-family: 'Times New Roman';"> <span class="Apple-converted-space"> </span></span></span></span><span style="font-size: 10pt; font-family: 'Courier New';">KnowledgeAgent transmits changes through monitoring file system for .DRL files or via HTTP connection to a running Guvnor instance;<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: -0.25in;"><span style="font-size: 10pt; font-family: 'Courier New';"><span>4.<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-family: 'Times New Roman';"> <span class="Apple-converted-space"> </span></span></span></span><span style="font-size: 10pt; font-family: 'Courier New';">KieScanner transmits changes through monitoring Maven repository. It appears like old KnowledgeAgent’s ability to transmit individual .DRL files is deprecated;<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt 0.5in; font-size: 11pt; font-family: Calibri, sans-serif; text-indent: -0.25in;"><span style="font-size: 10pt; font-family: 'Courier New';"><span>5.<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-family: 'Times New Roman';"> <span class="Apple-converted-space"> </span></span></span></span><span style="font-size: 10pt; font-family: 'Courier New';">Neither KnowledgeAgent nor KieScanner have a built-in mechanism for error handling, at least not a sophisticated one. There is no way to perform a rollback if at some point it becomes clear that a new update is a bad one.<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 10pt; font-family: 'Courier New';"> </span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 10pt; font-family: 'Courier New';">Thanks,<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 10pt; font-family: 'Courier New';">Alex<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 10pt; font-family: 'Courier New';"> </span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 10pt; font-family: 'Courier New';">> If you want to hot-deploy rule changes, just take a look at the documentation on knowledge agents or KieScanner (v6). It’s also easy enough to code a knowledge base reload yourself.<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 10pt; font-family: 'Courier New';">><o:p> </o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 10pt; font-family: 'Courier New';">> However, you say:<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 10pt; font-family: 'Courier New';">><o:p> </o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 10pt; font-family: 'Courier New';">> Ideally we would like business users to add or modify rules in Production without risk of crashing entire rules engine.<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 10pt; font-family: 'Courier New';">><o:p> </o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 10pt; font-family: 'Courier New';">> Rules and facts are code, so changes could crash your system if written poorly. Supporting hot deployment does not mean that you don’t need to regression test your changes. All it means is that you can break your system much more quickly than before.<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 10pt; font-family: 'Courier New';">><o:p> </o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 10pt; font-family: 'Courier New';">> The only way to get around this is to write your own UI, which prevents users from making any rules or fact changes that ‘break’ your system. How you achieve that is very much dependent on what you want users to change and how much time you are prepared to spend writing automated tests to prevent breaking changes from being deployed.<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 10pt; font-family: 'Courier New';">><o:p> </o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-size: 10pt; font-family: 'Courier New';">> Steve<o:p></o:p></span></div><div style="margin: 0in 0in 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;"><o:p> </o:p></div></div>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/rules-users</div></blockquote></div><br></body></html>