Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,15 @@
import org.flowable.job.service.impl.persistence.entity.SuspendedJobEntity;
import org.flowable.job.service.impl.persistence.entity.TimerJobEntity;
import org.flowable.variable.api.delegate.VariableScope;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* @author Tijs Rademakers
*/
public class DefaultInternalJobManager extends ScopeAwareInternalJobManager {

private static final Logger LOGGER = LoggerFactory.getLogger(DefaultInternalJobManager.class);

protected ProcessEngineConfigurationImpl processEngineConfiguration;

Expand Down Expand Up @@ -311,7 +315,11 @@ protected int calculateMaxIterationsValue(String originalExpression) {
List<String> expression = Arrays.asList(originalExpression.split("/"));
if (expression.size() > 1 && expression.get(0).startsWith("R")) {
if (expression.get(0).length() > 1) {
times = Integer.parseInt(expression.get(0).substring(1));
try {
times = Integer.parseInt(expression.get(0).substring(1));
} catch (NumberFormatException e) {
LOGGER.warn("Failed to parse max iterations value from expression: {}", originalExpression, e);
}
}
}

Expand Down