Skip to content

Commit

Permalink
#191 ProcessInstance refactor - use isSaved()
Browse files Browse the repository at this point in the history
  • Loading branch information
teosarca committed Feb 27, 2017
1 parent 90de886 commit ece8640
Showing 1 changed file with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -457,18 +457,10 @@ public boolean saveIfValidAndHasChanges(final boolean throwEx)
{
final Document parametersDocument = getParametersDocument();
final DocumentSaveStatus parametersSaveStatus = parametersDocument.saveIfValidAndHasChanges();
final boolean saved;
if (parametersSaveStatus.hasChangesToBeSaved() || parametersSaveStatus.isError())
final boolean saved = parametersSaveStatus.isSaved();
if (!saved && throwEx)
{
saved = false;
if (throwEx)
{
throw new ProcessExecutionException(parametersSaveStatus.getReason());
}
}
else
{
saved = true;
throw new ProcessExecutionException(parametersSaveStatus.getReason());
}

return saved;
Expand Down

0 comments on commit ece8640

Please sign in to comment.