Fix logging issues
[clamp.git] / src / main / resources / clds / camel / rest / clamp-api-v2.xml
1 <rests xmlns="http://camel.apache.org/schema/spring">
2         <rest>
3                 <get
4                         uri="/v2/loop/getAllNames"
5                         outType="java.lang.String[]"
6                         produces="application/json">
7                         <route>
8                                 <doTry>
9                                 <to
10                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Get All ClosedLoop')" />
11                                         <to
12                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
13                                         <to
14                                                 uri="bean:org.onap.clamp.loop.LoopController?method=getLoopNames()" />
15                                         <to
16                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
17                                 <doCatch>
18                                 <exception>java.lang.Exception</exception>
19                                 <handled>
20                                         <constant>false</constant>
21                                 </handled>
22                                 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
23                                 </doCatch>
24                         </doTry>
25                         </route>
26                 </get>
27                 <get
28                         uri="/v2/loop/{loopName}"
29                         outType="org.onap.clamp.loop.Loop"
30                         produces="application/json">
31                         <route>
32                                 <doTry>
33                                 <to
34                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Get Closed Loop')" />
35                                         <to
36                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
37                                         <to
38                                                 uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
39                                         <to
40                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
41                                 <doCatch>
42                                 <exception>java.lang.Exception</exception>
43                                 <handled>
44                                         <constant>false</constant>
45                                 </handled>
46                                 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
47                                 </doCatch>
48                         </doTry>
49                         </route>
50                 </get>
51                 <get
52                         uri="/v2/loop/svgRepresentation/{loopName}"
53                         outType="java.lang.String"
54                         produces="application/xml">
55                         <route>
56                                 <doTry>
57                                 <to
58                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Get SVG Representation')" />
59                                         <to
60                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','read')" />
61                                         <to
62                                                 uri="bean:org.onap.clamp.loop.LoopController?method=getSVGRepresentation(${header.loopName})" />
63                                         <to
64                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
65                                 <doCatch>
66                                 <exception>java.lang.Exception</exception>
67                                 <handled>
68                                         <constant>false</constant>
69                                 </handled>
70                                 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
71                                 </doCatch>
72                         </doTry>
73                         </route>
74                 </get>
75
76                 <post
77                         uri="/v2/loop/updateGlobalProperties/{loopName}"
78                         type="com.google.gson.JsonObject"
79                         consumes="application/json"
80                         outType="org.onap.clamp.loop.Loop"
81                         produces="application/json">
82                         <route>
83                                 <doTry>
84                                 <to
85                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update the global properties')" />
86                                         <to
87                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
88                                         <setHeader headerName="GlobalPropertiesJson">
89                                                 <simple>${body}</simple>
90                                         </setHeader>
91                                         <to uri="direct:load-loop" />
92                                         <to
93                                                 uri="bean:org.onap.clamp.loop.LoopController?method=updateGlobalPropertiesJson(${header.loopName},${header.GlobalPropertiesJson})" />
94                                         <to
95                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Global Properties UPDATED','INFO',${header.LoopObject})" />
96                                         <to
97                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
98                                 <doCatch>
99                                 <exception>java.lang.Exception</exception>
100                                 <handled>
101                                         <constant>false</constant>
102                                 </handled>
103                                 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
104                                 </doCatch>
105                         </doTry>
106                         </route>
107                 </post>
108                 <post
109                         uri="/v2/loop/updateOperationalPolicies/{loopName}"
110                         type="com.google.gson.JsonArray"
111                         consumes="application/json"
112                         outType="org.onap.clamp.loop.Loop"
113                         produces="application/json">
114                         <route>
115                                 <doTry>
116                                 <to
117                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update operational policies')" />
118                                         <to
119                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
120                                         <setHeader headerName="OperationalPoliciesArray">
121                                                 <simple>${body}</simple>
122                                         </setHeader>
123                                         <to uri="direct:load-loop" />
124                                         <to
125                                                 uri="bean:org.onap.clamp.loop.LoopController?method=updateOperationalPolicies(${header.loopName},${header.OperationalPoliciesArray})" />
126                                         <to
127                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Operational and Guard policies UPDATED','INFO',${header.LoopObject})" />
128                                         <to
129                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
130                                 <doCatch>
131                                 <exception>java.lang.Exception</exception>
132                                 <handled>
133                                         <constant>false</constant>
134                                 </handled>
135                                 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
136                                 </doCatch>
137                         </doTry>
138                         </route>
139                 </post>
140                 <post
141                         uri="/v2/loop/updateMicroservicePolicy/{loopName}"
142                         type="org.onap.clamp.policy.microservice.MicroServicePolicy"
143                         consumes="application/json"
144                         outType="org.onap.clamp.policy.microservice.MicroServicePolicy"
145                         produces="application/json">
146                         <route>
147                                 <doTry>
148                                 <to
149                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Update Microservice policies')" />
150                                         <to
151                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
152                                         <setHeader headerName="MicroServicePolicyObject">
153                                                 <simple>${body}</simple>
154                                         </setHeader>
155
156                                         <to uri="direct:load-loop" />
157                                         <to
158                                                 uri="bean:org.onap.clamp.loop.LoopController?method=updateMicroservicePolicy(${header.loopName},${header.MicroServicePolicyObject})" />
159                                         <to
160                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Micro Service policies UPDATED','INFO',${header.LoopObject})" />
161                                         <to
162                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
163                                 <doCatch>
164                                 <exception>java.lang.Exception</exception>
165                                 <handled>
166                                         <constant>false</constant>
167                                 </handled>
168                                 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
169                                 </doCatch>
170                         </doTry>
171                         </route>
172                 </post>
173                 <put
174                         uri="/v2/loop/deployLoop/{loopName}"
175                         outType="org.onap.clamp.loop.Loop"
176                         produces="application/json">
177                         <route>
178                                 <doTry>
179                                 <to
180                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Deploy the closed loop')" />
181                                         <to
182                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
183                                         <to
184                                                 uri="bean:org.onap.clamp.operation.LoopOperation?method=deployLoop(*,${header.loopName})" />
185                                         <to
186                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
187                                 <doCatch>
188                                 <exception>java.lang.Exception</exception>
189                                 <handled>
190                                         <constant>false</constant>
191                                 </handled>
192                                 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
193                                 </doCatch>
194                         </doTry>
195                         </route>
196                 </put>
197                 <put
198                         uri="/v2/loop/undeployLoop/{loopName}"
199                         outType="org.onap.clamp.loop.Loop"
200                         produces="application/json">
201                         <route>
202                                 <doTry>
203                                 <to
204                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Undeploy the closed loop')" />
205                                         <to
206                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
207                                         <to
208                                                 uri="bean:org.onap.clamp.operation.LoopOperation?method=unDeployLoop(${header.loopName})" />
209                                         <to
210                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
211                                 <doCatch>
212                                 <exception>java.lang.Exception</exception>
213                                 <handled>
214                                         <constant>false</constant>
215                                 </handled>
216                                 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
217                                 </doCatch>
218                         </doTry>
219                         </route>
220                 </put>
221                 <put
222                         uri="/v2/loop/stop/{loopName}"
223                         outType="org.onap.clamp.loop.Loop"
224                         produces="application/json">
225                         <route>
226                                 <doTry>
227                                         <log
228                                                 loggingLevel="INFO"
229                                                 message="Receive STOP request for loop: ${header.loopName}" />
230                                 <to
231                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog('Stop the closed loop')" />
232                                         <to
233                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
234                                         <to uri="direct:load-loop" />
235
236                                         <doTry> 
237                                                 <to uri="direct:remove-all-policy-from-active-pdp-group" />
238                                                 <doCatch>
239                                         <exception>java.lang.Exception</exception>
240                                         <handled>
241                                                 <constant>false</constant>
242                                         </handled>
243                                 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
244                                         </doCatch>
245                                         </doTry>
246
247
248                                         <log
249                                                 loggingLevel="INFO"
250                                                 message="STOP request successfully executed for loop: ${body}" />
251                                         <to
252                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('STOP request successfully executed','INFO',${header.LoopObject})" />
253                                         <to
254                                                 uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
255                                         <to
256                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
257                                 <doCatch>
258                                 <exception>java.lang.Exception</exception>
259                                 <handled>
260                                         <constant>false</constant>
261                                 </handled>
262                                 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
263                                 </doCatch>
264                         </doTry>
265                         </route>
266                 </put>
267                 <put
268                         uri="/v2/loop/start/{loopName}"
269                         outType="org.onap.clamp.loop.Loop"
270                         produces="application/json">
271                         <route>
272                                 <doTry>
273                                         <log
274                                                 loggingLevel="INFO"
275                                                 message="Receive START request for loop: ${header.loopName}" />
276                                 <to
277                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog('Start the closed loop')" />
278                                         <to
279                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
280                                         <to uri="direct:load-loop" />
281                                         
282                                         <doTry> 
283                                                 <to uri="direct:add-all-to-active-pdp-group" />
284                                                 <doCatch>
285                                         <exception>java.lang.Exception</exception>
286                                         <handled>
287                                                 <constant>false</constant>
288                                         </handled>
289                                 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
290                                         </doCatch>
291                                         </doTry>
292
293                                         <log
294                                                 loggingLevel="INFO"
295                                                 message="START request successfully executed for loop: ${body}" />
296                                         <to
297                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('START request successfully executed','INFO',${header.LoopObject})" />
298                                         <to
299                                                 uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
300                                         <to
301                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
302                                 <doCatch>
303                                 <exception>java.lang.Exception</exception>
304                                 <handled>
305                                         <constant>false</constant>
306                                 </handled>
307                                 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
308                                 </doCatch>
309                         </doTry>
310                         </route>
311                 </put>
312                 <put
313                         uri="/v2/loop/submit/{loopName}"
314                         outType="org.onap.clamp.loop.Loop"
315                         produces="application/json">
316                         <route>
317                                 <doTry>
318                                         <log
319                                                 loggingLevel="INFO"
320                                                 message="Receive SUBMIT request for loop: ${header.loopName}" />
321                                 <to
322                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Submit the closed loop')" />     
323                                         <to
324                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
325                                         <to uri="direct:load-loop" />
326                                         <to
327                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Receive SUBMIT request','INFO',${header.LoopObject})" />
328                                         <setHeader headerName="RaiseHttpExceptionFlag">
329                                                 <simple resultType="java.lang.Boolean">false</simple>
330                                         </setHeader>
331                                         
332                                         <doTry> 
333                                                 <to uri="direct:remove-all-policy-from-active-pdp-group" />
334                                                 <doCatch>
335                                         <exception>java.lang.Exception</exception>
336                                         <handled>
337                                                 <constant>false</constant>
338                                         </handled>
339                                 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
340                                         </doCatch>
341                                         </doTry>
342
343                                         <log
344                                                 loggingLevel="INFO"
345                                                 message="Processing all MICRO-SERVICES policies defined in loop ${header.LoopObject.getName()}" />
346                                         <split>
347                                                 <simple>${header.LoopObject.getMicroServicePolicies()}
348                                                 </simple>
349                                                 <setHeader headerName="microServicePolicy">
350                                                         <simple>${body}</simple>
351                                                 </setHeader>
352                                                 <log
353                                                         loggingLevel="INFO"
354                                                         message="Processing Micro Service Policy: ${header.microServicePolicy.getName()}" />
355                                                 <setHeader headerName="RaiseHttpExceptionFlag">
356                                                         <simple resultType="java.lang.Boolean">false</simple>
357                                                 </setHeader>
358
359                                                 <doTry> 
360                                                         <to uri="direct:delete-micro-service-policy" />
361                                                         <doCatch>
362                                                 <exception>java.lang.Exception</exception>
363                                                 <handled>
364                                                         <constant>false</constant>
365                                                 </handled>
366                                         <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
367                                                 </doCatch>
368                                                 </doTry>
369
370                                                 <doTry> 
371                                                         <to uri="direct:create-micro-service-policy" />
372                                                         <doCatch>
373                                                 <exception>java.lang.Exception</exception>
374                                                 <handled>
375                                                         <constant>false</constant>
376                                                 </handled>
377                                         <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
378                                                 </doCatch>
379                                                 </doTry>
380                                                 
381                                         </split>
382                                         <log
383                                                 loggingLevel="INFO"
384                                                 message="Processing all OPERATIONAL policies defined in loop ${header.LoopObject.getName()}" />
385                                         <split>
386                                                 <simple>${header.LoopObject.getOperationalPolicies()}
387                                                 </simple>
388                                                 <setHeader headerName="operationalPolicy">
389                                                         <simple>${body}</simple>
390                                                 </setHeader>
391                                                 <log
392                                                         loggingLevel="INFO"
393                                                         message="Processing Operational Policy: ${header.operationalPolicy.getName()}" />
394                                                 <setHeader headerName="RaiseHttpExceptionFlag">
395                                                         <simple resultType="java.lang.Boolean">false</simple>
396                                                 </setHeader>    
397
398                                                 <doTry> 
399                                                         <to uri="direct:delete-operational-policy" />
400                                                         <doCatch>
401                                                 <exception>java.lang.Exception</exception>
402                                                 <handled>
403                                                         <constant>false</constant>
404                                                 </handled>
405                                         <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
406                                                 </doCatch>
407                                                 </doTry>
408
409                                                 <doTry> 
410                                                         <to uri="direct:create-operational-policy" />
411                                                         <doCatch>
412                                                 <exception>java.lang.Exception</exception>
413                                                 <handled>
414                                                         <constant>false</constant>
415                                                 </handled>
416                                         <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
417                                                 </doCatch>
418                                                 </doTry>
419
420                                                 
421                                                 <log
422                                                         loggingLevel="INFO"
423                                                         message="Processing all GUARD policies defined in loop ${header.LoopObject.getName()}" />
424                                                 <split>
425                                                         <simple>${header.operationalPolicy.createGuardPolicyPayloads().entrySet()}
426                                                         </simple>
427                                                         <setHeader headerName="guardPolicy">
428                                                                 <simple>${body}</simple>
429                                                         </setHeader>
430                                                         <log
431                                                                 loggingLevel="INFO"
432                                                                 message="Processing Guard Policy: ${header.guardPolicy.getKey()}" />
433
434                                                         <setHeader headerName="RaiseHttpExceptionFlag">
435                                                                 <simple resultType="java.lang.Boolean">false</simple>
436                                                         </setHeader>
437                                                         
438                                                         <doTry> 
439                                                                 <to uri="direct:delete-guard-policy" />
440                                                                 <doCatch>
441                                                         <exception>java.lang.Exception</exception>
442                                                         <handled>
443                                                                 <constant>false</constant>
444                                                         </handled>
445                                                 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
446                                                         </doCatch>
447                                                         </doTry>
448
449                                                         <doTry> 
450                                                                 <to uri="direct:create-guard-policy" />
451                                                                 <doCatch>
452                                                         <exception>java.lang.Exception</exception>
453                                                         <handled>
454                                                                 <constant>false</constant>
455                                                         </handled>
456                                                 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
457                                                         </doCatch>
458                                                         </doTry>
459
460                                                 </split>
461                                         </split>
462                                         
463                                         
464                                         <doTry> 
465                                                 <to uri="direct:add-all-to-active-pdp-group" />
466                                                 <doCatch>
467                                         <exception>java.lang.Exception</exception>
468                                         <handled>
469                                                 <constant>false</constant>
470                                         </handled>
471                                 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
472                                         </doCatch>
473                                         </doTry>
474                                         
475
476
477                                         <log
478                                                 loggingLevel="INFO"
479                                                 message="SUBMIT request successfully executed for loop: ${body}" />
480                                         <to
481                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('SUBMIT request successfully executed','INFO',${header.LoopObject})" />
482                                         <to
483                                                 uri="bean:org.onap.clamp.loop.LoopController?method=getLoop(${header.loopName})" />
484                                         <to
485                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
486                                 <doCatch>
487                                 <exception>java.lang.Exception</exception>
488                                 <handled>
489                                         <constant>false</constant>
490                                 </handled>
491                                 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
492                                 </doCatch>
493                         </doTry>
494                         </route>
495                 </put>
496                 <put uri="/v2/loop/delete/{loopName}">
497                         <route>
498                                 <doTry>
499                                         <log
500                                                 loggingLevel="INFO"
501                                                 message="Receive DELETE request for loop: ${header.loopName}" />
502                                 <to
503                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=startLog('Delete the closed loop')" />
504                                         <to
505                                                 uri="bean:org.onap.clamp.authorization.AuthorizationController?method=authorize(*,'cl','','update')" />
506                                         <to uri="direct:load-loop" />
507                                         <to
508                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('Receive DELETE request','INFO',${header.LoopObject})" />
509
510                                         <doTry> 
511                                                 <to uri="direct:remove-all-policy-from-active-pdp-group" />
512                                                 <doCatch>
513                                         <exception>java.lang.Exception</exception>
514                                         <handled>
515                                                 <constant>false</constant>
516                                         </handled>
517                                 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
518                                         </doCatch>
519                                         </doTry>
520
521                                         
522                                         <split>
523                                                 <simple>${header.LoopObject.getMicroServicePolicies()}
524                                                 </simple>
525                                                 <setHeader headerName="microServicePolicy">
526                                                         <simple>${body}</simple>
527                                                 </setHeader>
528                                                 <log
529                                                         loggingLevel="INFO"
530                                                         message="Processing Micro Service Policy: ${header.microServicePolicy.getName()}" />
531
532                                                 <doTry> 
533                                                         <to uri="direct:delete-micro-service-policy" />
534                                                         <doCatch>
535                                                 <exception>java.lang.Exception</exception>
536                                                 <handled>
537                                                         <constant>false</constant>
538                                                 </handled>
539                                         <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
540                                                 </doCatch>
541                                                 </doTry>
542
543                                         </split>
544
545                                         <log
546                                                 loggingLevel="INFO"
547                                                 message="Processing all OPERATIONAL policies defined in loop ${header.LoopObject.getName()}" />
548                                         <split>
549                                                 <simple>${header.LoopObject.getOperationalPolicies()}
550                                                 </simple>
551                                                 <setHeader headerName="operationalPolicy">
552                                                         <simple>${body}</simple>
553                                                 </setHeader>
554                                                 <log
555                                                         loggingLevel="INFO"
556                                                         message="Processing Operational Policy: ${header.operationalPolicy.getName()}" />
557                                                 
558                                                 <doTry> 
559                                                         <to uri="direct:delete-operational-policy" />
560                                                         <doCatch>
561                                                 <exception>java.lang.Exception</exception>
562                                                 <handled>
563                                                         <constant>false</constant>
564                                                 </handled>
565                                         <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
566                                                 </doCatch>
567                                                 </doTry>
568
569                                                 <log
570                                                         loggingLevel="INFO"
571                                                         message="Processing all GUARD policies defined in loop ${header.LoopObject.getName()}" />
572                                                 <split>
573                                                         <simple>${header.operationalPolicy.createGuardPolicyPayloads().entrySet()}
574                                                         </simple>
575                                                         <setHeader headerName="guardPolicy">
576                                                                 <simple>${body}</simple>
577                                                         </setHeader>
578                                                         <log
579                                                                 loggingLevel="INFO"
580                                                                 message="Processing Guard Policy: ${header.guardPolicy.getKey()}" />
581
582                                                         <doTry> 
583                                                                 <to uri="direct:delete-guard-policy" />
584                                                                 <doCatch>
585                                                         <exception>java.lang.Exception</exception>
586                                                         <handled>
587                                                                 <constant>false</constant>
588                                                         </handled>
589                                                 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=invokeReturnLog()" />
590                                                         </doCatch>
591                                                         </doTry>
592
593                                                 </split>
594                                         </split>
595                                         <to
596                                                 uri="bean:org.onap.clamp.loop.log.LoopService?method=deleteLoop(${header.loopName})" />
597                                         <log
598                                                 loggingLevel="INFO"
599                                                 message="DELETE request successfully executed for loop: ${body}" />
600                                         <to
601                                                 uri="bean:org.onap.clamp.loop.log.LoopLogService?method=addLog('DELETE request successfully executed','INFO',${header.LoopObject})" />
602                                         <to
603                                                 uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=endLog()" />
604                                 <doCatch>
605                                 <exception>java.lang.Exception</exception>
606                                 <handled>
607                                         <constant>false</constant>
608                                 </handled>
609                                 <to uri="bean:org.onap.clamp.flow.log.FlowLogOperation?method=errorLog()" />
610                                 </doCatch>
611                         </doTry>
612                         </route>
613                 </put>
614         </rest>
615 </rests>