}
public ExecutionNode getExecutionNode(NodeSelectionStrategy strategy) {
ExecutionNode node = null;
GenericNodeConnector currentNode = null;
try {
//if the strategy is null use the default one
if (strategy == null) {
currentNode = getBestNode(new StaticIncrementalSelectionStrategy(this));
} else {
strategy.setConnection(this);
currentNode = getBestNode(strategy);
}
if (currentNode.connect()) {
node = new ExecutionNode();
node.set(KnowledgeBuilderFactoryService.class, new KnowledgeBuilderProviderRemoteClient(currentNode));
node.set(KnowledgeBaseFactoryService.class, new KnowledgeBaseProviderRemoteClient(currentNode));
node.set(DirectoryLookupFactoryService.class, new DirectoryLookupProviderRemoteClient(currentNode, this));