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