Re: [rules-users] Embedding Guvnor 6 Guided Editor
right. I am looking for the same too. The Guvnor documentation had notes on how to customize using the StandaloneEditor. The drools 6 documentation does not have any information on customization. An example on how to use the new workbench components to set up just the guided editor and invoke it via url would be helpful. Thanks G. Patel From: rjr201 rich.j.ri...@gmail.com To: rules-users@lists.jboss.org, Date: 02/10/2014 01:53 PM Subject:[rules-users] Embedding Guvnor 6 Guided Editor Sent by:rules-users-boun...@lists.jboss.org Hi, I'm looking to upgrade to the new kie workbench 6.. i really need to be able to embed the guided editor within my application. I've done this previously using the iframe approach. I can't seem to find any documentation on how to do this in the latest release. Sorry if i've overlooked any documentation on this. Any advice would be greatly appreciated.. Cheers. Rich. -- View this message in context: http://drools.46999.n3.nabble.com/Embedding-Guvnor-6-Guided-Editor-tp4028045.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Creati custom Ui for Drools
Is there any documentation or examples that show how to build a custom UI using the new 6.0 design? I looked in http://docs.jboss.org/drools/release/6.0.0.Beta5/drools-guvnor-docs/html_single/index.html but could not find any pointers. Thanks G. Patel From: Mark Proctor mproc...@codehaus.org To: Rules Users List rules-users@lists.jboss.org, Date: 08/05/2013 08:07 AM Subject:Re: [rules-users] Creati custom Ui for Drools Sent by:rules-users-boun...@lists.jboss.org The 6.x codebase has rewritten the web UI from scratch, with end user extensibility in mind. Each editor is separate maven module, with defined life cycles and hooks. You can simply copy one of those editors as a starting point, and recompile for your custom 6.x web UI. 6.x has lot of other improvements, such as GIT for a backend, instead of JCR. And simpler cluster setup for HA. If you need help, pop onto irc: http://www.jboss.org/drools/irc Mark On 5 Aug 2013, at 12:58, ashish6276 ashishkumarec...@gmail.com wrote: I am trying those things. Apart from this is there any way so that i can let guvnor communicate with my UI. Some way by which if user save the parameter in ui. It should be able to create drl in guvnor. -- View this message in context: http://drools.46999.n3.nabble.com/Creati-custom-Ui-for-Drools-tp4025311p4025333.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] DSL Enumerations
I wish the entire rule editing context (all the sentences and user entries) was made available to enumeration providers, then this would have been possible. - Original Message - From: rjr201 [rich.j.ri...@gmail.com] Sent: 01/22/2013 06:59 AM PST To: rules-users@lists.jboss.org Subject: Re: [rules-users] DSL Enumerations Ok. Thanks for letting me know. -- View this message in context: http://drools.46999.n3.nabble.com/DSL-Enumerations-tp4021696p4021727.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Custom Form with DSL
no, I dont think it is possible. I ended up writing my own custom editor that displays DSL statements. Thanks Ghanshyam From: bhochhi bhoc...@aol.com To: rules-users@lists.jboss.org, Date: 11/15/2012 11:11 AM Subject:Re: [rules-users] Custom Form with DSL Sent by:rules-users-boun...@lists.jboss.org Ghanshyam, Were you able to display the country list based on value selected on other variable? thanks -- View this message in context: http://drools.46999.n3.nabble.com/Custom-Form-with-DSL-tp4020207p4020846.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] How to get notified just before rule is picked up for evaluation
Is there a way to get a hook into just before a rule is evaluated to determine whether an activation is created ? The earliest hook available is DefaultAgendaEventListener. activationCreated(ActivationCreatedEvent event) What I am looking for is to get notified just before a rule is picked up for evaluation and just after it has been evaluated. Thanks Ghanshyam - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] DROOLs callback API for L-value predicate matching events
is there a place to go look at a detailed example? Thanks Ghanshyam From: Wolfgang Laun wolfgang.l...@gmail.com To: Rules Users List rules-users@lists.jboss.org, Date: 11/05/2012 05:19 AM Subject:Re: [rules-users] DROOLs callback API for L-value predicate matching events Sent by:rules-users-boun...@lists.jboss.org Learning the reason for failure to match is the title of a section in my boot camp you missed at this year's IntelliFest a couple of weeks ago. You are getting close to the solution, but here's the outline of the rule programming design pattern: Write one rule (high salience) to create an auxiliary fact (Aux), containing a reference to the fact under investigation (Crf) and a Set. Write one rule each, combining Aux and Crf, restricting the latter with one of the required property values/range. On the RHS, add an identification to the set component of Aux. DO NOT MODIFY/UPDATE. Write another rule (low salience) combining Aux and Crf and see what Aux contains in the Set. Retract Aux. -W On 05/11/2012, Cotton, Ben ben.cot...@morganstanley.com wrote: Could a solution be as simple as this? Is this approach to consuming LCHUS_IRS_CURRENCY_RULE L-value matching events sound/complete (and not-vulnerable to any race condition?). Is there any DROOLS EventListener callback API that would be more appropriate to solve the problem? E.g. I want to be able to log when each of these 5 L-value predicates either MATCHES or FAILS TO MATCH (at the time of the event) rule LCHUS_IRS_CURRENCY_RULE //XLS Item=195 when IRDCurrencyRuleFact( productType == IRS, currency==GBP, upfrontFeePaymentDate IRDCurrencyRuleFact.terminationDate, maturity = 18275, //unit = days, i.e. 50 Years notional = 99,999,999,999.99 //max Notional ) then System.out.println(LCHUS); end Again the objective is to be able to join a high-resolution logging capability wrt to which of the specific 5 L-value predicates matched. Instinctively, to this DROOLs newbie, this approach seems workable but not ideal rule LCHUS_IRS_CURRENCY_RULE_LVALUE_MATCHING_EVENT_1 when IRDCurrencyRuleFact(productType == IRS) then System.out.println(LCHUS_IRS_CURRENCY_RULE_L-value event 1 match); //log event L-value predicate 1 matched end rule LCHUS_IRS_CURRENCY_RULE_LVALUE_MATCHING_EVENT_2 when IRDCurrencyRuleFact(currency==GBP) then System.out.println(LCHUS_IRS_CURRENCY_RULE_L-value event 2 match); //log event L-value predicate 2 matched end rule LCHUS_IRS_CURRENCY_RULE_LVALUE_MATCHING_EVENT_3 when IRDCurrencyRuleFact(upfrontFeePaymentDate IRDCurrencyRuleFact.terminationDate) then System.out.println(LCHUS_IRS_CURRENCY_RULE_L-value event 3 match); //log event L-value predicate 3 matched end rule LCHUS_IRS_CURRENCY_RULE_LVALUE_MATCHING_EVENT_4 when IRDCurrencyRuleFact(maturity = 18275) then System.out.println(LCHUS_IRS_CURRENCY_RULE_L-value event 4 match); //log event L-value predicate 4 matched end rule LCHUS_IRS_CURRENCY_RULE_LVALUE_MATCHING_EVENT_5 when IRDCurrencyRuleFact(notional = 99,999,999,999.99) then System.out.println(LCHUS_IRS_CURRENCY_RULE_L-value event 5 match); //log event L-value predicate 5 matched end Ben D Cotton III Morgan Stanley Co. OTC Derivatives Clearing Technology 1221 AOTA Rockefeller Ctr - Flr 27 New York, NY 10020 (212)762.9094 ben.cot...@ms.commailto:ben.cot...@ms.com From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Cotton, Ben (ISGT) Sent: Saturday, November 03, 2012 8:24 AM To: rules-users@lists.jboss.org Cc: O'Brien, Patrick (ISGT) Subject: [rules-users] DROOLs callback API for L-value predicate matching events Hi, Can someone please point me to compelling examples/sample code of how to use a DROOLs callback API for very high-resolution logging of L-value predicate matching events? E.g. I want to be able to log when each of these 5 L-value predicates either MATCHES or FAILS TO MATCH (at the time of the event) rule LCHUS_IRS_CURRENCY_RULE //XLS Item=195 when IRDCurrencyRuleFact( productType == IRS, currency==GBP, upfrontFeePaymentDate IRDCurrencyRuleFact.terminationDate, maturity = 18275, //unit = days, i.e. 50 Years notional = 99,999,999,999.99 //max Notional ) then System.out.println(LCHUS); end Ben D Cotton III Morgan Stanley Co. OTC Derivatives Clearing Technology 1221 AOTA Rockefeller Ctr - Flr 27 New
Re: [rules-users] Custom Form with DSL
Is there a way to pass the editing context to the custom form? For example, in the rule below: [when] type of mineral is {mineralName:CF:Mineral.name}and country of mining is {countryName:CF:Country.name} If the mineral Quartz is selected, then the custom form displaying the country list should only display Quartz-producting countries. For this, the fact that mineral type Quartz was selected would need to be passed to the custom form. Is that possible? Thanks Ghanshyam From: Michael Anstis michael.ans...@gmail.com To: Rules Users List rules-users@lists.jboss.org, Date: 10/12/2012 12:57 AM Subject:Re: [rules-users] Custom Form with DSL Sent by:rules-users-boun...@lists.jboss.org This sounds as though it's a bug. Can you please create a JIRA (https://issues.jboss.org/browse/GUVNOR) and attach a repository export demonstrating the issue. Thanks, Mike On 11 October 2012 06:06, bhochhi bhoc...@aol.com wrote: I were able to launch the custom form in DSL, however the rule condition is not mapped to corresponding DRL. I don't know if this is a bug or just something is missing. my DSL mapping looks like this: [when] my dsl is {varName:CF:MyFactType.fieldName} = System.out.println({varName}) I have working set created then configured custom form for fieldName. All things working but rule is not validating. When I check drl source, I found the mapping is not taking place, its still displaying DSL expression in DRL source instead of displaying: System.out.println(values from cf) Any ideas? I have tried this in guvnor 5.4.0.final and 5.5.beta1 -- View this message in context: http://drools.46999.n3.nabble.com/Custom-Form-with-DSL-tp4020207.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Cutom Attributes in Drools
I would not store the result of the (missed) activation of a rule in a rule attribute, anyway. Can't you just use a dedicated fact(s) for that? I face a similar issue where the target audience are business users i.e users that dont really understanding or wish to get into logic. I am finding myself having to resort to all sorts of tricks (using categories/packages/standlone rule editor) to allow business users to easily specify which rules are for what purposes and when they should fire. I just cant rely on them using facts correctly to disable rules that should not fire. In fact, I am now down to using only the standalone editor and saving the rule xml in my tables (not guvnor) so that i have full control over itemized rule display, rule search, knowledgebase creation for different execution profiles, etc. Overall, I increasingly tend to think rules for business users is a myth. The business users wants rule-driven systems, yet they dont want to learn drools. And drools DSL just doesnt cut it. From: Davide Sottara dso...@gmail.com To: rules-users@lists.jboss.org, Date: 09/13/2012 01:57 AM Subject:Re: [rules-users] Cutom Attributes in Drools Sent by:rules-users-boun...@lists.jboss.org You can add any metadata using the format @name( value ) or @name( key=value ). You can then look them up using rule.getMetaData(). Please notice that there's a bug (solved by an open pull request) that does not let you write just @name. In order to use those attributes to control whether a rule fires or not, you can use the declarative agenda, i.e. add meta-rules to your knowledge base such as: rule Meta @activationListener('direct') when // assuming the attribute is @region( [value] ) $a : Activation( rule.metaData[ name ] != MyDesiredRegion, $objs : objects ) // any condition on the tuple here, if needed then drools.cancelActivation( $a ); end notice that you'll have to enable the corresponding option first: KnowledgeBaseConfiguration kconf = KnowledgeBaseFactory.newKnowledgeBaseConfiguration(); kconf.setOption( DeclarativeAgendaOption.ENABLED ); KnowledgeBase kb = KnowledgeBaseFactory.newKnowledgeBase( kconf ); If you want to have rules override each other, watch out for an upcoming feature, Defeasible logic. I would not store the result of the (missed) activation of a rule in a rule attribute, anyway. Can't you just use a dedicated fact(s) for that? Best Davide -- View this message in context: http://drools.46999.n3.nabble.com/Cutom-Attributes-in-Drools-tp4019692p4019736.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Is there a faster way of doing this in Drools ?
so you are using drools to build on-the-fly queries based on user input. You could probably do this via static rules. Since you basically have 4 variables (price, avg_user_rating, num_ratings, category), you could write 4 rules, one each that filters based on one of the 4 variables and then chain the execution through salience: rule price: salience 1 when $p: Product(price in param) then add $p to result rule avg_user_rating: salience 2 when $p: Product(avg_user_rating param) then add $p to result and so on From: soumya_sd soumya...@yahoo.com To: rules-users@lists.jboss.org, Date: 05/09/2012 08:43 AM Subject:Re: [rules-users] Is there a faster way of doing this in Drools ? Sent by:rules-users-boun...@lists.jboss.org Vincent Legendre wrote Users changing rules IS the correct use-case of drools (I would even say that if rules never change, drools is likely to be worse than pure java). What others said is changing the rules at each request by regenerating and recompiling is not. I can't imagine that users may change rules at each request, so you must have, at least for some time (thus a lot of requests), a stable rule base. What is costly is to compile rules, but you already know that. So the idea is to keep in some kind of cache the actual rules, and only recompile them when they change. The source of rules does not matter : you can generate the DRL according to your configuration, or make you users directly write rules (with guvnor, which will fits well if your rules are only basic filters). The optimisation you have to do is to keep your compiled rules somewhere (by serializing your KnowlegdePackages or simply keep it in a kind of map), and reuse it until your source change : you have to find a way to detect that rules (or the config that is used to generate them) have changed, and then recompile a new up-to-date KnowledgePackage. Thank you for your insights. At this point I'm designing for the worst case i.e., I'm assuming the rules with change with every request. Moreover, this can happen on a regular basis in the system I'm trying to design. Product { price ave_user_rating num_ratings category } User wants to see Product with with the following rules at t=t_1 : If product.category in {A,B}. at t=t_2 : If product.category in {A,B} AND price 100 at t=t_3 : If product.category in {A,B} AND price 100 AND num_ratings 100 You can imagine the user changing these rules in a span of less than a minute. I understand that Drools is designed for cases when rules changes often. But can it support something like the one I described above where rules are changing at a much faster rate? Thanks. -- View this message in context: http://drools.46999.n3.nabble.com/Is-there-a-faster-way-of-doing-this-in-Drools-tp3973888p3974483.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Query for a fact, and concurrent rule execution
I would suggest making your service stateless and run the service in multiple JVMs to alleviate performance concerns. You will be able to scale and also not have to worry about cramming everything into a StatefulKnowledgeSession and worry abt thead-safety. From: Stephen Lomax stephen.lo...@mattelli.com To: Rules Users List rules-users@lists.jboss.org, Date: 05/02/2012 04:28 AM Subject:Re: [rules-users] Query for a fact, and concurrent rule execution Sent by:rules-users-boun...@lists.jboss.org Hi Mike, Many thanks for that..we had previously thought of serialising to file but thought the purpose of the StatefulKnowledgeSession was to keep it live in memory continuously, rather than instantiating a new session with each web service call. My concern is that if we instantiate a new session with each web service call the memory required will increase massively (if we have many concurrent requests). Is there a way of serving multiple concurrent requests against the same session to remove that concern. Many thanks for your help with this..it is very much appreciated. Ste . On 2 May 2012, at 12:08, Michael Anstis wrote: That's a possibility, but it'd depend on your rules. As a thought, you could serialise the initialised StatelessKnowledgeSession into a byte[] (cached at application scope) and deserialise with each web-service call. I would wait to see if Mark Proctor, Edson Tirelli or community members have other thoughts on use of a single StatefulKnowledgeSession. IIRC it is meant to be thread-safe but think people have reported problems in the past. Recently: http://lists.jboss.org/pipermail/rules-dev/2012-February/003857.html With kind regards, Mike On 2 May 2012 11:58, Stephen Lomax stephen.lo...@mattelli.com wrote: Hi Mike, Each quote does not enrich the session, we were actively looking to remove the quote at the end of the session to prevent it growing as we were just comparing the quote to the core product attribute facts. What is the performance hit in launching a Stateful knowledge session with say 10,000 facts, would it make the web service call slow? Thanks very much for the help on the query also…we will look into that. Kind Regards Ste On 2 May 2012, at 11:31, Michael Anstis wrote: Does each quote validation exercise enrich the StatefulKnowledgeSession with other facts that could influence validation of other quotes? If not probably using a StatefulKnowledgeSession per HTTP request might be more simple (with the KnowledgeBase as an application scoped variable). Regarding retrieval of results, there are a couple of options that spring to mind:- Look at using a Global to collate results. Look at using a Query ( http://stackoverflow.com/questions/5872215/how-do-i-add-facts-to-working-memory-at-runtime-in-the-drools-drl-and-retrieve-t ) With kind regards, Mike On 2 May 2012 10:39, stelomax stephen.lo...@mattelli.com wrote: Hi, Please bear with me, I am relatively new to the world of Drools and have a question. I am hoping it will be a simple issue. First let me frame my planned implementation at a high level. I am hoping to use Drools as a real time service enabled quote validation tool. Facts representing products and attributes will be loaded into a stateful knowledge session upon boot (using a piece of Java that loads these as facts from our product DB). The front-end application will allow users to build up quotes consisting of quote lines that make references to these products. Once the quote is built they will press a Validate button. This will call a webservice that will: 1) Insert the quote details as facts into the knowledge session 2) Run a rule flow to validate the quote against the product facts 3) The rules will insert validation results as facts tagged against the quote 4) QUERY for the validation results 5) Retract the facts for the quote (inc validation results) 6) Send the validation results back as a response to the webservice call My first question is how to implement step 4 -- how to physically query for the validation results pertaining to that specific quote. Any help here would be greatly appreciated. My second question relates to concurrency. As this is a quote validation tool there will be multiple users validating quotes so we will get concurrent validation requests. What is the recommended manner of dealing with concurrent rule requests within a stateful knowledge session. If 2 people attempt to validate a different quote at the same time we will have two quotes within the knowledge session together with all of the product facts. Is drools capable of running two concurrent rule flows against the knowledge session, each referencing a different quote or would we need to instantiate 2 knowledge sessions, or even deal with the matter in a serial manner placing the 2nd quote validation flow on hold until the first completes? Any help/pointers would be great. I am hoping someone
Re: [rules-users] Rule definition introspection
Thanks Mark. Quite well understood. Thanks Wolfgang for the code snippet, much appreciated. The reason I need to know which facts the rule are using at runtime is to create an audit log and capture the values the facts had at the time of rule execution, so that an audit log can be created that showed exactly why certain rules fired and why some did not From: Mark Proctor mproc...@codehaus.org To: rules-users@lists.jboss.org Date: 02/17/2012 11:37 AM Subject:Re: [rules-users] Rule definition introspection Sent by:rules-users-boun...@lists.jboss.org On 17/02/2012 13:54, Wolfgang Laun wrote: Below is some code that indicates the general direction. Since it uses the unstable API, it may not work as well any more, it was good in 5.1.1 and it still works using 5.3.0 with straightforward patterns. Mark does not agree with me that it is a legitimate wish of Drools application development to inspect binary packages, e.g., for documentation purposes, and he refuses to have any of this in the stable API. Constant dripping wears away the stone. ;-) I've discussed with edson we will add top level attributes back in, and just deal with deprecating the methods when the time comes. So that that you can list the packages, get the rules, functions and type declarations for those packages. We will not be exposing internal rule constructs like patterns, constraints etc as public supported apis. Although others are welcome to document and use then, on the caveat that they understand they may change on any release. It's not that I don't think it's a legitimate request, I think it's perfectly valid. It's simply that we cannot be tied down to an internal model, we need to be free to change that. However users who code against those internal models will cry havoc if we change them, if the think they are public apis. Mark -W On 17/02/2012, Mark Proctormproc...@codehaus.org wrote: On 17/02/2012 05:37, gpa...@tsys.com wrote: I need it at rule definition time, or when the rule is saved. Could you point me to a starting place in the internal api ? take a look in drools-compiler and org.drools.lang.RuleParserTest. Mark Thanks G. Patel package whatever; import java.io.PrintStream; import java.util.Formatter; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import org.drools.KnowledgeBase; import org.drools.base.ClassObjectType; import org.drools.definition.KnowledgePackage; import org.drools.definitions.impl.KnowledgePackageImp; import org.drools.rule.Accumulate; import org.drools.rule.Collect; import org.drools.rule.EntryPoint; import org.drools.rule.EvalCondition; import org.drools.rule.Forall; import org.drools.rule.From; import org.drools.rule.GroupElement; import org.drools.rule.Pattern; import org.drools.rule.Rule; import org.drools.spi.ObjectType; public class RulesByClasses { private Formatter fmt; private String ruleName; private String packageName; private MapString,SetString class2rules; public RulesByClasses( PrintStream printStream ){ fmt = new Formatter( printStream ); } public RulesByClasses(){ this( System.out ); } private void register( String className ){ SetString ruleSet = class2rules.get( className ); if( ruleSet == null ){ ruleSet = new HashSetString(); class2rules.put( className, ruleSet ); } ruleSet.add( \ + ruleName + \ in + packageName ); } private void inspectCollect( Collect collect ){ inspectPattern( collect.getSourcePattern() ); inspectNestedElements( collect.getNestedElements() ); } private void inspectAccumulate( Accumulate accumulate ){ inspectNestedElements( accumulate.getNestedElements() ); } private void inspectFrom( From from ){ inspectNestedElements( from.getNestedElements() ); } private void inspectNestedElements( List? nested ){ for( Object o: nested ){ if( o instanceof Pattern ){ inspectPattern( (Pattern)o ); } else if( o instanceof GroupElement ){ inspectGroupElement( (GroupElement)o ); } else if( o instanceof Forall ){ inspectForall( (Forall)o ); } else if( o instanceof Collect ){ inspectCollect( (Collect)o ); } else if( o instanceof Accumulate ){ inspectAccumulate( (Accumulate)o ); } else if( o instanceof From ){ inspectFrom( (From)o ); } else if( o instanceof EntryPoint ){ //... } else { throw new IllegalStateException( unexpected CE + o.getClass() ); } } } private void inspectPattern( Pattern pattern ){ ObjectType objectType = pattern.getObjectType(); if( objectType instanceof ClassObjectType ){ ClassObjectType classObjectType = (ClassObjectType)objectType; register(
[rules-users] Rule definition introspection
Is it possible to self-introspect the rule definition? For example: when $redCar : Car(color == 'red') then System.out.println(a red car exists); Is it possible to know that the above rule uses the Car fact and the Car.color attribute? Thanks G. Patel - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Rule definition introspection
I need it at rule definition time, or when the rule is saved. Could you point me to a starting place in the internal api ? Thanks G. Patel From: Mark Proctor mproc...@codehaus.org To: rules-users@lists.jboss.org Date: 02/16/2012 10:06 PM Subject:Re: [rules-users] Rule definition introspection Sent by:rules-users-boun...@lists.jboss.org On 17/02/2012 01:11, gpa...@tsys.com wrote: Is it possible to self-introspect the rule definition? For example: when $redCar : Car(color == 'red') then System.out.println(a red car exists); Is it possible to know that the above rule uses the Car fact and the Car.color attribute? Yes, but you'll need to dig into internal apis. If you are doing this at runtime just start introspecting the rule object to get an idea of all the internal data structures. Mark Thanks G. Patel - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] How do I write a rule to detect a missing value in a group of facts?
Beautiful! How would a business user (non-programmer) write such a rule. The only way I can think of is create a dsl sentence for this specific condition - Original Message - From: Wolfgang Laun [wolfgang.l...@gmail.com] Sent: 02/09/2012 05:02 PM CET To: Rules Users List rules-users@lists.jboss.org Subject: Re: [rules-users] How do I write a rule to detect a missing value in a group of facts? Don't think procedurally, just write the *rule* for a missing post ;-) rule missing fence post when FencePost( $d: distanceFromStart ) FencePost( distanceFromStart == $d + 2*FencePost.GAP ) not FencePost( distanceFromStart == $d + FencePost.GAP ) then System.out.println( Missing: + ($d + FencePost.GAP) ); end -W On 9 February 2012 16:41, mikeg m...@thegoldners.com wrote: I need to write a rule to identify a missing element in a group of facts. For example, let us say I want to ensure that my fence has a fence post every 8 feet. My fact declaration is as follows: declare FencePost identifier : String distanceFromStart: Long end If I add the following facts into my session: FencePost(a, 0) FencePost(x, 8) FencePost(e, 24) I want a rule that will notify the user that there is a missing fence post between x and e. I've been looking into using collect into a TreeSet/TreeMap to get a collection sorted on the distanceFromStart, but I cannot figure out how to compare adjacent elements in the collection. Any ideas? -- View this message in context: http://drools.46999.n3.nabble.com/How-do-I-write-a-rule-to-detect-a-missing-value-in-a-group-of-facts-tp3729818p3729818.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Drools integration common practice
Unless the experts disagree, I don't think that is possible as is. Guvnor *is* the REST frontend for the drools repository. If you are not interested in the Guvnor UI and only seek to use the REST api, it should be possible to strip out the UI related pieces from the Guvnor war (web.xml, WEB-INF/lib, etc.), keep only the REST servlet and deploy a stripped down Guvnor war that fields only REST requests From: mike mike...@gmail.com To: Rules Users List rules-users@lists.jboss.org Date: 12/22/2011 10:55 AM Subject:Re: [rules-users] Drools integration common practice Sent by:rules-users-boun...@lists.jboss.org Since I have not received an answer let me make the question more specific. Is it possible to interact with Drools via a rest api without Guvnor? Thank you Mike On Mon, Dec 5, 2011 at 1:05 PM, ronalbury ronalb...@gmail.com wrote: I am a complete newbie, but have seen several things written about using Apache Camel for integration in situations similar to those you describe. -- View this message in context: http://drools.46999.n3.nabble.com/rules-users-Drools-integration-common-practice-tp3561614p3562110.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] GUVNOR-1731 and GUVNOR-1732
Any idea when GUVNOR-1731 and GUVNOR-1732 will be fixed? http://issues.jboss.org/browse/GUVNOR-1731 http://issues.jboss.org/browse/GUVNOR-1732 I would think at least 1732 is urgent; it is a feature that is supported in BRL but not supported in DSL Thanks Ghanshyam - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Repository import
Is it possible to push a repository import into a Guvnor instance? What I am looking for is the ability to stand up a Guvnor instance from predetermined artifacts, the artifacts being repository.xml (which contains packages, rules, working sets, etc.) and model jars. If I have a model jar and a repository.xml (that contains the rules that use the model jar), can I configure a Guvnor instance to use them? This would help automating QA/production deployments of updated model jars/rules. Thanks Ghanshyam - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Retrieving rule name in then clause
not from the rule, but you can use an agenda listener for the same From: Ronald Albury ronalb...@gmail.com To: rules-users@lists.jboss.org Date: 11/28/2011 02:58 PM Subject:[rules-users] Retrieving rule name in then clause Sent by:rules-users-boun...@lists.jboss.org Is there a simple way for me to be able to access the rule name in the 'then' clause? When rules fail I want to pass the rule name into my internal error handler. Thanks in advance___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Building our own UI for Drools
On hosted mode: I have the same requirement i.e hosted site with lots of external clients using the same site, it is indeed impractical to deploy a guvnor instance for each client. Overall, from what I have researched, there are two things available to segregate rules by external client: categories and packages, but I decided against using them to achieve client segregation. The approach I have arrived on is to launch the guvnor standalone editor from my website, store the brl in my tables (the standalone editor provides javascript hooks to allow retrieving the rule brl/drl once the rule has been written). Effectively, the only thing stored in the guvnor repository will be the model to enable rule authoring. Originally, I was planning on storing the rules in the guvnor repository and using the rest api to list rule packages (prefixed by clientId) in my site. Since I am able to retrieve the brl/drl anyways (via standalone editor javascript hook, or if that feature were not available, then vi! a rest call immediately after rule has been authored), I decided to store the brl/drl in my app db. Since the rules are stored in my tables, I will have full control over client segregation. I have done a mini-POC to prove that this will work and it seems like it will, unless an expert on this mailing list can point out showstoppers/potential flaws/shortcomings of this approach. Hope this helps others who are faced with similar situations. Thanks G. Patel - Original Message - From: Jervis Liu [j...@redhat.com] Sent: 11/16/2011 05:14 PM ZE8 To: rules-users@lists.jboss.org Subject: Re: [rules-users] Building our own UI for Drools On 2011/11/16 16:37, kapokfly wrote: Thanks for the information. Deploy multiple GUNVOR instances can't resolve our issue as we have thousands of companies as our customer, each company will share the common part of our applications and meantime they can customize objects/fields they have permission with, this will be terrible if we go with the separate/dedicate deployment and basically we think that will be not manageable... What we are looking for is, be able to share a common collection of ruleset and at the same time, be able to define their custom rules with their customization. At the moment, it is possible to achieve this by using role-based-authorization in Guvnor. I.e., you create some common packages that are designed to be shared by everyone. You assign package-readonly permissions to everyone so that they have read-only access to these common packages. You can also use Global Area to achieve same effect. Essentially Global area is a special package that can be shared by all packages. Then each user has package-admin permission for their own packages. The Workspace as I mentioned early will provide a more completely isolated environment for each user when multiple users are sharing one instance of Guvnor. However we dont have any concrete stories planned for this yet. Cheers, Jervis Ivan - Ivan, your Panda, forever -- View this message in context: http://drools.46999.n3.nabble.com/Building-our-own-UI-for-Drools-tp3508849p3512037.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Building our own UI for Drools
For #1 and #2, I am planning on using DSL that uses a separate model, built specifically for rule writing, that wraps around the actual application domain model. DSL sentences are not quite as user friendly, the rule writer has to pick from a huge list of DSL sentences as opposed to incremental condition phrase building available from the native rule editor, but there is no other way, short of building your own rule editor. The common rulesets, due to their very nature, I am not exposing to the clients for editing, they are internal. The KnowledgeBuilder api can load common rules (which could be in .drl files) in addition to guvnor rules. Thanks Ghanshyam From: kapokfly ivan.jiang...@foxmail.com To: rules-users@lists.jboss.org Date: 11/16/2011 08:16 AM Subject:Re: [rules-users] Building our own UI for Drools Sent by:rules-users-boun...@lists.jboss.org Hi GPatel, Maybe separate by package is something can be tried, but do you see the functionality of what Gunvor provided is good enough for your usage? For us it is still missing some necessary functions: given a condition, 'a = b', 1) we would like the 'b' part could be an expression/reference to another field, not only a value 2) we would like to be able to redefine the dot notation so it can refer to not only a property but also its meta data information so the meta data value can also be used as part of the rule 3) for existing none object graph traverse we also would like to register our own property resolver so it can load related objects into the proper context Also are you able to tweak the UI to comply with your own application's style? And does your object also share a common rulesets across different customers? How you design this part in your POC so any potential upgrade could be easier? Ivan - Ivan, your Panda, forever -- View this message in context: http://drools.46999.n3.nabble.com/Building-our-own-UI-for-Drools-tp3508849p3512962.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Where in DB does Guvnor store description of rules?
Take a look at the guvnor rest api - Original Message - From: Praveen [praveen.sa...@gmail.com] Sent: 11/08/2011 02:11 AM PST To: rules-users@lists.jboss.org Subject: [rules-users] Where in DB does Guvnor store description of rules? Hi, Our application expects rule name and its description to be displayed in the UI and both of these are to be retrieved from DB. We are aware that Guvnor stores rules in DB, not sure of the description part. If someone could throw light on how to get description/comments (that was entered through Guvnor) in UI would be great. Initially we had the idea of parsing comments in drl. However we saw that the description entered through Guvnor while writing a rule does not show up in the generated source code. TIA. Regards, Praveen. -- View this message in context: http://drools.46999.n3.nabble.com/Where-in-DB-does-Guvnor-store-description-of-rules-tp3489816p3489816.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Data Modeling for medical expert system
I am in the same situation (and I suspect a lot of people with complex domain models are), which is: how do I let the user easily navigate my domain model while writing a rule. There is support for providing a custom form within a popup when a fact constraint needs to be specified. You can present it to the user whenever a fact constraint needs to be supplied to the rule. Since you are providing the contents of the custom form, you can represent your domain however you wish to, navigate it perhaps using a tree, or even let the user perform a mini search to get to the MeSH category. The custom form does not currently work with DSLs though, if you are planning on using DSL sentences. But you can write your own DSL widget that does (not too difficult, if you know GWT). For my project, the biggest utility value of drools is the standalone editor, the Guvnor rest api and the fact that it is opensource (so that I can customize it for my very complex needs) Thanks G. Patel From: Bruno Freudensprung bruno.freudenspr...@temis.com To: Rules Users List rules-users@lists.jboss.org Date: 11/08/2011 10:49 AM Subject:Re: [rules-users] Data Modeling for medical expert system Sent by:rules-users-boun...@lists.jboss.org Hi Dirk, Good to see that I am not the only one fighting with that question :-). I guess the general answer is: it depends on how large your enums might grow. For instance if your application is eventually supposed to help diagnosing (say) all MeSH diseases based on all MeSH symptoms, then an approach where every symptom and disease is a Java class is not an option; this would lead to so many classes that I doubt Drools user interface will handle that, or will be useful anyway (drop-down lists with thousands of items). The opposite approach consists in creating a few root Java classes like (say) Disease and Symptom and to store the MeSH hierarchy into a name attribute. The obvious drawback of the approach is that when your end-users will have to write the rules, they will be left with problems like: when Symptom(name == well... what's the name of this MeSH category??) then Disease(name == hmmm... can't remember the exact name of the disease as normalized in MeSH...) end I've posted a message on this topic (subject: Thoughts about rule authoring) and Michael Anstis kindly suggested a technical answer. I am afraid it did not fit my needs, but it could fit yours :-). For the moment I have no solution (like an intermediate approach) to my problem: I am stuck with approach #2. I have the impression that my problem requires a very tight integration between my database (MeSH) and the Drools suggestion engine. If you have another approach, I would love to know it ;-). Best regards, Bruno. Le 08/11/2011 17:43, Dirk Conzelmann a écrit : Hi everybody, I am using Drools as a part of my Bachelor Thesis. My job is to build an expert system for medical diagnoses. My Question: Is there a best practice known in modeling a variable list of questions and answers in Drools? Up to now I modeled the list of questions implementing Java Classes and Enums for each question/answer pair. But to be able to change those options easyly I need a higher abstraction level than simple Java Classes and Enums. Could someone show me an example how to implement this? I hope I have explained my question understandable :) ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Guvnor custom form not working for DSL sentences
Here's the model: declare Vehicle engineType: String fuelType: String end Here's the DSL: [when]there is a vehicle=$vehicle : Vehicle() [when]- with engine type {value}=engineType=={value} [then]say hello=System.out.println(Hello); When I create a rule using the Guided Editor the usual way (without using DSL sentences), the custom form does pop up, as shown in attached file ss1.gif. When I create a rule using the DSL sentence (when there is a vehicle with engine type {value}), the value is the usual text field. Clicking on it does not invoke the custom form. Please see attached file ss-dsl.gif. Thanks G. Patel From: Michael Anstis michael.ans...@gmail.com To: Rules Users List rules-users@lists.jboss.org Date: 10/30/2011 03:04 PM Subject:Re: [rules-users] Guvnor custom form not working for DSL sentences Sent by:rules-users-boun...@lists.jboss.org Can you bit a little more descriptive? I am having trouble knowing exactly to what part of Guvnor you refer. sent on the move On 30 Oct 2011 21:52, gpa...@tsys.com wrote: Hi Is the guvnor custom form not meant for use with fact fields appearing in dsl sentences? It works fine with guided editor, not with dsl though. Using 5.3.CR1 Thanks G. Patel - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users attachment: ss1.GIFattachment: ss-dsl.gif___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Guvnor custom form not working for DSL sentences
Hi Is the guvnor custom form not meant for use with fact fields appearing in dsl sentences? It works fine with guided editor, not with dsl though. Using 5.3.CR1 Thanks G. Patel - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Guvnor data enumeration issue
created jira 3270 for this. Also created 3271 along the same lines. From: Michael Anstis michael.ans...@gmail.com To: Rules Users List rules-users@lists.jboss.org Date: 10/28/2011 12:07 AM Subject:Re: [rules-users] Guvnor data enumeration issue Sent by:rules-users-boun...@lists.jboss.org You'll need to raise a JIRA for an enhancement. Dependent enumerations are currently only designed to operate between enumerations. With kind regards, Mike 2011/10/28 gpa...@tsys.com I am trying to use data enumerations and running into a problem. Following the Vehicle engineType/fuelType data enumeration example in the Guvnor manual, I created the following enumeration list and it works: 'Vehicle.engineType' : (new test.VehicleHelper()).getEngineTypes() 'Vehicle.fuelType[engineType]' : '(new test.VehicleHelper()).getFuelTypes(@{engineType})' VehicleHelper: public class VehicleHelper { public ListString getEngineTypes(){ ListString engineTypes = new ArrayListString(); engineTypes.add(Petrol); engineTypes.add(Diesel); return engineTypes; } public ListString getFuelTypes(String engineType){ ListString fuelTypes = new ArrayListString(); if(Petrol.equalsIgnoreCase(engineType)){ fuelTypes.add(ULP); fuelTypes.add(PULP); } else if(Diesel.equalsIgnoreCase(engineType)){ fuelTypes.add(BIO); fuelTypes.add(NORMAL); } else{ fuelTypes.add(Default Fuel 1); fuelTypes.add(Default Fuel 2); } return fuelTypes; } } Above works as expected. Problem: I want to only have an enumeration on Vehicle.fuelType that depends on the value of engineType, without specifying an enumeration on engineType. So, I took out the first line in my enumeration list so that it is now: 'Vehicle.fuelType[engineType]' : '(new test.VehicleHelper()).getFuelTypes(@{engineType})' But that does not work. When I create a rule, VehicleHelper.getFuelTypes does not get called and the dropdown for fuelType is not a list. How do I get this working? Thanks G. Patel - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Guvnor data enumeration issue
I am trying to use data enumerations and running into a problem. Following the Vehicle engineType/fuelType data enumeration example in the Guvnor manual, I created the following enumeration list and it works: 'Vehicle.engineType' : (new test.VehicleHelper()).getEngineTypes() 'Vehicle.fuelType[engineType]' : '(new test.VehicleHelper()).getFuelTypes(@{engineType})' VehicleHelper: public class VehicleHelper { public ListString getEngineTypes(){ ListString engineTypes = new ArrayListString(); engineTypes.add(Petrol); engineTypes.add(Diesel); return engineTypes; } public ListString getFuelTypes(String engineType){ ListString fuelTypes = new ArrayListString(); if(Petrol.equalsIgnoreCase(engineType)){ fuelTypes.add(ULP); fuelTypes.add(PULP); } else if(Diesel.equalsIgnoreCase(engineType)){ fuelTypes.add(BIO); fuelTypes.add(NORMAL); } else{ fuelTypes.add(Default Fuel 1); fuelTypes.add(Default Fuel 2); } return fuelTypes; } } Above works as expected. Problem: I want to only have an enumeration on Vehicle.fuelType that depends on the value of engineType, without specifying an enumeration on engineType. So, I took out the first line in my enumeration list so that it is now: 'Vehicle.fuelType[engineType]' : '(new test.VehicleHelper()).getFuelTypes(@{engineType})' But that does not work. When I create a rule, VehicleHelper.getFuelTypes does not get called and the dropdown for fuelType is not a list. How do I get this working? Thanks G. Patel - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Preventing re-evaluation on modification of 'output' fact
Define FraudResultsDTO as a global. That way, you don't have to specify it in the WHEN part merely for assigning a variable to it - Original Message - From: Jamie [js...@llbean.com] Sent: 10/26/2011 09:24 AM MST To: rules-users@lists.jboss.org Subject: [rules-users] Preventing re-evaluation on modification of 'output' fact We're building a fraud detection application that uses rules to analyze orders and the buyers and recipients on those orders. As rules fire, they modify an 'output' fact, which is an object whose only intent is to record the results as rules fire. It's not used in the LHS of any rules other than to get a handle to it, e.g.: rule Rule 001 - Operator Flagged enabled (FraudRuleEvaluationHelper.isRuleEnabled(Rule 001 - Operator Flagged)) ruleflow-group orderAnalysis lock-on-active when $order: OrderFact(operatorFlagged==true) $results: FraudResultsDTO() then modify($results) { addOrderSuspectReason(O) }; FraudRuleConsequenceHelper.logRuleFiring($order.getOrderId(), 001); end We're finding that as the number of facts increases, the processing team increases dramatically and I'm wondering if modifying the output fact the way we do causes the rules to get re-evaluated to see if any activations should be created or cancelled. Would removing the modify block help anything? Should we be thinking about this in some other way? -- View this message in context: http://drools.46999.n3.nabble.com/Preventing-re-evaluation-on-modification-of-output-fact-tp3455022p3455022.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Printing rule content when a rule is fired
Is is possible to get textual rule content from org.drools.definition.rule.Rule? What I am looking to do is get the rule definition (the when/then part) when a rule fires (i.e on AfterActivationFiredEvent) Thanks G. Patel - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Printing rule content when a rule is fired
I wish the Rule definition gave more detail than just a rule name, package name and metadata, or there was some way through the KBase api to get to it. Seems like I will need the to fetch the rule content from guvnor via REST (via some sort of timestamp versioning of my own) Thanks G. Patel From: Mauricio Salatino sala...@gmail.com To: Rules Users List rules-users@lists.jboss.org Date: 10/24/2011 01:24 PM Subject:Re: [rules-users] Printing rule content when a rule is fired Sent by:rules-users-boun...@lists.jboss.org If you can get the name from the AfterActivationFiredEvent, you can search in the DRL file for that content right? I don't know if there is a way to get the content from the knowledge base, because as far as I know the knowledge base don't save the DRL file inside it, it just get the LHS of the rules to build the RETE tree. Cheers 2011/10/24 gpa...@tsys.com Is is possible to get textual rule content from org.drools.definition.rule.Rule? What I am looking to do is get the rule definition (the when/then part) when a rule fires (i.e on AfterActivationFiredEvent) Thanks G. Patel - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users -- - CTO @ http://www.plugtree.com - MyJourney @ http://salaboy.wordpress.com - Co-Founder @ http://www.jugargentina.org - Co-Founder @ http://www.jbug.com.ar - Salatino Salaboy Mauricio - ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Rule content keyword search
Is it possible to perform keyword search within rule content? For example: show me all rules that contain the word person. Thanks G. Patel - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Guvnor - Loading enums programatically using rule metadata
I suppose I can use the standaloneEditor, add my data loader arguments to the URL, have a filter on the serverside set up a thread-local context that contains the arguments and have the data loaders use that context. How do I disable enum caching so that the above approach works? From: Ghanshyam Patel/Tempe/TotalSystem To: rules-users@lists.jboss.org Date: 10/11/2011 05:05 PM Subject:Re: Guvnor - Loading enums programatically using rule metadata I realize that drools is a runtime variable, available only during rule execution, but the question still stands. Is it possible to somehow pass in rule attributes as arguments to Data loaders for enums? Any help would be appreciated Thanks G. Patel From: Ghanshyam Patel/Tempe/TotalSystem To: rules-users@lists.jboss.org Date: 10/10/2011 03:35 PM Subject:Guvnor - Loading enums programatically using rule metadata The Guvnor manual specifies how to load enum data programtically but it seems like only other fields on the same Fact can be used to filter the values that can show up in the drop-down fields, as shown below: 'Fact.field[dependentField1, dependentField2]' : '(new com.yourco.DataHelper()).getListOfAges(@{dependentField1}, @{dependentField2})' Is it possible to somehow use other rule attributes, like package name or rule metadata to filter the list? Something like the following: 'Fact.field[dependentField1]' : '(new com.yourco.DataHelper()).getListOfAges(@{dependentField1}, drools.getRule().getMetaData().get(ID))' Thanks G. Patel - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Guvnor - Loading enums programatically using rule metadata
I realize that drools is a runtime variable, available only during rule execution, but the question still stands. Is it possible to somehow pass in rule attributes as arguments to Data loaders for enums? Any help would be appreciated Thanks G. Patel From: Ghanshyam Patel/Tempe/TotalSystem To: rules-users@lists.jboss.org Date: 10/10/2011 03:35 PM Subject:Guvnor - Loading enums programatically using rule metadata The Guvnor manual specifies how to load enum data programtically but it seems like only other fields on the same Fact can be used to filter the values that can show up in the drop-down fields, as shown below: 'Fact.field[dependentField1, dependentField2]' : '(new com.yourco.DataHelper()).getListOfAges(@{dependentField1}, @{dependentField2})' Is it possible to somehow use other rule attributes, like package name or rule metadata to filter the list? Something like the following: 'Fact.field[dependentField1]' : '(new com.yourco.DataHelper()).getListOfAges(@{dependentField1}, drools.getRule().getMetaData().get(ID))' Thanks G. Patel - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Guvnor - Loading enums programatically using rule metadata
The Guvnor manual specifies how to load enum data programtically but it seems like only other fields on the same Fact can be used to filter the values that can show up in the drop-down fields, as shown below: 'Fact.field[dependentField1, dependentField2]' : '(new com.yourco.DataHelper()).getListOfAges(@{dependentField1}, @{dependentField2})' Is it possible to somehow use other rule attributes, like package name or rule metadata to filter the list? Something like the following: 'Fact.field[dependentField1]' : '(new com.yourco.DataHelper()).getListOfAges(@{dependentField1}, drools.getRule().getMetaData().get(ID))' Thanks G. Patel - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Integration Of Guvnor with CustomApp
yes, I believe this should help a lot in integration. Are there going to be helper utilities available to unmarshal the atom, json, etc responses back to client-side java objects? Thanks Ghanshyam From: Jervis Liu j...@redhat.com To: Rules Users List rules-users@lists.jboss.org Cc: rules-users-boun...@lists.jboss.org Date: 12/26/2010 11:50 PM Subject:Re: [rules-users] Integration Of Guvnor with CustomApp Sent by:rules-users-boun...@lists.jboss.org gpa...@tsys.com wrote: Esteban I too am trying to integrate the Rule editing widget into my web page. I followed your writeup, very helpful indeed. What is missing though is a handy method to get all rules under a category. In my app (and I suspect in most cases where people are trying to embed the asset editor), we only want to retrieve those rules that belong to the category that the web user has access to. There seems to be no way of doing this in the REST API or the service classes built on top of RulesRepository. Hi Ghanshyam, Once the new JAX-RS based REST interface is in place (its not there yet, but will come in soon), you can use following ways to retrieve rules under a category. For example: A HTTP GET request to URL http://host:portnumber/repository/categories with Accept=application/atom+xml returns a list of categories in the repository in Atom Feed format. A HTTP GET request to URL http://host:portnumber/repository/categories/testCategory1/assets with Accept=application/atom+xml returns a list of assets under the testCategory1 in the repository in Atom feed format. A GET request to http://host:portnumber/repository/categories/testCategory1/assets/testAsset1 with Accept=application/atom+xml returns an atom entry which is a summary info of that asset as well as its meta data. A GET request to http://host:portnumber/repository/categories/testCategory1/assets/testAsset1 with Accept=application/octet-stream returns a binary attachment (if that asset has a binary attachment as content). A GET request to http://host:portnumber/repository/packages/testPackage1/assets/testAsset1 with Accept=application/source returns the asset source in text format (if that asset has a content in text format). A GET request to http://host:portnumber/repository/packages/testPackage1/assets/testAsset1 with Accept=application/json returns a json object which is the summary info of that asset as well as its meta data. Will this meet your requirement? Thanks, Jervis Thanks Ghanshyam From:Esteban Aliverti esteban.alive...@gmail.com To:Rules Users List rules-users@lists.jboss.org Date:12/23/2010 09:54 AM Subject:Re: [rules-users] Integration Of Guvnor with CustomApp Sent by:rules-users-boun...@lists.jboss.org Andrew Waterman and Jervis Liu were working on a REST API for Guvnor: _https://issues.jboss.org/browse/GUVNOR-1080_ Maybe you can help them. In the other hand, I have implemented a way to embedd Guvnor's editors in external applications: _http://ilesteban.wordpress.com/2010/11/23/guvnor-embed-assets-editor-in-your-application/_ Best Regards, Esteban Aliverti - Developer @ _http://www.plugtree.com _ http://www.plugtree.com/ - Blog @ _http://ilesteban.wordpress.com_ http://ilesteban.wordpress.com/ 2010/12/23 Harshit Bapna _hrba...@gmail.com_ mailto:hrba...@gmail.com Hello All, I am able to successfully integrate Guvnor into my custom app. (based on spring) (_http://drools-java-rules-engine.46999.n3.nabble.com/How-to-integrate-Guvnor-GUI-in-a-test-app-td1595617.html_) I have written some code in the index.jsp which invokes the ServiceImplementation of Guvnor. I am observing that RuleRepository object is coming as null. Note: Through the integrated app If I hit the Guvnor URL than it is working as normal. private ServiceImplementation getService() { ServiceImplementation impl = new ServiceImplementation(); RulesRepository repository = impl.getRulesRepository(); return impl; } What is the suggested way of using the Guvnor services from the jsp/java ? ___ rules-users mailing list_ __rules-us...@lists.jboss.org_ mailto:rules-users@lists.jboss.org_ __https://lists.jboss.org/mailman/listinfo/rules-users_ ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for
[rules-users] Setting rule properties via guvnor
Is there a way to set the rule-flow group of a rule via the guvnor UI? Thanks GP - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Integration Of Guvnor with CustomApp
Esteban I too am trying to integrate the Rule editing widget into my web page. I followed your writeup, very helpful indeed. What is missing though is a handy method to get all rules under a category. In my app (and I suspect in most cases where people are trying to embed the asset editor), we only want to retrieve those rules that belong to the category that the web user has access to. There seems to be no way of doing this in the REST API or the service classes built on top of RulesRepository. Thanks Ghanshyam From: Esteban Aliverti esteban.alive...@gmail.com To: Rules Users List rules-users@lists.jboss.org Date: 12/23/2010 09:54 AM Subject:Re: [rules-users] Integration Of Guvnor with CustomApp Sent by:rules-users-boun...@lists.jboss.org Andrew Waterman and Jervis Liu were working on a REST API for Guvnor: https://issues.jboss.org/browse/GUVNOR-1080 Maybe you can help them. In the other hand, I have implemented a way to embedd Guvnor's editors in external applications: http://ilesteban.wordpress.com/2010/11/23/guvnor-embed-assets-editor-in-your-application/ Best Regards, Esteban Aliverti - Developer @ http://www.plugtree.com - Blog @ http://ilesteban.wordpress.com 2010/12/23 Harshit Bapna hrba...@gmail.com Hello All, I am able to successfully integrate Guvnor into my custom app. (based on spring) ( http://drools-java-rules-engine.46999.n3.nabble.com/How-to-integrate-Guvnor-GUI-in-a-test-app-td1595617.html ) I have written some code in the index.jsp which invokes the ServiceImplementation of Guvnor. I am observing that RuleRepository object is coming as null. Note: Through the integrated app If I hit the Guvnor URL than it is working as normal. private ServiceImplementation getService() { ServiceImplementation impl = new ServiceImplementation(); RulesRepository repository = impl.getRulesRepository(); return impl; } What is the suggested way of using the Guvnor services from the jsp/java ? ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Upload an existing .drl for the Guvnor dynamically
Is it possible to retrieve all rules within a category via the Rest API (or some other means) ? Thanks gpatel From: Andrew Waterman awate...@ecosur.mx To: Rules Users List rules-users@lists.jboss.org Date: 12/21/2010 12:12 PM Subject:Re: [rules-users] Upload an existing .drl for the Guvnor dynamically Sent by:rules-users-boun...@lists.jboss.org Hi Dirk, You could also try using the existing remote API with Guvnor to push up new content to the server. Try: 1. GET http://servername:port//org.drools.guvnor.Guvnor/api/packages/{packageName} To pull the list of assets from the Guvnor API for a specific package. 2. You can POST a DRL using the existing rest api like so. A) Create a post request to http://servername:port//org.drools.guvnor.Guvnor/api/packages/{YourPackageName}/{YourAssetName} e.g., POST h ttp://servername:port//org.drools.guvnor.Guvnor/api/packages/{YourPackageName}/{YourAssetName} B) Append your file data to the POST request as part of the request (as you would with a POST'ed file upload). REST based calls are handled through two classes: org.drools.guvnor.server.filesRestAPIServlet (in the drools-guvnor module) and org.drools.repository.remoteapi.RestAPI (in the drools-repository module). 3. PUT calls handle updates to existing resources on the server, in a similar way, with DELETE allowing removal of resources. 4. In terms of WebDAV, JCR also has a nice WEBDAV client implementation available that extends Apache's httpclient, but with some WEBDAV specific support built in. The RestAPI class in Drools-Repository has some very good detail on how this process works, and I'd suggest looking there if you have questions (on the REST API side). There is some discussion about REST, as well, currently on the dev mailing list if you search Nabble. A few ideas, Andrew On Dec 17, 2010, at 8:08 AM, dhermanns wrote: Hi! I would like to accomplish the same thing. Is there really no programmatic way to do this? I noticed that the files are uploaded through the eclipse-plugin using webdav. Is it documented what has to be done in order to install/update a drl using webdav? Thx, Dirk -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Upload-an-existing-drl-for-the-Guvnor-dynamically-tp721148p2104873.html Sent from the Drools - User mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Rule project referencing
Hello I am looking for a comparable feature in drools that works similar to rule project inheritance in ILOG JRules. In JRules, one can define a rule project A that contains all the base-level rules. Then, a new rule project B can be defined that references rule project A. This automatically makes all the rules defined in rule project A available in project B. One can then add to that set of rules by defining new rules in project B or override specific rules in project A. This feature is very handy for setting up client-specific rules. You can start out with a vanilla set of rules specified in project A. If a particular client wants additional rules (or wants to override the default functionality), a new rule project B can be created for that client that references project A and has the additional rules. No need to copy-paste all the rules from A to B. That way, if a rule is fixed in A, all referencing child projects instantly benefit from the update. Is there a similar feature in drools or a way to achieve the same functionality? Thanks gpatel - The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users