loading dsl based rule using KnowledgeAgent
by Diego López León
Hi all,
I'm on 5.0.0.CR1 and when I try to use KnowlegeAgent to load my
dsl-based rules the builder is unable to expand them. I'm using
KnowledgeAgent for a future transparent migration to guvnor but at
this stage I want to load the rules locally.
My changesets.xml is
<change-set>
<add>
<resource source='classpath:rules/couriers-flow.rf' type='DRF' />
<resource source='classpath:rules/correos.dsl' type='DSL' />
<resource source='classpath:rules/common-rules.drl' type='DRL' />
<resource source='classpath:rules/correo-argentino.drl' type='DRL' />
<resource source='classpath:rules/oca-postal.drl' type='DRL' />
</add>
<change-set>
The error
[2009:04:103 19:04:261:debug] KnowledgeAgent has KnowledgeBuilder
errors object=[6] Unable to expand: va desde "Buenos Aires"
"PROVINCIA" hasta "Mendoza" "PROVINCIA"[8] Unable to expand: envialo
en "Local" por "Correo Argentino"[6] Unable to expand: va desde
"Capital Federal" "PROVINCIA" hasta "General Roca" "CIUDAD"[8] Unable
to expand: envialo en "Regional" por "Correo Argentino"[5] Unable to
expand: $shipping : ShippingQuery()[6] Unable to expand:
GeoNode($srcName: name, type == GeoNodeType.PAIS) from
$shipping.currentSrc[7] Unable to expand: GeoNode(name == $srcName,
type == GeoNodeType.PAIS) from $shipping.currentDest[9] Unable to
expand: insert(new RuleResultCourierProduct("Correo Argentino",
"Nacional"));[4] Unable to expand: $shipping :
ShippingQuery(generalizable == true)[5] Unable to expand: not (exists
(RuleResultCourierProduct()))[7] Unable to expand:
generalize($shipping);[8] Unable to expand: update ($shipping);[6]
Unable to expand: $shipping : ShippingQuery()[7] Unable to expand:
exists (RuleResultCourierProduct(courierName=="Correo Argentino"))[9]
Unable to expand: $shipping.fullReset();[8,2]: [ERR 101] Line 8:2 no
viable alternative at input 'va' in rule "Buenos Aires a Mendoza por
Correo Argentino"[18,2]: [ERR 101] Line 18:2 no viable alternative at
input 'va' in rule "Capital Federal a General Roca por Correo
Argentino"
The plugin for eclipse expands it without any problem so I'm
discarding parse errors (Is this reasonable?)
Any idea about this issue?
Best regards.
--
diego
15 years, 8 months
Forrest Vs DocBook - your experience
by Arjun Dhar
Hey,
I think I saw Apache-Forrest being used in your docs earlier sometime. Now when
I look at the POM I see DOC Book plugin.
The Drools documentation is 'pretty' (thanks); just wanted to know if you guys
employ forrest. And Are you using the two together or your doing away with one
(and whats the reason).
Interested to hear your views/experience.
Thanks,
Arjun
15 years, 8 months
Re: [rules-users] Drools flow and BPEL (Drools 5.0.0.M5)
by sarish
Do you mean to say that JBPM-BPEL 1.1.1 does not support BPEL 2.0?
As per the home page of documentation, they say they are compliant with BPEL
2.0.
Mark Proctor wrote:
>
> Umesh Wankhede wrote:
>>
>>
>> Mark Proctor wrote:
>>> Umesh Wankhede wrote:
>>>>
>>>>
>>>> Mark Proctor wrote:
>>>>> Umesh Wankhede wrote:
>>>>>> Hi
>>>>>>
>>>>>> I am trying to evaluate various features (rules and workflow) of
>>>>>> Drools 5.0. What I understand from docs (drools-docs-flow.pdf -
>>>>>> page 5) is that the Drools flow engine is based on generic process
>>>>>> engine that allows the execution of different process languages
>>>>>> like RuleFlow, BPEL, OSWorkflow, etc. Although I am able to do PoC
>>>>>> (Proof of Concept) with RuleFlow, there isn't any
>>>>>> documentation/samples available for using BPEL as process
>>>>>> language. Also I don't find any more information on blogs, etc.
>>>>>> If anyone has done something similar, please let me know, or any
>>>>>> pointers would help.
>>>>> There is no BPEL product, Drools COULD do BPEL, but we haven't made
>>>>> it do so yet. It is more likely we would look to integrate an
>>>>> existing BPEL product like ODE, as the execution engine is the easy
>>>>> bit, it's all the xml manipulations that are time consuming.
>>>> So that means I would have to go with jBPM for BPEL support (and
>>>> losing the advantage of tight rule engine integration provided in
>>>> Drools). How far would be the BPEL support in Drools in the roadmap?
>>> If you are going to use BPEL I would recommend ODE, jBPM BPEL is not
>>> BPEL 2.0, but 1.0, which is very limited. ODE is likely to be the
>>> BPEL engine we integrated into Drools.
>>>
>>> More importantly though, have a good think on why it is you are using
>>> BPEL, as in reality it's generally too low level for end users to use
>>> effectively.
>> The primary language would be RuleFlow or jPDL, but we are also
>> looking at BPEL support (product requirements driven). So we have to
>> make a choice between jBPM or Drools 5.0. The latter option looks
>> more suitable for our requirement which provides tightly integrated
>> rule support, but lack of BPEL support currently is making the
>> decision tougher.
> If you are going to choose a BPEL product, make sure you choose one that
> supports BPEL 2.0, or you'll be shooting yourself in the foot, Apache
> ODE is the more complete BPEL 2.0 engine.
>>>>>>
>>>>>> Thanks
>>>>>> Umesh
>>>>>>
>>>>>>
>>>>>> Legal Notice: This transmission, including any attachments, is
>>>>>> confidential, proprietary, and may be privileged. It is intended
>>>>>> solely for
>>>>>> the intended recipient. If you are not the intended recipient, you
>>>>>> have received this transmission in error and you are hereby
>>>>>> advised that any
>>>>>> review, disclosure, copying, distribution, or use of this
>>>>>> transmission, or any of the information included therein, is
>>>>>> unauthorized and strictly
>>>>>> prohibited. If you have received this transmission in error,
>>>>>> please immediately notify the sender by reply and permanently
>>>>>> delete all copies of
>>>>>> this transmission and its attachments
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> 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
>> _______________________________________________
>> 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
>
>
--
View this message in context: http://www.nabble.com/Drools-flow-and-BPEL-%28Drools-5.0.0.M5%29-tp223513...
Sent from the drools - user mailing list archive at Nabble.com.
15 years, 8 months
Keep getting error trying to access value in hash map.
by samd
I'm trying to extract the value from a hashmap after first extracting a key
and I keep getting the same error.
Here is the rule information:
target: Target();
perm: PermissionCheck(target == target, action == "edit", granted == false);
primaryKey : TargetId(targetNum == 1) from target.codes.keySet();
primaryCode : TargetCode() from target.codes.values[primaryKey];
Here is the error:
Caused by: javax.el.ELException: /layout/test.xhtml @25,111
rendered="#{s:hasPermission(target,'edit')}": org.mvel.CompileException:
unable to resolve property: values
at
com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
at
javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:390)
... 61 more
Caused by: org.mvel.CompileException: unable to resolve property: values
at
org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAcces
sorOptimizer.java:288)
at
org.mvel.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAcce
ssorOptimizer.java:109)
at
org.mvel.ast.VariableDeepPropertyNode.getReducedValueAccelerated(VariableDeepPropertyNode
.java:29)
Thanks
--
View this message in context: http://www.nabble.com/Keep-getting-error-trying-to-access-value-in-hash-m...
Sent from the drools - user mailing list archive at Nabble.com.
15 years, 8 months
Counting rules matches within a rule + optimizing evals
by Arjun Dhar
Hi,
I have many rules. These rules may or may not belong to the same set. However,
based on their name they can be grouped. Say all rules starting with
"Traffic_Rule", "Criminal_Rule" etc.
Q1. I want to check after assertion of a fact (A.) how many and (B.) which all
rules executed for "Traffic_Rule" and the result will fire another rule.
(So I want all this in the rules files only) - So in a way I want to collect the
consequences and based on the result of that consequence set fire more rules.
Q2. evals() are expensive. I dont think we can assign the output of an eval in
the condition to a variable; so how do I re-use an eval in a condition and then
in the consequence? (To avoid calling the function multiple times)
P.S: Can someone please do something about that spammer (Vacation Reply)
regards,
Arjun
15 years, 8 months
Performance Platform for Drools Engine
by Priya Chaturvedi
Hi
I am planning to deploy Drools Rules Engine in my Application.
Could you please provide information or give me some pointers to understand what would be the performance platform required for the Drools Rule Engine.
Regards
Priya
**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
for the use of the addressee(s). If you are not the intended recipient, please
notify the sender by e-mail and delete the original message. Further, you are not
to copy, disclose, or distribute this e-mail or its contents to any other person and
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken
every reasonable precaution to minimize this risk, but is not liable for any damage
you may sustain as a result of any virus in this e-mail. You should carry out your
own virus checks before opening the e-mail or attachment. Infosys reserves the
right to monitor and review the content of all messages sent to or from this e-mail
address. Messages sent to or from this e-mail address may be stored on the
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***
15 years, 8 months
Ruleflow loop until condition
by Alessandro Terrinoni
Hello
I created a ruleflow like this one:
http://i41.tinypic.com/2efmctx.jpg
And this is the rule package (rules are demonstrative only and one per group, but later on more will be added in each group.
package package1
#list any import classes here.
...
#declare any global variables here
...
rule "start workflow"
salience 1000
when
eval (true)
then
System.out.println("matchata regola start");
drools.getWorkingMemory().startProcess("rf_main");
end
rule "Preferenza"
ruleflow-group "modParams"
when
nRound : NumeroRound( n : numeroRound)
pw : PreferenceWrapper(round == n ,pref : preference)
then
pw.setRound(n+1);
System.out.println("matchata regola pref");
System.out.println("preferenza: "+ pref.getName());
end
rule "query for results"
ruleflow-group "queryResult"
when
#conditions
nRound : NumeroRound(n : numeroRound)
then
#actions
System.out.println("matchata regola query");
...
end
rule "fasulla"
ruleflow-group "fasullo"
when
eval (true)
then
#actions
System.out.println("sei fasullo1");
end
In the ruleflow, the join node is XOR type.
Split node is XOR type and checks with the object NumeroRound and the variable numeroRound which is an int. If it is big enough it exits, else continue to "fasullo" group
the issue is that the matching goes through "modParams" group, then "queryResult" group, then "fasullo" group, but after that it freezes, instead of going angain in group "modParams". Note that it doesnt finish the execution, it waits something.
What is wrong with this ruleflow?
thanks in advance,
Alessandro Terrinoni
_________________________________________________________________
Chiama gratis dal tuo PC! Parla su Messenger
http://clk.atdmt.com/GBL/go/140630369/direct/01/
15 years, 8 months
Explicit class cast in RHS
by Alessandro Terrinoni
Hello
in my working memory I insert an object like this
public class Foo{
private IntType prop;
...
}
where IntType is a class, but in practice prop is either of type TypeA or TypeB, both extending the IntType class.
then i have a rule like this:
rule "abc"
when
Foo(p : prop, p.name == "propertyA")
then
// call some method defined only in the TypeA class
end
how do i explicitly cast p into a TypeA object to call the method defined only in that class?
thanks in advance,
Alessandro Terrinoni
_________________________________________________________________
Chiama gratis dal tuo PC! Parla su Messenger
http://clk.atdmt.com/GBL/go/140630369/direct/01/
15 years, 8 months