Philip de Lang

Rule trace, including fired rules and deducted attributes

Discussion created by Philip de Lang on Oct 16, 2008
Latest reply on Oct 24, 2008 by Andrei Palskoi

I am working on a rule trace monitor, that should return the name of the rules that are fired and per fired rule a path (xpath) to the element that is touched (we are using the XML bom).  I found an example in Java that does return rule names, using NdRuleEvent. I cannot find out how I can retrieve the path to the touched element though .

 

An exampe of an XML bom would be:

 

<Dossier><Person>

                     <name>joe</name>

                     <age></age>

                    <Marriage>

                         <Person>

                                 <name>jane</name>

                                 <age></age>

                          </Person>

                    </Marriage>

               </Person>

</Dossier>

 

If I have a rule called 'ascertain_age":

 

if (true)
 

then

{

    person.age = 40. 

 

that deducts the value of jane's age (because the path to joe's partner is set in the ruleflow) , the rule trace should include 'ascertain_age' and '\Dossier\Person\Marriage\Person\age'. I can get 'ascertain_age' from the rule trace, but I do not know how to get the path to the touched element. Does anybody know how to get this working?

 

Thanks in advance.

 

Philip.

Outcomes