virtual P6R::P6ERR P6R::p6IRuleEngine::startFacts ( const P6CHAR *  pBuffer,
P6UINT32  bufSize,
P6BOOL  isLast 
) [pure virtual]

We represent all facts in this rule engine as a DOM XML tree.

(This is typically referred to as the rule engine's "working memory".) The facts added from this method are referred to as "stated" facts rather than "inferred" facts which are generated by processing rules.

This method can be called multiple times. Each time it is called a new fact tree is generated and the previous tree is removed. If the XML (or JSON) fact data is to be streamed in then the call sequence should be as follows:

 startFacts( pBuffer, size, P6FALSE )
 continueFacts( pBuffer, size, P6FALSE ) 
    * * * * 
 continueFacts( pBuffer, size, P6TRUE )

All the XML (or JSON) data must be present before the fact tree can be generated. Once generated the fact tree is directly available via the XPath expressions embedded in P6R's rule languague.

Parameters:
pBuffer [IN] All or part of the XML (or JSON) that represent the facts to run the rule engine against.
bufSize [IN] The number of characters in the buffer pointed to by pBuffer
isLast [IN] pBuffer contains all the XML (or JSON) encoded facts?
Returns:
SuccessP6R::eOk 
FailureP6R::eNotInitializedA successful call to intialize() must be made before calling this funciton.
P6R::eInvalidArgpBuffer is NULL or bufSize is zero.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
Copyright © 2004 - 2010 P6R Inc. - All Rights Reserved.