private Execution parsePipeline(String configJson) throws IOException {
Map<String, Serializable> config = objectMapper.readValue(configJson, Map.class);
return new PipelineBuilder(getString(config, "application"))
.withName(getString(config, "name"))
.withPipelineConfigId(getString(config, "id"))
.withTrigger(objectMapper.convertValue(config.get("trigger"), Trigger.class))
.withStages((List<Map<String, Object>>) config.get("stages"))
.withLimitConcurrent(getBoolean(config, "limitConcurrent"))
.withKeepWaitingPipelines(getBoolean(config, "keepWaitingPipelines"))
.withNotifications((List<Map<String, Object>>) config.get("notifications"))
.withOrigin(getString(config, "origin"))
.withStartTimeExpiry(getString(config, "startTimeExpiry"))
.withSource((config.get("source") == null) ? null : objectMapper.convertValue(config.get("source"), Execution.PipelineSource.class))
.build();
}