diff options
author | sebdet <sebastien.determe@intl.att.com> | 2019-08-23 07:45:27 -0700 |
---|---|---|
committer | sebdet <sebastien.determe@intl.att.com> | 2019-08-23 08:35:15 -0700 |
commit | 3142c70fb7530c444c891674fe55c6a9b236dfb3 (patch) | |
tree | 807ba054b1fea1af52cdc3bc45b4baa2ea9134a7 /src/main/resources/clds/camel/routes/policy-flows.xml | |
parent | 5e2b077e496ca28e9f91fc12cecb872228c81816 (diff) |
Fix the log status
Fix the way the code (camel) computes the global loop state + introduce
level in component state for that
Issue-ID: CLAMP-384
Change-Id: I83a9306eabacfc1f118df6b828e521ee59d19b5f
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'src/main/resources/clds/camel/routes/policy-flows.xml')
-rw-r--r-- | src/main/resources/clds/camel/routes/policy-flows.xml | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/main/resources/clds/camel/routes/policy-flows.xml b/src/main/resources/clds/camel/routes/policy-flows.xml index 5d5861547..b6f30c37c 100644 --- a/src/main/resources/clds/camel/routes/policy-flows.xml +++ b/src/main/resources/clds/camel/routes/policy-flows.xml @@ -1,5 +1,36 @@ <routes xmlns="http://camel.apache.org/schema/spring"> + <route id="verify-one-policy"> + <from uri="direct:verify-one-policy" /> + <setProperty propertyName="raiseHttpExceptionFlag"> + <simple resultType="java.lang.Boolean">false</simple> + </setProperty> + <to uri="direct:get-policy" /> + <when> + <simple> ${header.CamelHttpResponseCode} != 200 </simple> + <setProperty propertyName="policyFound"> + <simple resultType="java.lang.Boolean">false</simple> + </setProperty> + <log loggingLevel="WARN" + message="At least one policy has not been found on policy engine: ${exchangeProperty[policyName]}" /> + </when> + <setProperty propertyName="raiseHttpExceptionFlag"> + <simple resultType="java.lang.Boolean">false</simple> + </setProperty> + <to uri="direct:get-deployment-policy" /> + <when> + <simple> ${header.CamelHttpResponseCode} != 200 </simple> + <setProperty propertyName="policyDeployed"> + <simple resultType="java.lang.Boolean">false</simple> + </setProperty> + <log loggingLevel="WARN" + message="At least one policy has not been deployed on policy engine: ${exchangeProperty[policyName]}" /> + </when> + <setProperty propertyName="newPolicyState"> + <simple>${exchangeProperty[policyComponent].computeState(*)}</simple> + </setProperty> + </route> + <route id="get-policy"> <from uri="direct:get-policy" /> <doTry> |