If the request processor is performing a scoping operation on the object instance passed to it, or is generating the list of objects to be worked on based on the named object instance and the given filter, or can eliminate a portion of the filter in a trivial solution; then the request processor might want to send only the portions of the BMIP request's filter parameter that are still relevant.
proc RequestProcessor {osaData handleId bmipRequest} {# # get the list of objects we'll be operating on, then step through # it so we can operate on each one and send the BMIP response back # to the client that called us. #
set objectList [keylget bmipRequest objectInstance]
. . .
set objectList [OFEvaluateFilter $handleId $objectList]
. . .
set listLength [llength $objectList]
if {$listLength < 1} {
# If all the objects failed the filter, we need to send a BMIP # response to that effect back to the client. So we set the # objectInstancePtr to NULL and call ofReturnBmipResponse().
set bmipResponse $bmipRequest keylset bmipResponse errorParameter {} keylset bmipResponse attributeList {} keylset bmipResponse actionInfo {} keylset bmipResponse linkedId 0 keylset bmipResponse objectInstance {}
OFReturnBmipResponse $handleId bmipResponse FALSE
return }
# # process the objects that passed the filter #
foreach object $objectList {
. . .