int originalIndex = getCurrentActivityIndex();
int next = newActivity;
FlowActivity currentActivity;
// if true, currentActivity indicated that it has finished processing and the FlowState should immediately advanced. Used primarily for invisible FlowActivities.
boolean lastFlowActivityActivateAutoFinished;
FlowStepDirection flowStepDirection = FlowStepDirection.get(originalIndex, newActivity);
// based on the flowStepDirection. if true, then there another FlowActivity in the same direction as the current flowActivity
boolean canContinue;
do {
if(this.isActive()) {
FlowValidationResult flowValidationResult;