}
return ret;
}
private static int getUserRetryMax(NodeHandler.Context context) throws WorkflowException {
XLog log = XLog.getLog(LiteWorkflowStoreService.class);
Configuration conf = Services.get().get(ConfigurationService.class).getConf();
int ret = conf.getInt(CONF_USER_RETRY_MAX, 0);
int max = ret;
String userRetryMax = context.getNodeDef().getUserRetryMax();
if (!userRetryMax.equals("null")) {
try {
ret = Integer.parseInt(userRetryMax);
if (ret > max) {
ret = max;
log.warn(ErrorCode.E0820.getTemplate(), ret, max);
}
}
catch (NumberFormatException nfe) {
throw new WorkflowException(ErrorCode.E0700, nfe.getMessage(), nfe);
}