}
private void processLocally(RequestContext context, Graph graph)
{
LOG.debug("Processing graph locally.");
DISPELGraphExecutor processor = GatewayBeanFactory.getInstance().createDispelGraphExecutor();
processor.setRequestContext(context);
processor.registerListener(new LoggingProgressListener());
processor.registerListener(new ResultDataSourceListener(this));
processor.registerListener(new ProcessingErrorListener(this, mErrors));
//here register listener to final workflow - radek
LOG.debug("registering workflow listener.");
processor.registerListener(new WorkflowListener(context));
LOG.debug("Initialising local process.");
mFail = !processor.initialise(graph) || mFail;
mLocalProcesses.add(processor);
}