use of org.whole.lang.workflows.model.Condition in project whole by wholeplatform.
the class WorkflowsInterpreterVisitor method visit.
// TODO ? remove from interpreter or add to model ?
// public void visit(Repeat entity) {
// for (int i=0; i<entity.getTimes().wIntValue(); i++)
// entity.getFlowObject().accept(this);
// }
public void visit(WhileLoop entity) {
Condition condition = entity.getCondition();
while (BehaviorUtils.evaluatePredicate(condition, 0, getBindings())) {
handleCancelRequest();
entity.getFlowObject().accept(this);
}
}
use of org.whole.lang.workflows.model.Condition in project whole by wholeplatform.
the class WorkflowsInterpreterVisitor method visit.
// TODO ? remove from interpreter or add to model ?
// public void visit(DoWhileControl entity) {
// do {
// entity.getFlowObject().accept(visitor1);
// } while (booleanValue(entity.getCondition()));
// }
public void visit(ConditionalCase entity) {
Condition condition = entity.getCondition();
boolean isSatisfied = BehaviorUtils.evaluatePredicate(condition, 0, getBindings());
if (isSatisfied)
entity.getFlowObject().accept(this);
setResultValue(isSatisfied);
}
use of org.whole.lang.workflows.model.Condition in project whole by wholeplatform.
the class WorkflowsIDEInterpreterVisitor method visit.
@Override
public void visit(Breakpoint entity) {
setResult(null);
IBindingManager debugEnv = getBindings();
if (entity.getDisabled().wBooleanValue() || (debugEnv.wIsSet("debug#reportModeEnabled") && !debugEnv.wBooleanValue("debug#reportModeEnabled")) || (debugEnv.wIsSet("debug#debugModeEnabled") && !debugEnv.wBooleanValue("debug#debugModeEnabled")) || (debugEnv.wIsSet("debug#breakpointsEnabled") && !debugEnv.wBooleanValue("debug#breakpointsEnabled")))
return;
Condition condition = entity.getCondition();
if (!EntityUtils.isResolver(condition)) {
if (!BehaviorUtils.evaluatePredicate(condition, 0, debugEnv))
return;
}
Set<String> includeNames = new TreeSet<String>();
Variables variables = entity.getShowVariables();
if (Matcher.matchImpl(WorkflowsEntityDescriptorEnum.Variables, variables)) {
for (Variable variable : variables) includeNames.add(variable.getValue());
}
E4Utils.suspendOperation(SuspensionKind.BREAK, null, entity, debugEnv, includeNames);
}
Aggregations