public static FlowScript load(Properties properties, String flowId) {
if (properties == null) {
throw new IllegalArgumentException("properties must not be null");
}
if (flowId == null) {
throw new IllegalArgumentException("flowId must not be null");
}
String prefix = getPrefix(flowId);
LOG.debug("Loading execution scripts: {}*", prefix);
NavigableMap<String, String> flowMap = PropertiesUtil.createPrefixMap(properties, prefix);
Set<String> blockerIds = consumeBlockerIds(flowMap, flowId);
Set<ExecutionScript.Kind> enables = consumeEnables(flowMap, flowId);
Map<ExecutionPhase, List<ExecutionScript>> scripts = consumeScripts(flowMap, flowId);
FlowScript script = new FlowScript(flowId, blockerIds, scripts, enables);
LOG.trace("Loaded {}*: {}", prefix, script);
return script;
}