aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/src/main/resources/clds/camel/routes/utils-flows.xml
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/src/main/resources/clds/camel/routes/utils-flows.xml')
-rw-r--r--runtime/src/main/resources/clds/camel/routes/utils-flows.xml28
1 files changed, 28 insertions, 0 deletions
diff --git a/runtime/src/main/resources/clds/camel/routes/utils-flows.xml b/runtime/src/main/resources/clds/camel/routes/utils-flows.xml
new file mode 100644
index 000000000..90900f842
--- /dev/null
+++ b/runtime/src/main/resources/clds/camel/routes/utils-flows.xml
@@ -0,0 +1,28 @@
+<routes xmlns="http://camel.apache.org/schema/spring">
+ <route id="reset-raise-http-exception-flag">
+ <from uri="direct:reset-raise-http-exception-flag" />
+ <setProperty name="raiseHttpExceptionFlag">
+ <simple resultType="java.lang.Boolean">true</simple>
+ </setProperty>
+ </route>
+
+ <route id="dump-loop-log-http-response">
+ <from uri="direct:dump-loop-log-http-response" />
+ <log loggingLevel="INFO"
+ message="${exchangeProperty[logMessage]} - ${header.CamelHttpResponseCode} : ${header.CamelHttpResponseText}" />
+ <choice>
+ <when>
+ <simple>${exchangeProperty[logComponent]} == null</simple>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLog('${exchangeProperty[logMessage]} - ${header.CamelHttpResponseCode} : ${header.CamelHttpResponseText}','INFO',${exchangeProperty[loopObject]})" />
+ </when>
+ <otherwise>
+ <to
+ uri="bean:org.onap.policy.clamp.loop.log.LoopLogService?method=addLogForComponent('${exchangeProperty[logMessage]} - ${header.CamelHttpResponseCode} : ${header.CamelHttpResponseText}','INFO','${exchangeProperty[logComponent]}',${exchangeProperty[loopObject]})" />
+ <setProperty name="logComponent">
+ <constant>null</constant>
+ </setProperty>
+ </otherwise>
+ </choice>
+ </route>
+</routes> \ No newline at end of file