use of com.twinsoft.convertigo.beans.steps.BranchStep in project convertigo by convertigo.
the class StepWithExpressions method getStepCopyToExecute.
private Step getStepCopyToExecute(Step step) throws EngineException {
Step stepToExecute = getStepCopy(step);
if (stepToExecute != null) {
stepToExecute.parent = this;
stepToExecute.transactionContextMaintainer = ((this.parent instanceof ParallelStep) ? this : transactionContextMaintainer);
stepToExecute.xpathApi = xpathApi;
stepToExecute.httpState = ((stepToExecute instanceof BranchStep) ? sequence.getNewHttpState() : this.httpState);
stepToExecute.executedSteps.putAll(executedSteps);
if (Engine.logBeans.isTraceEnabled())
Engine.logBeans.trace("(StepWithExpression) " + step + " [" + step.hashCode() + "] has been copied into " + stepToExecute + " [" + stepToExecute.hashCode() + "]");
}
return stepToExecute;
}
use of com.twinsoft.convertigo.beans.steps.BranchStep in project convertigo by convertigo.
the class Sequence method executeNextStep.
private void executeNextStep(Step step, org.mozilla.javascript.Context javascriptContext, Scriptable scope) throws EngineException {
Step stepToExecute = getStepCopyToExecute(step);
if (stepToExecute != null) {
stepToExecute.parent = this;
stepToExecute.transactionContextMaintainer = this;
stepToExecute.xpathApi = xpathApi;
stepToExecute.httpState = ((stepToExecute instanceof BranchStep) ? getNewHttpState() : getStepHttpState());
stepToExecute.executedSteps.putAll(executedSteps);
if (Engine.logBeans.isTraceEnabled())
Engine.logBeans.trace("(Sequence) " + step + " [" + step.hashCode() + "] has been copied into " + stepToExecute + " [" + stepToExecute.hashCode() + "]");
stepToExecute.checkSymbols();
if (stepToExecute.execute(javascriptContext, scope)) {
synchronized (this) {
childrenSteps.put(stepToExecute.executeTimeID, Long.valueOf(stepToExecute.priority));
executedSteps.putAll(stepToExecute.executedSteps);
}
} else {
stepToExecute.cleanCopy();
}
}
currentChildStep++;
}
Aggregations