}
}
public void process(EventBean lookupEvent, EventBean[] prefillPath, List<EventBean[]> result, ExprEvaluatorContext exprEvaluatorContext)
{
RepositoryImpl repository = new RepositoryImpl(rootStream, lookupEvent, numStreams);
boolean processOptional = true;
for (int i = 0; i < requireResultsInstruction; i++)
{
LookupInstructionExec currentInstruction = lookupInstructions[i];
boolean hasResults = currentInstruction.process(repository,exprEvaluatorContext);
// no results, check what to do
if (!hasResults)
{
// If there was a required stream, we are done.
if (currentInstruction.hasRequiredStream())
{
return;
}
// If this is the first stream and there are no results, we are done with lookups
if (i == 0)
{
processOptional = false; // go to result processing
}
}
}
if (processOptional)
{
for (int i = requireResultsInstruction; i < lookupInstructions.length; i++)
{
LookupInstructionExec currentInstruction = lookupInstructions[i];
currentInstruction.process(repository, exprEvaluatorContext);
}
}
// provide a place for the result
myResultAssembler.setResult(result, lookupEvent);
// go over the assembly instruction set
List<Node>[] results = repository.getNodesPerStream();
// no results - need to execute the very last instruction/top node
if (results == null)
{
BaseAssemblyNode lastAssemblyNode = assemblyInstructions[assemblyInstructions.length - 1];