1710 Rebase - Second Attempt
[so.git] / bpmn / MSOCommonBPMN / src / main / java / org / openecomp / mso / bpmn / common / workflow / service / AbstractCallbackService.java
index 214ae28..49e42ac 100644 (file)
@@ -108,7 +108,7 @@ public abstract class AbstractCallbackService {
        protected boolean correlate(String messageEventName, String correlationVariable,\r
                        String correlationValue, Map<String, Object> variables, String logMarker)\r
                        throws Exception {\r
-\r
+       try{\r
                LOGGER.debug(logMarker + " Attempting to find process waiting"\r
                        + " for " + messageEventName + " with " + correlationVariable\r
                        + " = '" + correlationValue + "'");\r
@@ -240,6 +240,16 @@ public abstract class AbstractCallbackService {
                        LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN", MsoLogger.getServiceName(),\r
                                MsoLogger.ErrorCode.UnknownError, msg, e);\r
                }\r
+       }  catch (Exception e) {\r
+               // This must be an exception from the flow itself.  Log it, but don't\r
+               // report it back to the client.\r
+               String msg = "Caught " + e.getClass().getSimpleName() + " after receiving " + messageEventName\r
+                       + " with " + correlationVariable + " = '" + correlationValue\r
+                       + "': " + e;\r
+               LOGGER.debug(msg);\r
+               LOGGER.error(MessageEnum.BPMN_GENERAL_EXCEPTION, "BPMN CORRELATION ERROR -", MsoLogger.getServiceName(),\r
+                       MsoLogger.ErrorCode.UnknownError, msg, e);\r
+       }       \r
 \r
                return true;\r
        }\r