* or eventually one that was already in the cache if sharing is enabled
*/
public BaseNode attachNode(final BuildContext context,
final BaseNode candidate) {
BaseNode node = null;
RuleBasePartitionId partition = null;
if ( candidate.getType() == NodeTypeEnums.EntryPointNode ) {
// entry point nodes are always shared
node = context.getKnowledgeBase().getRete().getEntryPointNode( ((EntryPointNode) candidate).getEntryPoint() );
// all EntryPointNodes belong to the main partition
partition = RuleBasePartitionId.MAIN_PARTITION;