FlowStep createTrailingStepInFlow(String stepName, FlowPart flowPart) { Flow flow = flowPart.getFlow(); FlowStep newTrailingStep = step.getUseCase().newInterruptableFlowStep(stepName, flow); return newTrailingStep; }
/** * Creates the first step of this flow. It can be run when the runner is at the * right position. * * @param stepName * the name of the step to be created * @return the newly created step part, to ease creation of further steps * @throws ElementAlreadyInModel * if a step with the specified name already * exists in the use case */ public StepPart step(String stepName) { UseCasePart useCasePart = flowPart.getUseCasePart(); UseCase useCase = useCasePart.getUseCase(); Flow flow = flowPart.getFlow(); Condition condition = conditionPart.getCondition(); FlowStep step = useCase.newInterruptingFlowStep(stepName, flow, flowPosition, condition); StepPart stepPart = new StepPart(step, useCasePart, flowPart); return stepPart; } }