diff options
author | Thomas <> | 2021-03-02 11:35:45 +0100 |
---|---|---|
committer | Thomas <> | 2021-03-02 11:35:45 +0100 |
commit | 1b8d04783794837c0aca484953b3264028a49b9d (patch) | |
tree | 3bc877a71e5ba3b33283aa7f3084366fa203b0a3 /eaaf_core/src/main/java | |
parent | 4bb06aa415b2c46bcf46c0b8d951145f208a9cb0 (diff) | |
download | EAAF-Components-1b8d04783794837c0aca484953b3264028a49b9d.tar.gz EAAF-Components-1b8d04783794837c0aca484953b3264028a49b9d.tar.bz2 EAAF-Components-1b8d04783794837c0aca484953b3264028a49b9d.zip |
update error-messages in process-management
Diffstat (limited to 'eaaf_core/src/main/java')
4 files changed, 14 insertions, 10 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/AbstractProcessEngineSignalController.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/AbstractProcessEngineSignalController.java index 2ce728c1..ea481bdb 100644 --- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/AbstractProcessEngineSignalController.java +++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/AbstractProcessEngineSignalController.java @@ -79,7 +79,7 @@ public abstract class AbstractProcessEngineSignalController extends AbstractCont // process instance is mandatory if (pendingReq.getProcessInstanceId() == null) { throw new EaafIllegalStateException( - new Object[] { "MOA session does not provide process instance id." }); + new Object[] { "PendingRequest does not provide process-instance id." }); } diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/ProtocolFinalizationController.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/ProtocolFinalizationController.java index 6a566f00..b2130fb4 100644 --- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/ProtocolFinalizationController.java +++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/ProtocolFinalizationController.java @@ -176,7 +176,8 @@ public class ProtocolFinalizationController extends AbstractController { final IRequest pendingReq = requestStorage.getPendingRequest(pendingRequestID); if (pendingReq == null) { - log.error("No PendingRequest with ID " + pendingRequestID + " found.!"); + log.info("PendingReqId was valid but no PendingRequest with ID: {}. Looks already used", + pendingRequestID); protAuthService.handleErrorNoRedirect( new EaafException(IStatusMessenger.CODES_INTERNAL_ERROR_AUTH_TIMEOUT, new Object[] { pendingRequestID, }), 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 9274ea81..61d2eb28 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 @@ -21,6 +21,7 @@ package at.gv.egiz.eaaf.core.impl.idp.process; import java.io.InputStream; import java.io.Serializable; +import java.text.MessageFormat; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; @@ -28,8 +29,6 @@ import java.util.concurrent.ConcurrentHashMap; import org.apache.commons.collections4.IterableUtils; import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.slf4j.MDC; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; @@ -51,14 +50,17 @@ import at.gv.egiz.eaaf.core.impl.idp.process.model.ProcessNode; import at.gv.egiz.eaaf.core.impl.idp.process.model.StartEvent; import at.gv.egiz.eaaf.core.impl.idp.process.model.TaskInfo; import at.gv.egiz.eaaf.core.impl.idp.process.model.Transition; +import lombok.extern.slf4j.Slf4j; /** * Process engine implementation allowing starting and continuing processes as * well as providing means for cleanup actions. */ +@Slf4j public class ProcessEngineImpl implements ProcessEngine { - private final Logger log = LoggerFactory.getLogger(getClass()); + private static final String ERROR_PROCESS_OBJECT_NOT_EXIST = + "Process instance: {0} does not exist for pendingReq: {0}"; @Autowired ProcessInstanceStoreDao piStoreDao; @@ -156,15 +158,16 @@ public class ProcessEngineImpl implements ProcessEngine { if (StringUtils.isEmpty(pendingReq.getProcessInstanceId())) { log.error("Pending-request with id:" + pendingReq.getPendingRequestId() + " includes NO 'ProcessInstanceId'"); - throw new ProcessExecutionException("Pending-request with id:" - + pendingReq.getPendingRequestId() + " includes NO 'ProcessInstanceId'"); + throw new ProcessExecutionException(MessageFormat.format(ERROR_PROCESS_OBJECT_NOT_EXIST, + pendingReq.getProcessInstanceId(), pendingReq.getPendingRequestId())); + } final ProcessInstance pi = loadProcessInstance(pendingReq.getProcessInstanceId()); if (pi == null) { - throw new ProcessExecutionException( - "Process instance '" + pendingReq.getProcessInstanceId() + "' does not exist."); + throw new ProcessExecutionException(MessageFormat.format(ERROR_PROCESS_OBJECT_NOT_EXIST, + pendingReq.getProcessInstanceId(), pendingReq.getPendingRequestId())); } diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/process/dao/ProcessInstanceStoreDaoImpl.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/process/dao/ProcessInstanceStoreDaoImpl.java index cca8872f..611572c0 100644 --- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/process/dao/ProcessInstanceStoreDaoImpl.java +++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/process/dao/ProcessInstanceStoreDaoImpl.java @@ -72,7 +72,7 @@ public class ProcessInstanceStoreDaoImpl implements ProcessInstanceStoreDao { log.debug("Found process instance store for instance '{}'.", processInstanceId); } else { - log.debug("Unable to find process instance store for instance '{}'.", processInstanceId); + log.info("Unable to find process instance store for instance '{}'.", processInstanceId); } |