Using an IlrXmlObjectAsserter object (classic rule engine only)
You can use the IlrXmlObjectAsserter object to load XML documents into the classic rule engine.
About this task
One of the ways you can load an XML document into the classic rule engine is to use an IlrXmlObjectAsserter object.
This class explores an XML object tree in order to insert some selected objects in a context. It is usually instantiated to explore an XML root object created from an XML document by an XML data driver.Procedure
To use an IlrXmlObjectAsserter object:
Example
If you use the IlrXmlObjectAsserter class, you can filter the objects inserted in the working memory. In this example, all the objects have been inserted, so it is not necessary to use the in or from blocks in your rules.
Here is an extract from this type of rule:
rule processValidItem {
priority=100;
when {
item: Item ( "waiting".equals(state) );
product: Product ( id.equals( item.product ); stock >= item.quantity );
}
...