FlowManagerService { protected Step mergeDefaultStepDefinitionIntoStep(StepModel stepModel, Step step) { String stepType = step.getStepDefinitionType().toString().toLowerCase(); StepDefinition defaultStepDefinition = getDefaultStepDefinitionFromResources("hub-internal-artifacts/step-definitions/" + stepType + "/marklogic/"+ step.getStepDefinitionName() +".step.json", step.getStepDefinitionType()); Step defaultStep = defaultStepDefinition.transformToStep(step.getName(), defaultStepDefinition, new Step()); return StepModel.mergeFields(stepModel, defaultStep, step); }  List<FlowStepModel> getFlows(); FlowStepModel createFlow(String flowJson, boolean checkExists); FlowStepModel getFlow(String flowName, boolean fromRunFlow); List<String> getFlowNames(); JsonNode validateStep(String flowName, String stepId); void deleteFlow(String flowName); List<StepModel> getSteps(String flowName); StepModel getStep(String flowName, String stepId); StepModel createStep(String flowName, Integer stepOrder, String stepId, String stringStep); void deleteStep(String flowName, String stepId); synchronized FlowStepModel runFlow(String flowName, List<String> steps); FlowStepModel stop(String flowName); static final String FLOW_FILE_EXTENSION; }
@Test void mergeEntityServicesMappingDefinition() { StepModel stepModel = new StepModel(); Step step = new Step(); step.setName("testing"); step.setStepDefinitionType(StepDefinition.StepDefinitionType.MAPPING); step.setStepDefinitionName("entity-services-mapping"); step = flowManagerService.mergeDefaultStepDefinitionIntoStep(stepModel, step); assertEquals(false, Boolean.parseBoolean(step.getOptions().get("validateEntity").toString()), "A new entity-services-mapping step should default to validateEntity=false"); }