RightTuple rightTuple = createResultRightTuple(resultHandle, resultLeftTuple, dquery.isOpen());
boolean pass = true;
if ( query.isAbductive() ) {
int numArgs = dquery.getElements().length;
AbductiveQuery aq = (( AbductiveQuery) query );
for ( int j = 0; j < numArgs; j++ ) {
if ( dquery.getElements()[ j ] != null ) {
objects[ j ] = dquery.getElements()[ j ];
}
}
Object abduced = aq.abduce( Arrays.copyOfRange( objects, 0, numArgs - 1 ) );
if ( abduced != null ) {
EqualityKey key = ( (NamedEntryPoint) workingMemory.getEntryPoints().get( workingMemory.getEntryPointId() ) ).getTruthMaintenanceSystem().get( abduced );
InternalFactHandle handle = null;
if ( key != null ) {
handle = key.getFactHandle();
abduced = handle.getObject();
} else {
handle = (InternalFactHandle) ((InternalWorkingMemoryActions) workingMemory).insert( abduced,
aq.getValue(),
false,
true,
query,
(RuleTerminalNodeLeftTuple) resultLeftTuple );
}