diff options
Diffstat (limited to 'eaaf_core/src/main/java/at/gv')
-rw-r--r-- | eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/process/ProcessEngineImpl.java | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/process/ProcessEngineImpl.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/process/ProcessEngineImpl.java index 6e83a201..6080445d 100644 --- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/process/ProcessEngineImpl.java +++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/process/ProcessEngineImpl.java @@ -22,8 +22,11 @@ package at.gv.egiz.eaaf.core.impl.idp.process; import java.io.InputStream; import java.io.Serializable; import java.text.MessageFormat; +import java.util.Arrays; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.Optional; import java.util.concurrent.ConcurrentHashMap; import org.apache.commons.collections4.IterableUtils; @@ -521,18 +524,15 @@ public class ProcessEngineImpl implements ProcessEngine { * @throws ProcessDefinitionParserException In case of a parser error */ private void postValidationOfProcessDefintion(final ProcessDefinition pd) - throws ProcessDefinitionParserException { - try { - for (final TaskInfo task : pd.getTaskInfos().values()) { - createTaskInstance(task); - } - - } catch (final ProcessExecutionException e) { - log.error("Post-validation of process definition: {} find an error: {}", pd.getId(), - e.getMessage()); - throw new ProcessDefinitionParserException( - "Post-validation find an error in process definition:" + pd.getId(), e); - + throws ProcessDefinitionParserException { + List<String> beanNames = Arrays.asList(context.getBeanDefinitionNames()); + Optional<TaskInfo> missing = pd.getTaskInfos().values().stream() + .filter(el -> !beanNames.contains(el.getTaskImplementingClass())) + .findFirst(); + if (missing.isPresent()) { + log.error("Post-validation of process definition: {} find an error. Missing bean with name: {}", + pd.getId(), missing.get().getTaskImplementingClass()); + } } } |