aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/src/main/resources/clds/camel/routes/utils-flows.xml
blob: da91335c8abc0981f3b42aa18f452ae5c8f055ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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>