move init of business process id into standardSettings

This commit is contained in:
BerndBreier 2017-12-01 09:41:25 +01:00
parent 05834034ed
commit b864abcf0f
1 changed files with 4 additions and 5 deletions

View File

@ -102,11 +102,6 @@ public class TaskServiceImpl implements TaskService {
standardSettings(task);
// if no business process id is provided, a unique id is created.
if (task.getBusinessProcessId() == null) {
task.setBusinessProcessId(IdGenerator.generateWithPrefix(ID_PREFIX_BUSINESS_PROCESS));
}
this.taskMapper.insert(task);
LOGGER.debug("Task '{}' created.", task.getId());
@ -280,6 +275,10 @@ public class TaskServiceImpl implements TaskService {
task.setPlanned(now);
}
// if no business process id is provided, a unique id is created.
if (task.getBusinessProcessId() == null) {
task.setBusinessProcessId(IdGenerator.generateWithPrefix(ID_PREFIX_BUSINESS_PROCESS));
}
// insert Classification specifications if Classification is given.
Classification classification = task.getClassification();