Re: [rules-users] Fwd: Re: make the Guvnor interface into French
by Qchevalier
Thank you for your answer.
No, I didn't tag the corrections. I will do the fork.
Your link<https://hudson.jboss.org/hudson/job/droolsjbpm-knowledge/lastSuccessfulBu...>doesn't
work, I got this :
HTTP Status 404 -
------------------------------
*type* Status report
*message*
*description* *The requested resource () is not available.*
------------------------------
JBoss Web/2.1.12.GA-patch-03
*Sorry for the delay :), **I was in holidays **.
Regards,
Quenitn
*
2012/4/7 Vincent Legendre [via Drools] <
ml-node+s46999n3892685h2(a)n3.nabble.com>
> This is exactly what I did. This procedure works like a charm.
>
> You said "a lot" of errors ? I can't be possible :) !!
> Did you tag your corrections ? the NWELL ?
>
>
> -------- Message original --------
> Sujet: Re: [rules-users] make the Guvnor interface into French Date : Fri,
> 6 Apr 2012 21:27:47 +0100 De : Michael Anstis [hidden email]<http://user/SendEmail.jtp?type=node&node=3892685&i=0> Répondre
> à : Rules Users List [hidden email]<http://user/SendEmail.jtp?type=node&node=3892685&i=1> Pour :
> Rules Users List [hidden email]<http://user/SendEmail.jtp?type=node&node=3892685&i=2>
>
>
> Hi Quentin,
>
> The droolsjbom-build-bootstrap\README.md is a good source (and kept up to
> date).
>
> The simplest (and preferred) approach might be to fork the github
> repository, apply your changes and submit a pull request.
>
> Please see here<https://hudson.jboss.org/hudson/job/droolsjbpm-knowledge/lastSuccessfulBu...>for more information.
>
> With kind regards,
>
> Mike
>
>
> On 6 April 2012 10:53, Qchevalier <[hidden email]<http://user/SendEmail.jtp?type=node&node=3892685&i=3>
> > wrote:
>
>> Hello,
>>
>> I got your last file (Constants_fr_FR.properties) Vincent, but I found a
>> lot
>> of errors. So here is my corrected file :
>> http://drools.46999.n3.nabble.com/file/n3889908/Constants_fr_FR.properties
>> Constants_fr_FR.properties
>>
>> I didn't manage to integrate this file into the guvnor war file.
>>
>> I understood that I have to rebuild the sources of guvnor, but I didn't
>> manage to do it. I found several documentations about "how to build guvnor
>> sources" but each time it was either old instructions, either partial
>> instructions.
>>
>> Can you share a good instruction source?
>>
>> Thanks & Regards,
>>
>> Quentin
>>
>>
>> --
>> View this message in context:
>> http://drools.46999.n3.nabble.com/rules-users-make-the-Guvnor-interface-i...
>> Sent from the Drools: User forum mailing list archive at Nabble.com.
>> _______________________________________________
>> rules-users mailing list
>> [hidden email] <http://user/SendEmail.jtp?type=node&node=3892685&i=4>
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>
>
>
> _______________________________________________
> rules-users mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=3892685&i=5>
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://drools.46999.n3.nabble.com/rules-users-make-the-Guvnor-interface-i...
> To unsubscribe from [rules-users] make the Guvnor interface into French, click
> here<http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscr...>
> .
> NAML<http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=macro_vi...>
>
--
View this message in context: http://drools.46999.n3.nabble.com/Re-rules-users-Fwd-Re-make-the-Guvnor-i...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 11 months
Exception when building a template
by Sean Su
I am using 5.4.0.CR1 to build a template (decision table) but regardless
what I do, I will get this exception from the first column.
Are we aware of any known issues in this build? Or the way I am using the
tool is wrong? I can provide the repository if it helps.
Thanks
Sean
ERROR 19-04 15:25:31,518 (LoggingHelper.java:error:74) Unable to build
asset.
java.lang.IllegalArgumentException: value Lower Range is not a valid column
definition
at
org.drools.template.parser.ColumnFactory.getColumn(ColumnFactory.java:34)
at
org.drools.template.parser.DefaultTemplateContainer.parseTemplate(DefaultTemplateContainer.java:93)
at
org.drools.template.parser.DefaultTemplateContainer.<init>(DefaultTemplateContainer.java:47)
at
org.drools.template.DataProviderCompiler.compile(DataProviderCompiler.java:56)
at
org.drools.guvnor.server.util.BRDRTPersistence.marshal(BRDRTPersistence.java:57)
at
org.drools.guvnor.server.contenthandler.drools.BRLContentHandler.getSourceDRL(BRLContentHandler.java:84)
at
org.drools.guvnor.server.contenthandler.drools.BRLContentHandler.compile(BRLContentHandler.java:61)
at
org.drools.guvnor.server.builder.PackageAssemblerBase.compile(PackageAssemblerBase.java:88)
at
org.drools.guvnor.server.builder.PackageAssemblerBase.buildAsset(PackageAssemblerBase.java:72)
at
org.drools.guvnor.server.builder.AssetItemValidator$BuilderValidator.validate(AssetItemValidator.java:57)
at
org.drools.guvnor.server.builder.AssetItemValidator.validate(AssetItemValidator.java:44)
at
org.drools.guvnor.server.RepositoryAssetOperations.validateAsset(RepositoryAssetOperations.java:142)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.jboss.weld.bean.proxy.AbstractBeanInstance.invoke(AbstractBeanInstance.java:44)
at
org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:105)
at
org.drools.guvnor.server.RepositoryAssetOperations$Proxy$_$$_WeldClientProxy.validateAsset(RepositoryAssetOperations$Proxy$_$$_WeldClientProxy.java)
at
org.drools.guvnor.server.RepositoryAssetService.validateAsset(RepositoryAssetService.java:338)
at
org.drools.guvnor.server.RepositoryAssetService$Proxy$_$$_WeldClientProxy.validateAsset(RepositoryAssetService$Proxy$_$$_WeldClientProxy.java)
at
org.drools.guvnor.server.RepositoryServiceServlet.validateAsset(RepositoryServiceServlet.java:388)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
at
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
--
"But beware of the Dark Side. Anger, fear, aggression - the Dark Side of
the Force are they." -Yoda
13 years, 12 months
Re: [rules-users] Rules and Ruleflow GroupS
by Welsh, Armand
You understand the problem well enough.
I have never used agenda-group option, and am very fuzzy on how to implement it. I know I should look into it, and I should understand it better, to have a better grasp of all the options available to me. The drools expert documentation just isn't too clear on this feature, and I haven't had the time to explore it in code yet.
Thanks for your input, it's always good to hear other's opinions.
Armand
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Vincent LEGENDRE
Sent: Monday, April 23, 2012 10:52 AM
To: Rules Users List
Subject: Re: [rules-users] Rules and Ruleflow GroupS
Tell me if I understand well :
- you have a set of "lookup" rules that are independent of initial data in the WM
- you have another set of "lookup" rules that depends of data currently in the WM, that should trigger in the middle of data processing. In this second group, some business rules can update a fact that should immediately lead to insertion of other object via the lookup rules ?
Clearly, the second is the problematic one if it must be immediate ... If you can delay the insertion, I can't see why you can't place them in a separate ruleflow group (and the ruleflow-group identifier is reused in multiple main ruleflows ...)
May be you can use agenda groups here. All the 'same function' lookup rules could be placed in the same agenda-group, with auto-focus to true. And you then have to add some control rules that give focus to you data-lookup group when you need. This is one way I know that allow to trigger a group of rules in the middle of other rules execution. The other way is control facts ... In summary, you have the choice between adding control fact in each condition, or set an agenda-group and auto-focus on each rule + a main control rule. I prefer the agenda-group option because once the control rule done, you can add rules to the group by declaring its group whether that adding a condition (which should be reserved to business logic in a ideal system).
----- Mail original -----
De: "Armand Welsh" <AWelsh(a)statestreet.com>
À: "Rules Users List" <rules-users(a)lists.jboss.org>
Envoyé: Lundi 23 Avril 2012 19:03:17
Objet: Re: [rules-users] Rules and Ruleflow GroupS
Thanks for the feedback
Yeah.. my rules deal with data transformation. We convert vendor feed data to internal data for making trade decisions. So we have large data sets that need to be evaluated. So instead of inserting all data into working memory from our lookup tables in our DB, I have lookup rules that get just the data needed for the datasets. These rules insert just those lookup facts that are needed for the rules. Since many rules can share a common lookup criteria, I don't lookup use the from condition on each rule, instead I use the from condition on the lookup rule, that extracts the facts I need and inserts just those facts into working memory. The reason for this, is that inserting into working memory is a costly process. So inserting 100 facts is less intensive than inserting 10,000 facts, when I only need 100 for that specific set of data.
Most lookups can happen before any processing, because the bound conditions are set before execution, and they don't change. However, I have a small set of lookups that occur more than once, because they are based on fields that are generated by other rules, and each time the value changes, I need to the lookup to be reactivated, but I could benefit from having my lookup rules in their own rule flow group, and a small subset of those also in the data manipulation rule flow group, so that they get preloaded before any data processing decisions are made, and then they re-fire during data processing the dependent facts change.
I guess I will just have to use a processing control fact to prevent firing my lookup rules until I know the lookup has either completed, or failed to find lookup values.
Regards,
Armand
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Vincent LEGENDRE
Sent: Monday, April 23, 2012 9:26 AM
To: Rules Users List
Subject: Re: [rules-users] Rules and Ruleflow GroupS
No you can't ... or I really don't know how ..
You can duplicate a ruleflow group in a ruleflow (if your rule is only dependant of others rules in the same "group"), but if a rule is a subpart of multiple groups ... well ... I think you can't avoid to write your own agenda filter, or try to use agenda groups.
----- Mail original -----
De: "Armand Welsh" <AWelsh(a)statestreet.com>
À: "Rules Users List" <rules-users(a)lists.jboss.org>
Envoyé: Lundi 23 Avril 2012 17:59:24
Objet: [rules-users] Rules and Ruleflow GroupS
A while back, I was looking to use Ruleflow-Groups and a process flow. Due to some issues in the code that affected the use of the process flow, I was unable to use them. I believe those issues have been worked out, and now I am looking into using them again.
One thing I am not clear on, is if I can have a single rule participate in more than one ruleflow group?
Regards,
Armand
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
13 years, 12 months
Nested class, BRL and Java (error)
by TonyN
Hi,
I have nested classes in the domain model and I imported these nested
classes in order to use them in the guided editor. Things are ok except
when one of the rule required a custom java function, then I would get an
error at 'build' package time (the error is 'not able to resolve
TcItem$Dataset'). I think the compiler didn't like the '$' in the list of
imported statements. But if I don't import these nested classes, I won't be
able to use them in the guided editor.
I am new to Drools so I think there must be a way to be able to use nested
class (w/ '$') and custom java functions together.
Please advise.
I am using Guvnor 5.2 final.
Thanks.
--
View this message in context: http://drools.46999.n3.nabble.com/Nested-class-BRL-and-Java-error-tp39324...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 12 months
Rules and Ruleflow GroupS
by Welsh, Armand
A while back, I was looking to use Ruleflow-Groups and a process flow. Due to some issues in the code that affected the use of the process flow, I was unable to use them. I believe those issues have been worked out, and now I am looking into using them again.
One thing I am not clear on, is if I can have a single rule participate in more than one ruleflow group?
Regards,
Armand
13 years, 12 months
setting global variables in session : the Command interface VS the RuleContext. What is the difference ?
by bardelman
hi ,
i m new in drools, i m reading the Drools-JBoss-Rules-5.0-Developers-Guide
book in which i found a validation rule example on its chapter 3. In this
exemple, global variables were set into the session with two methods shown
in this code :
...
session = knowledgeBase.newStatelessKnowledgeSession();
session.setGlobal("reportFactory", reportFactory);
session.setGlobal("inquiryService", inquiryService);
...
and these variables qualified as immutables, were called from the
RuleContext
public static void error(RuleContext drools,
Object... context) {
KnowledgeRuntime knowledgeRuntime = drools
.getKnowledgeRuntime();
ValidationReport validationReport = (ValidationReport)
knowledgeRuntime.getGlobal("validationReport");
ReportFactory reportFactory = (ReportFactory)
knowledgeRuntime.getGlobal("reportFactory");
...
and for other variables(or facts ) the Command interface was used instead :
List<Command> commands = new ArrayList<Command>();
commands.add(CommandFactory.newSetGlobal(
"validationReport", report));
commands.add(CommandFactory
.newInsertElements(getFacts(customer)));
session.execute(CommandFactory
.newBatchExecution(commands));
i m looking for accuracy in understanding when and which to use each method.
thanks for help
--
View this message in context: http://drools.46999.n3.nabble.com/setting-global-variables-in-session-the...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 12 months
Performace Issues drools
by sanal
Hi,
Iam trying to use Drools for implementing some of the business logic
in hospital billing senario.My senario is as given.Iam implementing the
concept of a packge. A package is a set of services or items are put
together based on some contions. Only the packge is to be charged not the
individal services or items in the package.
Eg: A Health Package is defined with name ExecutiveHealthCheckUp, which
have a condition say,quntity limit 2 for Laboratory tests.So if more than 2
test is ordered for a patient the 3rd ordered test should not be part of
package.
A ordered service is considered to be part of a package if the
packageChargeRecordId property of the service
Using Drools iam trying to find out each of the ordered services(
$orderedComponent) for the patient to be part of package or not. Each of
the ordered service have quntity field.So i need to sum the quntity field of
same services ordered multiple times which is already part of the same
package and compare it with the quntity limit defined in the package
definition.
If a service is part of package iam setting packageChargeRecordId property
of ordered service to the packageId.
For implementing the same i have 2 set of collecton.
1st collection has got list of ordered services for the
patient.($objOrderedComponents.getOrderedComponentList() )
2nd collection list of condition for the services to be part of package.
($packageDefinition.getPackageComponentList())
rule "Package Rate_21"
salience 65515
when
/*package defanition object */
$packageDefinition:PackageDefinition($packageId:packageId)
/*Gets the list of services ordered */
$orderedComponent:OrderedComponent($id1:componentKey,$qty:componentQty)
from $objOrderedComponents.getOrderedComponentList() and
/*trying to get the accumulated quantity for the services
which are already part of package */
$accumulatedQty:Number()
from accumulate (
$accQtyComponent:OrderedComponent(packageChargeRecordId==$packageId,componentKey==$id1,
$AccQty : componentQty) from
$objOrderedComponents.getOrderedComponentList(),sum($AccQty ) )
and
/*Comparing withe packakage definition rule */
$pkgComps:PackageComponent(componentKey==$id1,(quantityLmt
>=($qty+$accumulatedQty.intValue()))) from
$packageDefinition.getPackageComponentList()
then
/*setting the packagechargerecordId for the ordered services
which satisfies above conditions */
$orderedComponent.setPackageChargeRecordId($packageId);
/*The changes have happened in facts so updating in the working
memory so the rule get executed once again*/
modify ($objOrderedComponents){};
end
The problem i am facing here is of performance. This way of
implementation is taking much time compared to that of java code.If iam
not using accumulate function and iam executing the rules for each item
seperatly instead of passing entire collection,it is working much better.
Can anbody suggest a better way to implement it using drools.
Regards
Sanal.P
--
View this message in context: http://drools.46999.n3.nabble.com/Performace-Issues-drools-tp3902270p3902...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 12 months
Explanation of a decision
by Maxim Kolchin
Hi,
I'm working on expert system, automating one of the stages of optical
design.
Now, we're testing the system and we need a function, eхplaining a decision
of the system: which rules has been fired, why they has been fired and so
on. And I'm looking for a way to implement this feature.
Has someone had an experience in implementing this kind of features? Or
does someone know how it can be implemented?
Thank you,
Maxim Kolchin
Laboratory of Intellectual Systems,
National Research University ITMO,
http://en.ifmo.ru
13 years, 12 months