summaryrefslogtreecommitdiff
path: root/eaaf_core/src/main
diff options
context:
space:
mode:
authorThomas <>2021-08-05 08:38:22 +0200
committerThomas <>2021-08-05 08:38:22 +0200
commit2a1c492d7ca2c71507ade35512f30fba40e4b64f (patch)
tree65c3631c6ed1bbab0d5966e77069fc72329d9e0f /eaaf_core/src/main
parent3795026ce07e7cd8fbed959b51853a805f106eed (diff)
downloadEAAF-Components-2a1c492d7ca2c71507ade35512f30fba40e4b64f.tar.gz
EAAF-Components-2a1c492d7ca2c71507ade35512f30fba40e4b64f.tar.bz2
EAAF-Components-2a1c492d7ca2c71507ade35512f30fba40e4b64f.zip
fix wrong error handling and missing TransactionId in case of an error during restart of process-engine (OEGVEID-2053)
Diffstat (limited to 'eaaf_core/src/main')
-rw-r--r--eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/tasks/RestartAuthProzessManagement.java17
1 files changed, 13 insertions, 4 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/tasks/RestartAuthProzessManagement.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/tasks/RestartAuthProzessManagement.java
index c3f3d32e..7a664915 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/tasks/RestartAuthProzessManagement.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/tasks/RestartAuthProzessManagement.java
@@ -30,6 +30,7 @@ import org.springframework.stereotype.Component;
import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext;
import at.gv.egiz.eaaf.core.api.idp.process.ProcessEngine;
import at.gv.egiz.eaaf.core.exceptions.EaafException;
+import at.gv.egiz.eaaf.core.exceptions.ProcessExecutionException;
import at.gv.egiz.eaaf.core.exceptions.TaskExecutionException;
import at.gv.egiz.eaaf.core.impl.idp.auth.modules.AbstractAuthServletTask;
import at.gv.egiz.eaaf.core.impl.idp.auth.modules.ModuleRegistration;
@@ -107,10 +108,18 @@ public class RestartAuthProzessManagement extends AbstractAuthServletTask {
processEngine.start(pendingReq);
}
-
- } catch (final EaafException e) {
- throw new TaskExecutionException(pendingReq, e.getMessage(), e);
-
+
+ } catch (final ProcessExecutionException e) {
+ //check if Task in already selected process failed or if process selection failed
+ if (e.getCause() != null && e.getCause() instanceof TaskExecutionException) {
+ log.info("New process was started, but one Task in process failed. Reason: {}", e.getMessage());
+ throw (TaskExecutionException)e.getCause();
+
+ } else {
+ throw new TaskExecutionException(pendingReq, e.getMessage(), e);
+
+ }
+
} catch (final Exception e) {
log.warn("RestartAuthProzessManagement has an internal error", e);
throw new TaskExecutionException(pendingReq, e.getMessage(), e);