When you update your objects, do you notify the session of the change?
If you do that, you should not take care of salience. The objects insertion order is not relevant (or, at least, marginally).
To notify the session of an object change, you should either put your modifications inside a 'modify' block (see the docs) or let your java beans include a 'PropertyChangeSupport' field (see dynamic facts).
In your sample, when the room gets the 'fire' status, the session should be notified of the change, and the sprinkler rule will fire.

Regards

2010/6/9 Fnu Mahalakshmi <FMahalakshmi@nyx.com>

Hi,

 

If you have multiple rules where its important that rule 1 be fired on the data first and then rule 2 how can we do this without specifying the salience factor?

I do not want my rules to be dependant on each other as the data I am passing  differs from each other.

Ex:

Room{

Name, Id,

Status,

}

Fire{

Room,

FireType}

 

Sprinkler{

Room,

SprinklerType

status}

 

 

I pass all data above into my working memory.

I have rules:

Rule 1: “if fire exists update room status to ‘fire’”

Rule 2: “if room has status ‘fire’ update sprinkler status to ‘room number’”

 

Now when I pass my javabean objects: if theobject of type sprinkler gets processed first it will never get the room number even if actually the room has status ‘fire’

 

If I specify salience feature then It will never work for my sprinkler objects and always be multichained.

I don’t want chaining between my rules.

 

Any suggestions???

Thank you

M




Please consider the environment before printing this email.

Visit our website at http://www.nyse.com
*****************************************************************************
Note: The information contained in this message and any attachment to it is privileged, confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by replying to the message, and please delete it from your system. Thank you. NYSE Euronext.


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users