All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.requirementsascode.systemreaction.ContinuesAt Maven / Gradle / Ivy

There is a newer version: 2.0
Show newest version
package org.requirementsascode.systemreaction;

import org.requirementsascode.FlowStep;
import org.requirementsascode.ModelRunner;

public class ContinuesAt extends AbstractContinues {
  private FlowStep currentStep;
  private FlowStep continueAtStep;

  public ContinuesAt(String continueAtStepName, FlowStep currentStep) {
    super(continueAtStepName);
    this.currentStep = currentStep;

  }

  @Override
  public void accept(ModelRunner runner) {
    if(continueAtStep == null) {
      resolveContinueAtStep();
    }
  }

  public void resolveContinueAtStep() {
    continueAtStep = ((FlowStep) currentStep.getUseCase().findStep(getStepName()));
    continueAtStep.orAfter(currentStep);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy