[rules-users] loading dsl based rule using KnowledgeAgent

Diego López León dieguitoll at gmail.com
Tue Apr 14 11:02:05 EDT 2009


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



More information about the rules-users mailing list