private ViewProcessImpl createViewProcess(UniqueId definitionId, ViewExecutionOptions viewExecutionOptions,
ViewResultMode resultMode, ViewResultMode fragmentResultMode) {
// TEMPORARY CODE - This method should be removed post credit work and supports Excel (Jim)
ViewExecutionOptions executionOptions = verifyLiveDataViewExecutionOptions(viewExecutionOptions);
// END TEMPORARY CODE
_processLock.lock();
try {
final String idValue = generateIdValue(_processIdSource);
final UniqueId viewProcessId = UniqueId.of(PROCESS_SCHEME, idValue);
final ViewProcessContext viewProcessContext = createViewProcessContext(viewProcessId, new VersionedUniqueIdSupplier(CYCLE_SCHEME, idValue));
final ViewProcessImpl viewProcess = new ViewProcessImpl(definitionId, executionOptions, viewProcessContext, this);
// If executing in batch mode then attach a special listener to write incoming results into the batch db
if (executionOptions.getFlags().contains(ViewExecutionFlags.BATCH)) {
if (_viewResultListenerFactory == null) {
throw new IllegalStateException("Batch mode requires a ViewResultListenerFactory");
}
viewProcess.attachListener(_viewResultListenerFactory.createViewResultListener(viewProcess.getLatestViewDefinition().getMarketDataUser()), resultMode, fragmentResultMode);
}