*/
package mir.producer;
-import java.util.Map;
-
-import mir.log.LoggerWrapper;
import mir.util.ParameterExpander;
condition = aCondition;
}
-
- public void produce(Map aValueMap, String aVerb, LoggerWrapper aLogger) throws ProducerFailure {
+ public void produce(ProductionContext aProductionContext) throws ProducerFailure {
int loopNr;
int maxNrLoops;
try {
loopNr = 0;
- maxNrLoops = ParameterExpander.evaluateIntegerExpressionWithDefault(aValueMap, limit, 1000);
- while (ParameterExpander.evaluateBooleanExpression(aValueMap, condition) &&
- (loopNr<maxNrLoops) &&
- !isAborted(aValueMap)) {
- super.produce(aValueMap, aVerb, aLogger);
+ maxNrLoops = ParameterExpander.evaluateIntegerExpressionWithDefault(aProductionContext.getValueSet(), limit, 1000);
+ while (ParameterExpander.evaluateBooleanExpression(aProductionContext.getValueSet(), condition) &&
+ (loopNr<maxNrLoops) && !isAborted(aProductionContext)) {
+ super.produce(aProductionContext);
+
loopNr++;
}
}
catch (Throwable t) {
- aLogger.error("LoopProducerNode raised an exception: " + t.getMessage());
+ aProductionContext.getLogger().warn("LoopProducerNode raised an exception", t);
}
}
}
\ No newline at end of file