private void runGateProcesses(List<ResourceMirror> resources) throws IOException {
assert resources != null;
final DriverRepository drivers = new DriverRepository(resources);
LinkedList<Future<?>> futures = new LinkedList<Future<?>>();
for (final ProcessScript<?> process : script.getProcesses()) {
final ProcessProvider processProvider = processProviders.get(process.getProcessType());
assert processProvider != null;
Future<?> future = executor.submit(new Callable<Void>() {
@Override
public Void call() throws IOException {
LOG.debug("Starting gate process: {}",
process.getName(),
sessionId);
try {
if (RuntimeContext.get().canExecute(processProvider)) {
processProvider.execute(drivers, process);
} else {
LOG.info("Skipped process execution (simulated)");
}
} catch (IOException e) {
WGLOG.error(e, "E00003",