Skip to content

Commit

Permalink
chore(engine): improve logging
Browse files Browse the repository at this point in the history
Add more meaningful log message when
undefined variable is set for failedJobRetryTimeCycle 

Related to CAM-6835
  • Loading branch information
yanavasileva committed Jul 24, 2017
1 parent 1b89cb5 commit a149b7c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,14 @@ protected String getFailedJobRetryTimeCycle(JobEntity job, ActivityImpl activity
execution = fetchExecutionEntity(executionId);
}

Object value = expression.getValue(execution);
Object value = null;

try {
value = expression.getValue(execution);
}
catch (Exception e) {
LOG.exceptionWhileParsingExpression(jobId, e.getCause().getMessage());
}

if (value instanceof String) {
return (String) value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void exceptionWhileExecutingJob(JobEntity job, Throwable exception) {

public void debugFallbackToDefaultRetryStrategy() {
logDebug(
"003", "Falling back to default retry stratefy");
"003", "Falling back to default retry strategy");
}

public void debugDecrementingRetriesForJob(String id) {
Expand Down Expand Up @@ -169,4 +169,9 @@ public ProcessEngineException jobNotFoundException(String jobId) {
"026", "No job found with id '{}'", jobId));
}

public void exceptionWhileParsingExpression(String jobId, String exceptionMessage) {
logWarn(
"027", "Falling back to default retry strategy. Exception while executing job {}: {}", jobId, exceptionMessage);
}

}

0 comments on commit a149b7c

Please sign in to comment.