/** * Resume the workflow run with the specified id * * @param workflowRunId * The id of the workflow run to resume * @return If the workflow run was resumed then true. If the workflow run * was not paused or it was cancelled, then false. */ public static synchronized boolean resumeWorkflow(String workflowRunId) { if (cancelledWorkflowRuns.contains(workflowRunId)) { return false; } if (pausedLayerMap.containsKey(workflowRunId)) { Map<String, Set<Stop>> pausedLayerMapCopy = new HashMap<String, Set<Stop>>(); pausedLayerMapCopy.putAll(pausedLayerMap); Set<Stop> stops = pausedLayerMapCopy.remove(workflowRunId); pausedLayerMap = pausedLayerMapCopy; for (Stop s : stops) { s.resumeLayerWorkflow(workflowRunId); } return true; } else { return false; } }