InternalFactHandle h = (InternalFactHandle) lookupFactHandle( core );
if ( h == null ) {
h = lookupHandleForWrapper( core );
}
if ( h == null ) {
throw new FactException( "Update error: handle not found for object: " + core + ". Is it in the working memory?" );
}
if ( ! h.isTraitOrTraitable() ) {
throw new IllegalStateException( "A traited working memory element is being used with a default fact handle. " +
"Please verify that its class was declared as @Traitable : " + core.getClass().getName() );
}