Fix dependencies on VPN-AVRO model deleted with PCVS examples
[policy/apex-pdp.git] / tools / model-generator / src / test / resources / vpnsla.json
1 {
2   "policies": {
3     "key": {
4       "name": "PCVS-VpnSla_Policies",
5       "version": "1.0.0"
6     },
7     "policyMap": {
8       "entry": [
9         {
10           "key": {
11             "name": "CustomerContextPolicy",
12             "version": "1.0.0"
13           },
14           "value": {
15             "policyKey": {
16               "name": "CustomerContextPolicy",
17               "version": "1.0.0"
18             },
19             "template": "FREEFORM",
20             "state": {
21               "entry": [
22                 {
23                   "key": "CustomerContextState",
24                   "value": {
25                     "stateKey": {
26                       "parentKeyName": "CustomerContextPolicy",
27                       "parentKeyVersion": "1.0.0",
28                       "parentLocalName": "NULL",
29                       "localName": "CustomerContextState"
30                     },
31                     "trigger": {
32                       "name": "CustomerContextEventIn",
33                       "version": "1.0.0"
34                     },
35                     "stateOutputs": {
36                       "entry": [
37                         {
38                           "key": "CustomerContextState_Output_Direct",
39                           "value": {
40                             "key": {
41                               "parentKeyName": "CustomerContextPolicy",
42                               "parentKeyVersion": "1.0.0",
43                               "parentLocalName": "CustomerContextState",
44                               "localName": "CustomerContextState_Output_Direct"
45                             },
46                             "outgoingEvent": {
47                               "name": "ReportOut",
48                               "version": "1.0.0"
49                             },
50                             "outgoingEventReference": [
51                               {
52                                 "name": "ReportOut",
53                                 "version": "1.0.0"
54                               }
55                             ],
56                             "nextState": {
57                               "parentKeyName": "NULL",
58                               "parentKeyVersion": "0.0.0",
59                               "parentLocalName": "NULL",
60                               "localName": "NULL"
61                             }
62                           }
63                         }
64                       ]
65                     },
66                     "contextAlbumReference": [],
67                     "taskSelectionLogic": {
68                       "key": {
69                         "parentKeyName": "NULL",
70                         "parentKeyVersion": "0.0.0",
71                         "parentLocalName": "NULL",
72                         "localName": "NULL"
73                       },
74                       "logicFlavour": "UNDEFINED",
75                       "logic": ""
76                     },
77                     "stateFinalizerLogicMap": {
78                       "entry": []
79                     },
80                     "defaultTask": {
81                       "name": "CustomerContextTask",
82                       "version": "1.0.0"
83                     },
84                     "taskReferences": {
85                       "entry": [
86                         {
87                           "key": {
88                             "name": "CustomerContextTask",
89                             "version": "1.0.0"
90                           },
91                           "value": {
92                             "key": {
93                               "parentKeyName": "CustomerContextPolicy",
94                               "parentKeyVersion": "1.0.0",
95                               "parentLocalName": "CustomerContextState",
96                               "localName": "doContext"
97                             },
98                             "outputType": "DIRECT",
99                             "output": {
100                               "parentKeyName": "CustomerContextPolicy",
101                               "parentKeyVersion": "1.0.0",
102                               "parentLocalName": "CustomerContextState",
103                               "localName": "CustomerContextState_Output_Direct"
104                             }
105                           }
106                         }
107                       ]
108                     }
109                   }
110                 }
111               ]
112             },
113             "firstState": "CustomerContextState"
114           }
115         },
116         {
117           "key": {
118             "name": "EdgeContextPolicy",
119             "version": "1.0.0"
120           },
121           "value": {
122             "policyKey": {
123               "name": "EdgeContextPolicy",
124               "version": "1.0.0"
125             },
126             "template": "FREEFORM",
127             "state": {
128               "entry": [
129                 {
130                   "key": "EdgeContextState",
131                   "value": {
132                     "stateKey": {
133                       "parentKeyName": "EdgeContextPolicy",
134                       "parentKeyVersion": "1.0.0",
135                       "parentLocalName": "NULL",
136                       "localName": "EdgeContextState"
137                     },
138                     "trigger": {
139                       "name": "EdgeContextEventIn",
140                       "version": "1.0.0"
141                     },
142                     "stateOutputs": {
143                       "entry": [
144                         {
145                           "key": "EdgeContextState_Output_Direct",
146                           "value": {
147                             "key": {
148                               "parentKeyName": "EdgeContextPolicy",
149                               "parentKeyVersion": "1.0.0",
150                               "parentLocalName": "EdgeContextState",
151                               "localName": "EdgeContextState_Output_Direct"
152                             },
153                             "outgoingEvent": {
154                               "name": "ReportOut",
155                               "version": "1.0.0"
156                             },
157                             "outgoingEventReference": [
158                               {
159                                 "name": "ReportOut",
160                                 "version": "1.0.0"
161                               }
162                             ],
163                             "nextState": {
164                               "parentKeyName": "NULL",
165                               "parentKeyVersion": "0.0.0",
166                               "parentLocalName": "NULL",
167                               "localName": "NULL"
168                             }
169                           }
170                         }
171                       ]
172                     },
173                     "contextAlbumReference": [],
174                     "taskSelectionLogic": {
175                       "key": {
176                         "parentKeyName": "NULL",
177                         "parentKeyVersion": "0.0.0",
178                         "parentLocalName": "NULL",
179                         "localName": "NULL"
180                       },
181                       "logicFlavour": "UNDEFINED",
182                       "logic": ""
183                     },
184                     "stateFinalizerLogicMap": {
185                       "entry": []
186                     },
187                     "defaultTask": {
188                       "name": "EdgeContextTask",
189                       "version": "1.0.0"
190                     },
191                     "taskReferences": {
192                       "entry": [
193                         {
194                           "key": {
195                             "name": "EdgeContextTask",
196                             "version": "1.0.0"
197                           },
198                           "value": {
199                             "key": {
200                               "parentKeyName": "EdgeContextPolicy",
201                               "parentKeyVersion": "1.0.0",
202                               "parentLocalName": "EdgeContextState",
203                               "localName": "doContext"
204                             },
205                             "outputType": "DIRECT",
206                             "output": {
207                               "parentKeyName": "EdgeContextPolicy",
208                               "parentKeyVersion": "1.0.0",
209                               "parentLocalName": "EdgeContextState",
210                               "localName": "EdgeContextState_Output_Direct"
211                             }
212                           }
213                         }
214                       ]
215                     }
216                   }
217                 }
218               ]
219             },
220             "firstState": "EdgeContextState"
221           }
222         },
223         {
224           "key": {
225             "name": "NodeContextPolicy",
226             "version": "1.0.0"
227           },
228           "value": {
229             "policyKey": {
230               "name": "NodeContextPolicy",
231               "version": "1.0.0"
232             },
233             "template": "FREEFORM",
234             "state": {
235               "entry": [
236                 {
237                   "key": "NodeContextState",
238                   "value": {
239                     "stateKey": {
240                       "parentKeyName": "NodeContextPolicy",
241                       "parentKeyVersion": "1.0.0",
242                       "parentLocalName": "NULL",
243                       "localName": "NodeContextState"
244                     },
245                     "trigger": {
246                       "name": "NodeContextEventIn",
247                       "version": "1.0.0"
248                     },
249                     "stateOutputs": {
250                       "entry": [
251                         {
252                           "key": "NodeContextState_Output_Direct",
253                           "value": {
254                             "key": {
255                               "parentKeyName": "NodeContextPolicy",
256                               "parentKeyVersion": "1.0.0",
257                               "parentLocalName": "NodeContextState",
258                               "localName": "NodeContextState_Output_Direct"
259                             },
260                             "outgoingEvent": {
261                               "name": "ReportOut",
262                               "version": "1.0.0"
263                             },
264                             "outgoingEventReference": [
265                               {
266                                 "name": "ReportOut",
267                                 "version": "1.0.0"
268                               }
269                             ],
270                             "nextState": {
271                               "parentKeyName": "NULL",
272                               "parentKeyVersion": "0.0.0",
273                               "parentLocalName": "NULL",
274                               "localName": "NULL"
275                             }
276                           }
277                         }
278                       ]
279                     },
280                     "contextAlbumReference": [],
281                     "taskSelectionLogic": {
282                       "key": {
283                         "parentKeyName": "NULL",
284                         "parentKeyVersion": "0.0.0",
285                         "parentLocalName": "NULL",
286                         "localName": "NULL"
287                       },
288                       "logicFlavour": "UNDEFINED",
289                       "logic": ""
290                     },
291                     "stateFinalizerLogicMap": {
292                       "entry": []
293                     },
294                     "defaultTask": {
295                       "name": "NodeContextTask",
296                       "version": "1.0.0"
297                     },
298                     "taskReferences": {
299                       "entry": [
300                         {
301                           "key": {
302                             "name": "NodeContextTask",
303                             "version": "1.0.0"
304                           },
305                           "value": {
306                             "key": {
307                               "parentKeyName": "NodeContextPolicy",
308                               "parentKeyVersion": "1.0.0",
309                               "parentLocalName": "NodeContextState",
310                               "localName": "doContext"
311                             },
312                             "outputType": "DIRECT",
313                             "output": {
314                               "parentKeyName": "NodeContextPolicy",
315                               "parentKeyVersion": "1.0.0",
316                               "parentLocalName": "NodeContextState",
317                               "localName": "NodeContextState_Output_Direct"
318                             }
319                           }
320                         }
321                       ]
322                     }
323                   }
324                 }
325               ]
326             },
327             "firstState": "NodeContextState"
328           }
329         },
330         {
331           "key": {
332             "name": "VpnSlaPolicy",
333             "version": "1.0.0"
334           },
335           "value": {
336             "policyKey": {
337               "name": "VpnSlaPolicy",
338               "version": "1.0.0"
339             },
340             "template": "FREEFORM",
341             "state": {
342               "entry": [
343                 {
344                   "key": "VpmSlaPolicyEstablishState",
345                   "value": {
346                     "stateKey": {
347                       "parentKeyName": "VpnSlaPolicy",
348                       "parentKeyVersion": "1.0.0",
349                       "parentLocalName": "NULL",
350                       "localName": "VpmSlaPolicyEstablishState"
351                     },
352                     "trigger": {
353                       "name": "VpnSlaMatchOut",
354                       "version": "1.0.0"
355                     },
356                     "stateOutputs": {
357                       "entry": [
358                         {
359                           "key": "VpnSlaPolicyEstablish_Output_Direct",
360                           "value": {
361                             "key": {
362                               "parentKeyName": "VpnSlaPolicy",
363                               "parentKeyVersion": "1.0.0",
364                               "parentLocalName": "VpmSlaPolicyEstablishState",
365                               "localName": "VpnSlaPolicyEstablish_Output_Direct"
366                             },
367                             "outgoingEvent": {
368                               "name": "VpnSlaEstablishOut",
369                               "version": "1.0.0"
370                             },
371                             "outgoingEventReference": [
372                               {
373                                 "name": "VpnSlaEstablishOut",
374                                 "version": "1.0.0"
375                               }
376                             ],
377                             "nextState": {
378                               "parentKeyName": "VpnSlaPolicy",
379                               "parentKeyVersion": "1.0.0",
380                               "parentLocalName": "NULL",
381                               "localName": "VpnSlaPolicyDecideState"
382                             }
383                           }
384                         }
385                       ]
386                     },
387                     "contextAlbumReference": [],
388                     "taskSelectionLogic": {
389                       "key": {
390                         "parentKeyName": "NULL",
391                         "parentKeyVersion": "0.0.0",
392                         "parentLocalName": "NULL",
393                         "localName": "NULL"
394                       },
395                       "logicFlavour": "UNDEFINED",
396                       "logic": ""
397                     },
398                     "stateFinalizerLogicMap": {
399                       "entry": []
400                     },
401                     "defaultTask": {
402                       "name": "VpnSlaPolicyEstablishTask",
403                       "version": "1.0.0"
404                     },
405                     "taskReferences": {
406                       "entry": [
407                         {
408                           "key": {
409                             "name": "VpnSlaPolicyEstablishTask",
410                             "version": "1.0.0"
411                           },
412                           "value": {
413                             "key": {
414                               "parentKeyName": "VpnSlaPolicy",
415                               "parentKeyVersion": "1.0.0",
416                               "parentLocalName": "VpmSlaPolicyEstablishState",
417                               "localName": "establish"
418                             },
419                             "outputType": "DIRECT",
420                             "output": {
421                               "parentKeyName": "VpnSlaPolicy",
422                               "parentKeyVersion": "1.0.0",
423                               "parentLocalName": "VpmSlaPolicyEstablishState",
424                               "localName": "VpnSlaPolicyEstablish_Output_Direct"
425                             }
426                           }
427                         }
428                       ]
429                     }
430                   }
431                 },
432                 {
433                   "key": "VpnSlaPolicyActState",
434                   "value": {
435                     "stateKey": {
436                       "parentKeyName": "VpnSlaPolicy",
437                       "parentKeyVersion": "1.0.0",
438                       "parentLocalName": "NULL",
439                       "localName": "VpnSlaPolicyActState"
440                     },
441                     "trigger": {
442                       "name": "VpnSlaDecideOut",
443                       "version": "1.0.0"
444                     },
445                     "stateOutputs": {
446                       "entry": [
447                         {
448                           "key": "SlaPolicyAct_Output_Direct",
449                           "value": {
450                             "key": {
451                               "parentKeyName": "VpnSlaPolicy",
452                               "parentKeyVersion": "1.0.0",
453                               "parentLocalName": "VpnSlaPolicyActState",
454                               "localName": "SlaPolicyAct_Output_Direct"
455                             },
456                             "outgoingEvent": {
457                               "name": "VpnSlaActOut",
458                               "version": "1.0.0"
459                             },
460                             "outgoingEventReference": [
461                               {
462                                 "name": "VpnSlaActOut",
463                                 "version": "1.0.0"
464                               }
465                             ],
466                             "nextState": {
467                               "parentKeyName": "NULL",
468                               "parentKeyVersion": "0.0.0",
469                               "parentLocalName": "NULL",
470                               "localName": "NULL"
471                             }
472                           }
473                         }
474                       ]
475                     },
476                     "contextAlbumReference": [],
477                     "taskSelectionLogic": {
478                       "key": {
479                         "parentKeyName": "NULL",
480                         "parentKeyVersion": "0.0.0",
481                         "parentLocalName": "NULL",
482                         "localName": "NULL"
483                       },
484                       "logicFlavour": "UNDEFINED",
485                       "logic": ""
486                     },
487                     "stateFinalizerLogicMap": {
488                       "entry": []
489                     },
490                     "defaultTask": {
491                       "name": "VpnSlaPolicyActTask",
492                       "version": "1.0.0"
493                     },
494                     "taskReferences": {
495                       "entry": [
496                         {
497                           "key": {
498                             "name": "VpnSlaPolicyActTask",
499                             "version": "1.0.0"
500                           },
501                           "value": {
502                             "key": {
503                               "parentKeyName": "VpnSlaPolicy",
504                               "parentKeyVersion": "1.0.0",
505                               "parentLocalName": "VpnSlaPolicyActState",
506                               "localName": "act"
507                             },
508                             "outputType": "DIRECT",
509                             "output": {
510                               "parentKeyName": "VpnSlaPolicy",
511                               "parentKeyVersion": "1.0.0",
512                               "parentLocalName": "VpnSlaPolicyActState",
513                               "localName": "SlaPolicyAct_Output_Direct"
514                             }
515                           }
516                         }
517                       ]
518                     }
519                   }
520                 },
521                 {
522                   "key": "VpnSlaPolicyDecideState",
523                   "value": {
524                     "stateKey": {
525                       "parentKeyName": "VpnSlaPolicy",
526                       "parentKeyVersion": "1.0.0",
527                       "parentLocalName": "NULL",
528                       "localName": "VpnSlaPolicyDecideState"
529                     },
530                     "trigger": {
531                       "name": "VpnSlaEstablishOut",
532                       "version": "1.0.0"
533                     },
534                     "stateOutputs": {
535                       "entry": [
536                         {
537                           "key": "VpnSlaPolicyDecide_Output_Direct",
538                           "value": {
539                             "key": {
540                               "parentKeyName": "VpnSlaPolicy",
541                               "parentKeyVersion": "1.0.0",
542                               "parentLocalName": "VpnSlaPolicyDecideState",
543                               "localName": "VpnSlaPolicyDecide_Output_Direct"
544                             },
545                             "outgoingEvent": {
546                               "name": "VpnSlaDecideOut",
547                               "version": "1.0.0"
548                             },
549                             "outgoingEventReference": [
550                               {
551                                 "name": "VpnSlaDecideOut",
552                                 "version": "1.0.0"
553                               }
554                             ],
555                             "nextState": {
556                               "parentKeyName": "VpnSlaPolicy",
557                               "parentKeyVersion": "1.0.0",
558                               "parentLocalName": "NULL",
559                               "localName": "VpnSlaPolicyActState"
560                             }
561                           }
562                         }
563                       ]
564                     },
565                     "contextAlbumReference": [
566                       {
567                         "name": "albumProblemMap",
568                         "version": "0.0.1"
569                       }
570                     ],
571                     "taskSelectionLogic": {
572                       "key": {
573                         "parentKeyName": "VpnSlaPolicy",
574                         "parentKeyVersion": "1.0.0",
575                         "parentLocalName": "VpnSlaPolicyDecideState",
576                         "localName": "TaskSelectionLogic"
577                       },
578                       "logicFlavour": "JAVASCRIPT",
579                       "logic": "/*\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_START\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n *  Modifications Copyright (C) 2020 Nordix Foundation.\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_END\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n */\n\nimportClass(org.slf4j.LoggerFactory);\n\nvar logger \u003d executor.logger;\nlogger.trace(\"start: \" + executor.subject.id + \" - TSL\");\n\nvar rootLogger \u003d LoggerFactory.getLogger(logger.ROOT_LOGGER_NAME);\n\nvar ifSituation \u003d executor.inFields[\"situation\"];\n\nvar albumProblemMap \u003d executor.getContextAlbum(\"albumProblemMap\");\n\nvar returnValue \u003d true;\nif (ifSituation.get(\"problemID\") \u003d\u003d \"NONE\") {\n    logger.trace(\"-- situation has no problem, selecting \u003cVpnSlaPolicyDecideNoneTask\u003e\");\n    executor.subject.getTaskKey(\"VpnSlaPolicyDecideNoneTask\").copyTo(executor.selectedTask);\n} else if (albumProblemMap.get(ifSituation.get(\"problemID\")).get(\"status\") \u003d\u003d \"SOLVED\") {\n    logger.trace(\"-- situation is solved, selecting \u003cVpnSlaPolicyDecideSolvedTask\u003e\");\n    executor.subject.getTaskKey(\"VpnSlaPolicyDecideSolvedTask\").copyTo(executor.selectedTask);\n} else if (ifSituation.get(\"violatedSLAs\") !\u003d null \u0026\u0026 ifSituation.get(\"violatedSLAs\").size() \u003e 0) {\n    logger.trace(\"-- situation is problem with violations, selecting \u003cVpnSlaPolicyDecidePriorityTask\u003e\");\n    executor.subject.getTaskKey(\"VpnSlaPolicyDecidePriorityTask\").copyTo(executor.selectedTask);\n} else if (ifSituation.get(\"violatedSLAs\") !\u003d null \u0026\u0026 ifSituation.get(\"violatedSLAs\").size() \u003d\u003d 0) {\n    logger.trace(\"-- situation is problem without violations, selecting \u003cVpnSlaPolicyDecideSlaTask\u003e\");\n    executor.subject.getTaskKey(\"VpnSlaPolicyDecideSlaTask\").copyTo(executor.selectedTask);\n} else {\n    logger.error(\"-- detected unknown decision for situation \u003c\" + ifSituation.get(\"problemID\") + \"\u003e\");\n    rootLogger.error(executor.subject.id + \" \" + \"-- detected unknown decision for situation \u003c\"\n            + ifSituation.get(\"problemID\") + \"\u003e\");\n    returnValue \u003d false;\n}\n\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".d-tsl\");\n\nreturnValue;"
580                     },
581                     "stateFinalizerLogicMap": {
582                       "entry": []
583                     },
584                     "defaultTask": {
585                       "name": "VpnSlaPolicyDecideSlaTask",
586                       "version": "1.0.0"
587                     },
588                     "taskReferences": {
589                       "entry": [
590                         {
591                           "key": {
592                             "name": "VpnSlaPolicyDecideNoneTask",
593                             "version": "1.0.0"
594                           },
595                           "value": {
596                             "key": {
597                               "parentKeyName": "VpnSlaPolicy",
598                               "parentKeyVersion": "1.0.0",
599                               "parentLocalName": "VpnSlaPolicyDecideState",
600                               "localName": "decideNone"
601                             },
602                             "outputType": "DIRECT",
603                             "output": {
604                               "parentKeyName": "VpnSlaPolicy",
605                               "parentKeyVersion": "1.0.0",
606                               "parentLocalName": "VpnSlaPolicyDecideState",
607                               "localName": "VpnSlaPolicyDecide_Output_Direct"
608                             }
609                           }
610                         },
611                         {
612                           "key": {
613                             "name": "VpnSlaPolicyDecidePriorityTask",
614                             "version": "1.0.0"
615                           },
616                           "value": {
617                             "key": {
618                               "parentKeyName": "VpnSlaPolicy",
619                               "parentKeyVersion": "1.0.0",
620                               "parentLocalName": "VpnSlaPolicyDecideState",
621                               "localName": "decidePriority"
622                             },
623                             "outputType": "DIRECT",
624                             "output": {
625                               "parentKeyName": "VpnSlaPolicy",
626                               "parentKeyVersion": "1.0.0",
627                               "parentLocalName": "VpnSlaPolicyDecideState",
628                               "localName": "VpnSlaPolicyDecide_Output_Direct"
629                             }
630                           }
631                         },
632                         {
633                           "key": {
634                             "name": "VpnSlaPolicyDecideSlaTask",
635                             "version": "1.0.0"
636                           },
637                           "value": {
638                             "key": {
639                               "parentKeyName": "VpnSlaPolicy",
640                               "parentKeyVersion": "1.0.0",
641                               "parentLocalName": "VpnSlaPolicyDecideState",
642                               "localName": "decideSla"
643                             },
644                             "outputType": "DIRECT",
645                             "output": {
646                               "parentKeyName": "VpnSlaPolicy",
647                               "parentKeyVersion": "1.0.0",
648                               "parentLocalName": "VpnSlaPolicyDecideState",
649                               "localName": "VpnSlaPolicyDecide_Output_Direct"
650                             }
651                           }
652                         },
653                         {
654                           "key": {
655                             "name": "VpnSlaPolicyDecideSolvedTask",
656                             "version": "1.0.0"
657                           },
658                           "value": {
659                             "key": {
660                               "parentKeyName": "VpnSlaPolicy",
661                               "parentKeyVersion": "1.0.0",
662                               "parentLocalName": "VpnSlaPolicyDecideState",
663                               "localName": "decideNone"
664                             },
665                             "outputType": "DIRECT",
666                             "output": {
667                               "parentKeyName": "VpnSlaPolicy",
668                               "parentKeyVersion": "1.0.0",
669                               "parentLocalName": "VpnSlaPolicyDecideState",
670                               "localName": "VpnSlaPolicyDecide_Output_Direct"
671                             }
672                           }
673                         }
674                       ]
675                     }
676                   }
677                 },
678                 {
679                   "key": "VpnSlaPolicyMatchState",
680                   "value": {
681                     "stateKey": {
682                       "parentKeyName": "VpnSlaPolicy",
683                       "parentKeyVersion": "1.0.0",
684                       "parentLocalName": "NULL",
685                       "localName": "VpnSlaPolicyMatchState"
686                     },
687                     "trigger": {
688                       "name": "VpnSlaTrigger",
689                       "version": "1.0.0"
690                     },
691                     "stateOutputs": {
692                       "entry": [
693                         {
694                           "key": "VpnSlaPolicyMatch_Output_Direct",
695                           "value": {
696                             "key": {
697                               "parentKeyName": "VpnSlaPolicy",
698                               "parentKeyVersion": "1.0.0",
699                               "parentLocalName": "VpnSlaPolicyMatchState",
700                               "localName": "VpnSlaPolicyMatch_Output_Direct"
701                             },
702                             "outgoingEvent": {
703                               "name": "VpnSlaMatchOut",
704                               "version": "1.0.0"
705                             },
706                             "outgoingEventReference": [
707                               {
708                                 "name": "VpnSlaMatchOut",
709                                 "version": "1.0.0"
710                               }
711                             ],
712                             "nextState": {
713                               "parentKeyName": "VpnSlaPolicy",
714                               "parentKeyVersion": "1.0.0",
715                               "parentLocalName": "NULL",
716                               "localName": "VpmSlaPolicyEstablishState"
717                             }
718                           }
719                         }
720                       ]
721                     },
722                     "contextAlbumReference": [],
723                     "taskSelectionLogic": {
724                       "key": {
725                         "parentKeyName": "NULL",
726                         "parentKeyVersion": "0.0.0",
727                         "parentLocalName": "NULL",
728                         "localName": "NULL"
729                       },
730                       "logicFlavour": "UNDEFINED",
731                       "logic": ""
732                     },
733                     "stateFinalizerLogicMap": {
734                       "entry": []
735                     },
736                     "defaultTask": {
737                       "name": "VpnSlaPolicyMatchTask",
738                       "version": "1.0.0"
739                     },
740                     "taskReferences": {
741                       "entry": [
742                         {
743                           "key": {
744                             "name": "VpnSlaPolicyMatchTask",
745                             "version": "1.0.0"
746                           },
747                           "value": {
748                             "key": {
749                               "parentKeyName": "VpnSlaPolicy",
750                               "parentKeyVersion": "1.0.0",
751                               "parentLocalName": "VpnSlaPolicyMatchState",
752                               "localName": "match"
753                             },
754                             "outputType": "DIRECT",
755                             "output": {
756                               "parentKeyName": "VpnSlaPolicy",
757                               "parentKeyVersion": "1.0.0",
758                               "parentLocalName": "VpnSlaPolicyMatchState",
759                               "localName": "VpnSlaPolicyMatch_Output_Direct"
760                             }
761                           }
762                         }
763                       ]
764                     }
765                   }
766                 }
767               ]
768             },
769             "firstState": "VpnSlaPolicyMatchState"
770           }
771         }
772       ]
773     }
774   },
775   "tasks": {
776     "key": {
777       "name": "PCVS-VpnSla_Tasks",
778       "version": "1.0.0"
779     },
780     "taskMap": {
781       "entry": [
782         {
783           "key": {
784             "name": "CustomerContextTask",
785             "version": "1.0.0"
786           },
787           "value": {
788             "key": {
789               "name": "CustomerContextTask",
790               "version": "1.0.0"
791             },
792             "inputEvent": {
793               "key": {
794                 "name": "CustomerContextEventIn",
795                 "version": "1.0.0"
796               },
797               "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
798               "source": "CtxtManagement",
799               "target": "APEX",
800               "parameter": {
801                 "entry": [
802                   {
803                     "key": "customerName",
804                     "value": {
805                       "key": {
806                         "parentKeyName": "CustomerContextEventIn",
807                         "parentKeyVersion": "1.0.0",
808                         "parentLocalName": "NULL",
809                         "localName": "customerName"
810                       },
811                       "fieldSchemaKey": {
812                         "name": "ctxtCustomerNameDecl",
813                         "version": "1.0.0"
814                       },
815                       "optional": false
816                     }
817                   },
818                   {
819                     "key": "dtSLA",
820                     "value": {
821                       "key": {
822                         "parentKeyName": "CustomerContextEventIn",
823                         "parentKeyVersion": "1.0.0",
824                         "parentLocalName": "NULL",
825                         "localName": "dtSLA"
826                       },
827                       "fieldSchemaKey": {
828                         "name": "ctxtCustomerDowntimeSLADecl",
829                         "version": "1.0.0"
830                       },
831                       "optional": false
832                     }
833                   },
834                   {
835                     "key": "dtYTD",
836                     "value": {
837                       "key": {
838                         "parentKeyName": "CustomerContextEventIn",
839                         "parentKeyVersion": "1.0.0",
840                         "parentLocalName": "NULL",
841                         "localName": "dtYTD"
842                       },
843                       "fieldSchemaKey": {
844                         "name": "ctxtCustomerDowntimeYTDDecl",
845                         "version": "1.0.0"
846                       },
847                       "optional": false
848                     }
849                   },
850                   {
851                     "key": "links",
852                     "value": {
853                       "key": {
854                         "parentKeyName": "CustomerContextEventIn",
855                         "parentKeyVersion": "1.0.0",
856                         "parentLocalName": "NULL",
857                         "localName": "links"
858                       },
859                       "fieldSchemaKey": {
860                         "name": "ctxtCustomerLinksDecl",
861                         "version": "1.0.0"
862                       },
863                       "optional": false
864                     }
865                   },
866                   {
867                     "key": "priority",
868                     "value": {
869                       "key": {
870                         "parentKeyName": "CustomerContextEventIn",
871                         "parentKeyVersion": "1.0.0",
872                         "parentLocalName": "NULL",
873                         "localName": "priority"
874                       },
875                       "fieldSchemaKey": {
876                         "name": "ctxtCustomerPriorityDecl",
877                         "version": "1.0.0"
878                       },
879                       "optional": false
880                     }
881                   },
882                   {
883                     "key": "satisfaction",
884                     "value": {
885                       "key": {
886                         "parentKeyName": "CustomerContextEventIn",
887                         "parentKeyVersion": "1.0.0",
888                         "parentLocalName": "NULL",
889                         "localName": "satisfaction"
890                       },
891                       "fieldSchemaKey": {
892                         "name": "ctxtCustomerSatisfactionDecl",
893                         "version": "1.0.0"
894                       },
895                       "optional": false
896                     }
897                   }
898                 ]
899               },
900               "toscaPolicyState": ""
901             },
902             "outputEvents": {
903               "entry": [
904                 {
905                   "key": "ReportOut",
906                   "value": {
907                     "key": {
908                       "name": "ReportOut",
909                       "version": "1.0.0"
910                     },
911                     "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
912                     "source": "APEX",
913                     "target": "CtxtManagement",
914                     "parameter": {
915                       "entry": [
916                         {
917                           "key": "report",
918                           "value": {
919                             "key": {
920                               "parentKeyName": "ReportOut",
921                               "parentKeyVersion": "1.0.0",
922                               "parentLocalName": "NULL",
923                               "localName": "report"
924                             },
925                             "fieldSchemaKey": {
926                               "name": "reportDecl",
927                               "version": "1.0.0"
928                             },
929                             "optional": false
930                           }
931                         }
932                       ]
933                     },
934                     "toscaPolicyState": ""
935                   }
936                 }
937               ]
938             },
939             "taskParameters": {
940               "entry": []
941             },
942             "contextAlbumReference": [
943               {
944                 "name": "albumCustomerMap",
945                 "version": "0.0.1"
946               },
947               {
948                 "name": "albumTopoEdges",
949                 "version": "0.0.1"
950               }
951             ],
952             "taskLogic": {
953               "key": {
954                 "parentKeyName": "CustomerContextTask",
955                 "parentKeyVersion": "1.0.0",
956                 "parentLocalName": "NULL",
957                 "localName": "TaskLogic"
958               },
959               "logicFlavour": "JAVASCRIPT",
960               "logic": "/*\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_START\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n *  Modifications Copyright (C) 2020 Nordix Foundation.\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_END\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n */\n\nvar logger \u003d executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar ifCustomerName \u003d executor.inFields[\"customerName\"];\nvar ifLinks \u003d executor.inFields[\"links\"];\n\nlogger.trace(\"-- got infields, testing existing customer\");\nvar ctxtCustomer \u003d executor.getContextAlbum(\"albumCustomerMap\").get(ifCustomerName);\nif (ctxtCustomer !\u003d null) {\n    executor.getContextAlbum(\"albumCustomerMap\").remove(ifCustomerName);\n    logger.trace(\"-- removed customer: \u003c\" + ifCustomerName + \"\u003e\");\n}\n\nlogger.trace(\"-- creating customer: \u003c\" + ifCustomerName + \"\u003e\");\nvar links \u003d new Array();\nfor (var i \u003d 0; i \u003c ifLinks.split(\" \").length; i++) {\n    var link \u003d executor.getContextAlbum(\"albumTopoEdges\").get(ifLinks.split(\" \")[i]);\n    if (link !\u003d null) {\n        logger.trace(\"-- link: \u003c\" + ifLinks.split(\" \")[i] + \"\u003e\");\n        links.push(ifLinks.split(\" \")[i]);\n    } else {\n        logger.trace(\"-- unknown link: \u003c\" + ifLinks.split(\" \")[i] + \"\u003e for customer \u003c\" + ifCustomerName + \"\u003e\");\n    }\n}\nlogger.trace(\"-- links: \u003c\" + links + \"\u003e\");\nctxtCustomer \u003d \"{customerName:\" + ifCustomerName + \", dtSLA:\" + executor.inFields[\"dtSLA\"] + \", dtYTD:\"\n        + executor.inFields[\"dtYTD\"] + \", priority:\" + executor.inFields[\"priority\"] + \", satisfaction:\"\n        + executor.inFields[\"satisfaction\"] + \", links:[\" + links + \"]}\";\n\nexecutor.getContextAlbum(\"albumCustomerMap\").put(ifCustomerName, ctxtCustomer);\n\nif (logger.isTraceEnabled()) {\n    logger.trace(\"   \u003e\u003e *** Customers ***\");\n    if (executor.getContextAlbum(\"albumCustomerMap\") !\u003d null) {\n        for (var i \u003d 0; i \u003c executor.getContextAlbum(\"albumCustomerMap\").values().size(); i++) {\n            logger.trace(\"   \u003e\u003e \u003e\u003e \" + executor.getContextAlbum(\"albumCustomerMap\").values().get(i).get(\"customerName\")\n                    + \" : \" + \"dtSLA\u003d\" + executor.getContextAlbum(\"albumCustomerMap\").values().get(i).get(\"dtSLA\")\n                    + \" : \" + \"dtYTD\u003d\" + executor.getContextAlbum(\"albumCustomerMap\").values().get(i).get(\"dtYTD\")\n                    + \" : \" + \"links\u003d\" + executor.getContextAlbum(\"albumCustomerMap\").values().get(i).get(\"links\")\n                    + \" : \" + \"priority\u003d\"\n                    + executor.getContextAlbum(\"albumCustomerMap\").values().get(i).get(\"priority\") + \" : \"\n                    + \"satisfaction\u003d\"\n                    + executor.getContextAlbum(\"albumCustomerMap\").values().get(i).get(\"satisfaction\"));\n        }\n    } else {\n        logger.trace(\"   \u003e\u003e \u003e\u003e customer album is null\");\n    }\n}\n\nexecutor.outFields[\"report\"] \u003d \"customer ctxt :: added customer: \" + ifCustomerName;\n\nlogger.info(\"vpnsla: ctxt added customer \" + ifCustomerName);\n\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".\");\n\ntrue;"
961             }
962           }
963         },
964         {
965           "key": {
966             "name": "EdgeContextTask",
967             "version": "1.0.0"
968           },
969           "value": {
970             "key": {
971               "name": "EdgeContextTask",
972               "version": "1.0.0"
973             },
974             "inputEvent": {
975               "key": {
976                 "name": "EdgeContextEventIn",
977                 "version": "1.0.0"
978               },
979               "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
980               "source": "CtxtManagement",
981               "target": "APEX",
982               "parameter": {
983                 "entry": [
984                   {
985                     "key": "edgeName",
986                     "value": {
987                       "key": {
988                         "parentKeyName": "EdgeContextEventIn",
989                         "parentKeyVersion": "1.0.0",
990                         "parentLocalName": "NULL",
991                         "localName": "edgeName"
992                       },
993                       "fieldSchemaKey": {
994                         "name": "ctxtEdgeNameDecl",
995                         "version": "1.0.0"
996                       },
997                       "optional": false
998                     }
999                   },
1000                   {
1001                     "key": "end",
1002                     "value": {
1003                       "key": {
1004                         "parentKeyName": "EdgeContextEventIn",
1005                         "parentKeyVersion": "1.0.0",
1006                         "parentLocalName": "NULL",
1007                         "localName": "end"
1008                       },
1009                       "fieldSchemaKey": {
1010                         "name": "ctxtEdgeEndDecl",
1011                         "version": "1.0.0"
1012                       },
1013                       "optional": false
1014                     }
1015                   },
1016                   {
1017                     "key": "start",
1018                     "value": {
1019                       "key": {
1020                         "parentKeyName": "EdgeContextEventIn",
1021                         "parentKeyVersion": "1.0.0",
1022                         "parentLocalName": "NULL",
1023                         "localName": "start"
1024                       },
1025                       "fieldSchemaKey": {
1026                         "name": "ctxtEdgeStartDecl",
1027                         "version": "1.0.0"
1028                       },
1029                       "optional": false
1030                     }
1031                   },
1032                   {
1033                     "key": "status",
1034                     "value": {
1035                       "key": {
1036                         "parentKeyName": "EdgeContextEventIn",
1037                         "parentKeyVersion": "1.0.0",
1038                         "parentLocalName": "NULL",
1039                         "localName": "status"
1040                       },
1041                       "fieldSchemaKey": {
1042                         "name": "ctxtEdgeStatusDecl",
1043                         "version": "1.0.0"
1044                       },
1045                       "optional": false
1046                     }
1047                   }
1048                 ]
1049               },
1050               "toscaPolicyState": ""
1051             },
1052             "outputEvents": {
1053               "entry": [
1054                 {
1055                   "key": "ReportOut",
1056                   "value": {
1057                     "key": {
1058                       "name": "ReportOut",
1059                       "version": "1.0.0"
1060                     },
1061                     "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
1062                     "source": "APEX",
1063                     "target": "CtxtManagement",
1064                     "parameter": {
1065                       "entry": [
1066                         {
1067                           "key": "report",
1068                           "value": {
1069                             "key": {
1070                               "parentKeyName": "ReportOut",
1071                               "parentKeyVersion": "1.0.0",
1072                               "parentLocalName": "NULL",
1073                               "localName": "report"
1074                             },
1075                             "fieldSchemaKey": {
1076                               "name": "reportDecl",
1077                               "version": "1.0.0"
1078                             },
1079                             "optional": false
1080                           }
1081                         }
1082                       ]
1083                     },
1084                     "toscaPolicyState": ""
1085                   }
1086                 }
1087               ]
1088             },
1089             "taskParameters": {
1090               "entry": []
1091             },
1092             "contextAlbumReference": [
1093               {
1094                 "name": "albumTopoEdges",
1095                 "version": "0.0.1"
1096               }
1097             ],
1098             "taskLogic": {
1099               "key": {
1100                 "parentKeyName": "EdgeContextTask",
1101                 "parentKeyVersion": "1.0.0",
1102                 "parentLocalName": "NULL",
1103                 "localName": "TaskLogic"
1104               },
1105               "logicFlavour": "JAVASCRIPT",
1106               "logic": "/*\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_START\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n *  Modifications Copyright (C) 2020 Nordix Foundation.\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_END\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n */\n\nvar logger \u003d executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar ifEdgeName \u003d executor.inFields[\"edgeName\"];\nvar ifEdgeStatus \u003d executor.inFields[\"status\"];\n\nvar albumTopoEdges \u003d executor.getContextAlbum(\"albumTopoEdges\");\n\nlogger.trace(\"-- got infields, testing existing edge\");\n\nvar ctxtEdge \u003d albumTopoEdges.get(ifEdgeName);\nif (ctxtEdge !\u003d null) {\n    albumTopoEdges.remove(ifEdgeName);\n    logger.trace(\"-- removed edge: \u003c\" + ifEdgeName + \"\u003e\");\n}\n\nlogger.trace(\"-- creating edge: \u003c\" + ifEdgeName + \"\u003e\");\nctxtEdge \u003d \"{name:\" + ifEdgeName + \", start:\" + executor.inFields[\"start\"] + \", end:\" + executor.inFields[\"end\"]\n        + \", active:\" + ifEdgeStatus + \"}\";\nalbumTopoEdges.put(ifEdgeName, ctxtEdge);\n\nif (logger.isTraceEnabled()) {\n    logger.trace(\"   \u003e\u003e *** Edges ***\");\n    if (albumTopoEdges !\u003d null) {\n        for (var i \u003d 0; i \u003c albumTopoEdges.values().size(); i++) {\n            logger.trace(\"   \u003e\u003e \u003e\u003e \" + albumTopoEdges.values().get(i).get(\"name\") + \" \\t \"\n                    + albumTopoEdges.values().get(i).get(\"start\") + \" --\u003e \" + albumTopoEdges.values().get(i).get(\"end\")\n                    + \" \\t \" + albumTopoEdges.values().get(i).get(\"active\"));\n        }\n    } else {\n        logger.trace(\"   \u003e\u003e \u003e\u003e edge album is null\");\n    }\n}\n\nexecutor.outFields[\"report\"] \u003d \"edge ctxt :: added edge \" + ifEdgeName;\n\nlogger.info(\"vpnsla: ctxt added edge \" + ifEdgeName);\n\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".\");\n\ntrue;"
1107             }
1108           }
1109         },
1110         {
1111           "key": {
1112             "name": "NodeContextTask",
1113             "version": "1.0.0"
1114           },
1115           "value": {
1116             "key": {
1117               "name": "NodeContextTask",
1118               "version": "1.0.0"
1119             },
1120             "inputEvent": {
1121               "key": {
1122                 "name": "NodeContextEventIn",
1123                 "version": "1.0.0"
1124               },
1125               "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
1126               "source": "CtxtManagement",
1127               "target": "APEX",
1128               "parameter": {
1129                 "entry": [
1130                   {
1131                     "key": "mininetName",
1132                     "value": {
1133                       "key": {
1134                         "parentKeyName": "NodeContextEventIn",
1135                         "parentKeyVersion": "1.0.0",
1136                         "parentLocalName": "NULL",
1137                         "localName": "mininetName"
1138                       },
1139                       "fieldSchemaKey": {
1140                         "name": "ctxtNodeMininetNameDecl",
1141                         "version": "1.0.0"
1142                       },
1143                       "optional": false
1144                     }
1145                   },
1146                   {
1147                     "key": "nodeName",
1148                     "value": {
1149                       "key": {
1150                         "parentKeyName": "NodeContextEventIn",
1151                         "parentKeyVersion": "1.0.0",
1152                         "parentLocalName": "NULL",
1153                         "localName": "nodeName"
1154                       },
1155                       "fieldSchemaKey": {
1156                         "name": "ctxtNodeNameDecl",
1157                         "version": "1.0.0"
1158                       },
1159                       "optional": false
1160                     }
1161                   }
1162                 ]
1163               },
1164               "toscaPolicyState": ""
1165             },
1166             "outputEvents": {
1167               "entry": [
1168                 {
1169                   "key": "ReportOut",
1170                   "value": {
1171                     "key": {
1172                       "name": "ReportOut",
1173                       "version": "1.0.0"
1174                     },
1175                     "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
1176                     "source": "APEX",
1177                     "target": "CtxtManagement",
1178                     "parameter": {
1179                       "entry": [
1180                         {
1181                           "key": "report",
1182                           "value": {
1183                             "key": {
1184                               "parentKeyName": "ReportOut",
1185                               "parentKeyVersion": "1.0.0",
1186                               "parentLocalName": "NULL",
1187                               "localName": "report"
1188                             },
1189                             "fieldSchemaKey": {
1190                               "name": "reportDecl",
1191                               "version": "1.0.0"
1192                             },
1193                             "optional": false
1194                           }
1195                         }
1196                       ]
1197                     },
1198                     "toscaPolicyState": ""
1199                   }
1200                 }
1201               ]
1202             },
1203             "taskParameters": {
1204               "entry": []
1205             },
1206             "contextAlbumReference": [
1207               {
1208                 "name": "albumTopoNodes",
1209                 "version": "0.0.1"
1210               }
1211             ],
1212             "taskLogic": {
1213               "key": {
1214                 "parentKeyName": "NodeContextTask",
1215                 "parentKeyVersion": "1.0.0",
1216                 "parentLocalName": "NULL",
1217                 "localName": "TaskLogic"
1218               },
1219               "logicFlavour": "JAVASCRIPT",
1220               "logic": "/*\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_START\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n *  Modifications Copyright (C) 2020 Nordix Foundation.\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_END\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n */\n\nvar logger \u003d executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar ifNodeName \u003d executor.inFields[\"nodeName\"];\nvar ifMininetName \u003d executor.inFields[\"mininetName\"];\n\nvar albumTopoNodes \u003d executor.getContextAlbum(\"albumTopoNodes\");\n\nlogger.trace(\"-- got infields, testing existing node\");\n\nvar ctxtNode \u003d albumTopoNodes.get(ifNodeName);\nif (ctxtNode !\u003d null) {\n    albumTopoNodes.remove(ifNodeName);\n    logger.trace(\"-- removed node: \u003c\" + ifNodeName + \"\u003e\");\n}\n\nlogger.trace(\"-- creating node: \u003c\" + ifNodeName + \"\u003e\");\nctxtNode \u003d \"{name:\" + ifNodeName + \", mnname:\" + ifMininetName + \"}\";\nalbumTopoNodes.put(ifNodeName, ctxtNode);\n\nif (logger.isTraceEnabled()) {\n    logger.trace(\"   \u003e\u003e *** Nodes ***\");\n    if (albumTopoNodes !\u003d null) {\n        for (var i \u003d 0; i \u003c albumTopoNodes.values().size(); i++) {\n            logger.trace(\"   \u003e\u003e \u003e\u003e \" + albumTopoNodes.values().get(i).get(\"name\") + \" : \"\n                    + albumTopoNodes.values().get(i).get(\"mnname\"));\n        }\n    } else {\n        logger.trace(\"   \u003e\u003e \u003e\u003e node album is null\");\n    }\n}\n\nexecutor.outFields[\"report\"] \u003d \"node ctxt :: added node \" + ifNodeName;\n\nlogger.info(\"vpnsla: ctxt added node \" + ifNodeName);\n\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".\");\n\ntrue;"
1221             }
1222           }
1223         },
1224         {
1225           "key": {
1226             "name": "VpnSlaPolicyActTask",
1227             "version": "1.0.0"
1228           },
1229           "value": {
1230             "key": {
1231               "name": "VpnSlaPolicyActTask",
1232               "version": "1.0.0"
1233             },
1234             "inputEvent": {
1235               "key": {
1236                 "name": "VpnSlaDecideOut",
1237                 "version": "1.0.0"
1238               },
1239               "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
1240               "source": "SlaDecide",
1241               "target": "SlaAct",
1242               "parameter": {
1243                 "entry": [
1244                   {
1245                     "key": "decision",
1246                     "value": {
1247                       "key": {
1248                         "parentKeyName": "VpnSlaDecideOut",
1249                         "parentKeyVersion": "1.0.0",
1250                         "parentLocalName": "NULL",
1251                         "localName": "decision"
1252                       },
1253                       "fieldSchemaKey": {
1254                         "name": "decideDecisionDecl",
1255                         "version": "1.0.0"
1256                       },
1257                       "optional": false
1258                     }
1259                   },
1260                   {
1261                     "key": "matchStart",
1262                     "value": {
1263                       "key": {
1264                         "parentKeyName": "VpnSlaDecideOut",
1265                         "parentKeyVersion": "1.0.0",
1266                         "parentLocalName": "NULL",
1267                         "localName": "matchStart"
1268                       },
1269                       "fieldSchemaKey": {
1270                         "name": "timestampDecl",
1271                         "version": "1.0.0"
1272                       },
1273                       "optional": false
1274                     }
1275                   }
1276                 ]
1277               },
1278               "toscaPolicyState": ""
1279             },
1280             "outputEvents": {
1281               "entry": [
1282                 {
1283                   "key": "VpnSlaActOut",
1284                   "value": {
1285                     "key": {
1286                       "name": "VpnSlaActOut",
1287                       "version": "1.0.0"
1288                     },
1289                     "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
1290                     "source": "SlaAct",
1291                     "target": "ActioningSystem",
1292                     "parameter": {
1293                       "entry": [
1294                         {
1295                           "key": "action",
1296                           "value": {
1297                             "key": {
1298                               "parentKeyName": "VpnSlaActOut",
1299                               "parentKeyVersion": "1.0.0",
1300                               "parentLocalName": "NULL",
1301                               "localName": "action"
1302                             },
1303                             "fieldSchemaKey": {
1304                               "name": "actionDecl",
1305                               "version": "1.0.0"
1306                             },
1307                             "optional": false
1308                           }
1309                         },
1310                         {
1311                           "key": "edgeName",
1312                           "value": {
1313                             "key": {
1314                               "parentKeyName": "VpnSlaActOut",
1315                               "parentKeyVersion": "1.0.0",
1316                               "parentLocalName": "NULL",
1317                               "localName": "edgeName"
1318                             },
1319                             "fieldSchemaKey": {
1320                               "name": "edgeNameDecl",
1321                               "version": "1.0.0"
1322                             },
1323                             "optional": false
1324                           }
1325                         }
1326                       ]
1327                     },
1328                     "toscaPolicyState": ""
1329                   }
1330                 }
1331               ]
1332             },
1333             "taskParameters": {
1334               "entry": []
1335             },
1336             "contextAlbumReference": [
1337               {
1338                 "name": "albumCustomerMap",
1339                 "version": "0.0.1"
1340               },
1341               {
1342                 "name": "albumProblemMap",
1343                 "version": "0.0.1"
1344               }
1345             ],
1346             "taskLogic": {
1347               "key": {
1348                 "parentKeyName": "VpnSlaPolicyActTask",
1349                 "parentKeyVersion": "1.0.0",
1350                 "parentLocalName": "NULL",
1351                 "localName": "TaskLogic"
1352               },
1353               "logicFlavour": "JAVASCRIPT",
1354               "logic": "/*\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_START\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n *  Modifications Copyright (C) 2020 Nordix Foundation.\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_END\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n */\n\nvar logger \u003d executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar ifDecision \u003d executor.inFields[\"decision\"];\nvar ifMatchStart \u003d executor.inFields[\"matchStart\"];\n\nvar albumCustomerMap \u003d executor.getContextAlbum(\"albumCustomerMap\");\nvar albumProblemMap \u003d executor.getContextAlbum(\"albumProblemMap\");\n\nswitch (ifDecision.get(\"decision\").toString()) {\ncase \"NONE\":\n    executor.outFields[\"edgeName\"] \u003d \"\";\n    executor.outFields[\"action\"] \u003d \"\";\n    break;\ncase \"IMPEDE\":\n    for (var i \u003d 0; i \u003c ifDecision.get(\"customers\").size(); i++) {\n        customer \u003d albumCustomerMap.get(ifDecision.get(\"customers\").get(i).toString());\n        executor.outFields[\"edgeName\"] \u003d customer.get(\"links\").get(0);\n        executor.outFields[\"action\"] \u003d \"firewall\";\n    }\n    break;\ncase \"REBUILD\":\n    // finally solved, remove problem\n    albumProblemMap.remove(ifDecision.get(\"problemID\"));\n    executor.outFields[\"edgeName\"] \u003d \"L10\"; // this is ###static###\n    executor.outFields[\"action\"] \u003d \"rebuild\"; // this is ###static###\n    break;\ndefault:\n\n}\n\nif (executor.outFields[\"action\"] !\u003d \"\") {\n    logger.info(\"vpnsla: action is to \" + executor.outFields[\"action\"] + \" \" + executor.outFields[\"edgeName\"]);\n} else {\n    logger.info(\"vpnsla: no action required\");\n}\n\nlogger.trace(\"-- outfields: \" + executor.outFields);\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".a\");\n\nvar now \u003d new Date().getTime();\nlogger.info(\"VPN SLA finished in \" + (now - ifMatchStart) + \" ms\");\n\ntrue;"
1355             }
1356           }
1357         },
1358         {
1359           "key": {
1360             "name": "VpnSlaPolicyDecideNoneTask",
1361             "version": "1.0.0"
1362           },
1363           "value": {
1364             "key": {
1365               "name": "VpnSlaPolicyDecideNoneTask",
1366               "version": "1.0.0"
1367             },
1368             "inputEvent": {
1369               "key": {
1370                 "name": "VpnSlaEstablishOut",
1371                 "version": "1.0.0"
1372               },
1373               "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
1374               "source": "SlaEstablish",
1375               "target": "SlaDecide",
1376               "parameter": {
1377                 "entry": [
1378                   {
1379                     "key": "matchStart",
1380                     "value": {
1381                       "key": {
1382                         "parentKeyName": "VpnSlaEstablishOut",
1383                         "parentKeyVersion": "1.0.0",
1384                         "parentLocalName": "NULL",
1385                         "localName": "matchStart"
1386                       },
1387                       "fieldSchemaKey": {
1388                         "name": "timestampDecl",
1389                         "version": "1.0.0"
1390                       },
1391                       "optional": false
1392                     }
1393                   },
1394                   {
1395                     "key": "situation",
1396                     "value": {
1397                       "key": {
1398                         "parentKeyName": "VpnSlaEstablishOut",
1399                         "parentKeyVersion": "1.0.0",
1400                         "parentLocalName": "NULL",
1401                         "localName": "situation"
1402                       },
1403                       "fieldSchemaKey": {
1404                         "name": "establishSituationDecl",
1405                         "version": "1.0.0"
1406                       },
1407                       "optional": false
1408                     }
1409                   }
1410                 ]
1411               },
1412               "toscaPolicyState": ""
1413             },
1414             "outputEvents": {
1415               "entry": [
1416                 {
1417                   "key": "VpnSlaDecideOut",
1418                   "value": {
1419                     "key": {
1420                       "name": "VpnSlaDecideOut",
1421                       "version": "1.0.0"
1422                     },
1423                     "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
1424                     "source": "SlaDecide",
1425                     "target": "SlaAct",
1426                     "parameter": {
1427                       "entry": [
1428                         {
1429                           "key": "decision",
1430                           "value": {
1431                             "key": {
1432                               "parentKeyName": "VpnSlaDecideOut",
1433                               "parentKeyVersion": "1.0.0",
1434                               "parentLocalName": "NULL",
1435                               "localName": "decision"
1436                             },
1437                             "fieldSchemaKey": {
1438                               "name": "decideDecisionDecl",
1439                               "version": "1.0.0"
1440                             },
1441                             "optional": false
1442                           }
1443                         },
1444                         {
1445                           "key": "matchStart",
1446                           "value": {
1447                             "key": {
1448                               "parentKeyName": "VpnSlaDecideOut",
1449                               "parentKeyVersion": "1.0.0",
1450                               "parentLocalName": "NULL",
1451                               "localName": "matchStart"
1452                             },
1453                             "fieldSchemaKey": {
1454                               "name": "timestampDecl",
1455                               "version": "1.0.0"
1456                             },
1457                             "optional": false
1458                           }
1459                         }
1460                       ]
1461                     },
1462                     "toscaPolicyState": ""
1463                   }
1464                 }
1465               ]
1466             },
1467             "taskParameters": {
1468               "entry": []
1469             },
1470             "contextAlbumReference": [],
1471             "taskLogic": {
1472               "key": {
1473                 "parentKeyName": "VpnSlaPolicyDecideNoneTask",
1474                 "parentKeyVersion": "1.0.0",
1475                 "parentLocalName": "NULL",
1476                 "localName": "TaskLogic"
1477               },
1478               "logicFlavour": "JAVASCRIPT",
1479               "logic": "/*\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_START\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n *  Modifications Copyright (C) 2020 Nordix Foundation.\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_END\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n */\n\nimportClass(org.slf4j.LoggerFactory);\n\nimportClass(java.util.ArrayList);\n\nimportClass(org.apache.avro.generic.GenericData.Array);\nimportClass(org.apache.avro.generic.GenericRecord);\nimportClass(org.apache.avro.Schema);\n\nvar logger \u003d executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar rootLogger \u003d LoggerFactory.getLogger(logger.ROOT_LOGGER_NAME);\n\nvar ifSituation \u003d executor.inFields[\"situation\"];\n\n// create outfiled for decision\nvar decision \u003d executor.subject.getOutFieldSchemaHelper(\"decision\").createNewInstance();\ndecision.put(\"description\", \"None, everything is ok\");\ndecision.put(\"decision\", \"NONE\");\ndecision.put(\"customers\", new ArrayList());\n\nvar returnValue \u003d true;\nif (ifSituation.get(\"problemID\") \u003d\u003d \"NONE\") {\n    logger.trace(\"-- no problem, everything ok\");\n} else {\n    logger.trace(\"-- wrong problemID \u003c\" + problemID + \"\u003e for NONE task, we should not be here\");\n    rootLogger.error(executor.subject.id + \" \" + \"-- wrong problemID \u003c\" + problemID\n            + \"\u003e for NONE task, we should not be here\");\n    returnValue \u003d false;\n}\n\nexecutor.outFields[\"decision\"] \u003d decision;\n\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".d-non\");\n\nreturnValue;"
1480             }
1481           }
1482         },
1483         {
1484           "key": {
1485             "name": "VpnSlaPolicyDecidePriorityTask",
1486             "version": "1.0.0"
1487           },
1488           "value": {
1489             "key": {
1490               "name": "VpnSlaPolicyDecidePriorityTask",
1491               "version": "1.0.0"
1492             },
1493             "inputEvent": {
1494               "key": {
1495                 "name": "VpnSlaEstablishOut",
1496                 "version": "1.0.0"
1497               },
1498               "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
1499               "source": "SlaEstablish",
1500               "target": "SlaDecide",
1501               "parameter": {
1502                 "entry": [
1503                   {
1504                     "key": "matchStart",
1505                     "value": {
1506                       "key": {
1507                         "parentKeyName": "VpnSlaEstablishOut",
1508                         "parentKeyVersion": "1.0.0",
1509                         "parentLocalName": "NULL",
1510                         "localName": "matchStart"
1511                       },
1512                       "fieldSchemaKey": {
1513                         "name": "timestampDecl",
1514                         "version": "1.0.0"
1515                       },
1516                       "optional": false
1517                     }
1518                   },
1519                   {
1520                     "key": "situation",
1521                     "value": {
1522                       "key": {
1523                         "parentKeyName": "VpnSlaEstablishOut",
1524                         "parentKeyVersion": "1.0.0",
1525                         "parentLocalName": "NULL",
1526                         "localName": "situation"
1527                       },
1528                       "fieldSchemaKey": {
1529                         "name": "establishSituationDecl",
1530                         "version": "1.0.0"
1531                       },
1532                       "optional": false
1533                     }
1534                   }
1535                 ]
1536               },
1537               "toscaPolicyState": ""
1538             },
1539             "outputEvents": {
1540               "entry": [
1541                 {
1542                   "key": "VpnSlaDecideOut",
1543                   "value": {
1544                     "key": {
1545                       "name": "VpnSlaDecideOut",
1546                       "version": "1.0.0"
1547                     },
1548                     "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
1549                     "source": "SlaDecide",
1550                     "target": "SlaAct",
1551                     "parameter": {
1552                       "entry": [
1553                         {
1554                           "key": "decision",
1555                           "value": {
1556                             "key": {
1557                               "parentKeyName": "VpnSlaDecideOut",
1558                               "parentKeyVersion": "1.0.0",
1559                               "parentLocalName": "NULL",
1560                               "localName": "decision"
1561                             },
1562                             "fieldSchemaKey": {
1563                               "name": "decideDecisionDecl",
1564                               "version": "1.0.0"
1565                             },
1566                             "optional": false
1567                           }
1568                         },
1569                         {
1570                           "key": "matchStart",
1571                           "value": {
1572                             "key": {
1573                               "parentKeyName": "VpnSlaDecideOut",
1574                               "parentKeyVersion": "1.0.0",
1575                               "parentLocalName": "NULL",
1576                               "localName": "matchStart"
1577                             },
1578                             "fieldSchemaKey": {
1579                               "name": "timestampDecl",
1580                               "version": "1.0.0"
1581                             },
1582                             "optional": false
1583                           }
1584                         }
1585                       ]
1586                     },
1587                     "toscaPolicyState": ""
1588                   }
1589                 }
1590               ]
1591             },
1592             "taskParameters": {
1593               "entry": []
1594             },
1595             "contextAlbumReference": [
1596               {
1597                 "name": "albumCustomerMap",
1598                 "version": "0.0.1"
1599               },
1600               {
1601                 "name": "albumProblemMap",
1602                 "version": "0.0.1"
1603               }
1604             ],
1605             "taskLogic": {
1606               "key": {
1607                 "parentKeyName": "VpnSlaPolicyDecidePriorityTask",
1608                 "parentKeyVersion": "1.0.0",
1609                 "parentLocalName": "NULL",
1610                 "localName": "TaskLogic"
1611               },
1612               "logicFlavour": "JAVASCRIPT",
1613               "logic": "/*\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_START\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n *  Modifications Copyright (C) 2020 Nordix Foundation.\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_END\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n */\n\nimportClass(org.slf4j.LoggerFactory);\n\nimportClass(java.util.ArrayList);\n\nimportClass(org.apache.avro.generic.GenericData.Array);\nimportClass(org.apache.avro.generic.GenericRecord);\nimportClass(org.apache.avro.Schema);\n\nvar logger \u003d executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar rootLogger \u003d LoggerFactory.getLogger(logger.ROOT_LOGGER_NAME);\n\nvar ifSituation \u003d executor.inFields[\"situation\"];\n\nvar albumCustomerMap \u003d executor.getContextAlbum(\"albumCustomerMap\");\nvar albumProblemMap \u003d executor.getContextAlbum(\"albumProblemMap\");\n\n// create outfiled for decision\nvar decision \u003d executor.subject.getOutFieldSchemaHelper(\"decision\").createNewInstance();\ndecision.put(\"description\", \"None, everything is ok\");\ndecision.put(\"decision\", \"IMPEDE\");\ndecision.put(\"problemID\", ifSituation.get(\"problemID\"));\ndecision.put(\"customers\", new ArrayList());\n\nvar problem \u003d albumProblemMap.get(ifSituation.get(\"problemID\"));\nvar returnValue \u003d true;\nif (problem !\u003d null \u0026\u0026 ifSituation.get(\"violatedSLAs\").size() \u003e 0) {\n    logger.trace(\"-- impede by priority\");\n    for (var i \u003d 0; i \u003c problem.get(\"edgeUsedBy\").size(); i++) {\n        customerCtxt \u003d albumCustomerMap.get(problem.get(\"edgeUsedBy\").get(i).toString());\n        if (customerCtxt.get(\"priority\") \u003d\u003d false) {\n            decision.get(\"customers\").add(customerCtxt.get(\"customerName\"));\n        }\n    }\n} else {\n    logger.trace(\"-- wrong problemID \u003c\" + ifSituation.get(\"problemID\") + \"\u003e for PRIORITY task, we should not be here\");\n    rootLogger.error(executor.subject.id + \" \" + \"-- wrong problemID \u003c\" + ifSituation.get(\"problemID\")\n            + \"\u003e for PRIORITY task, we should not be here\");\n    returnValue \u003d false;\n}\n\n// set impededLast to decision[customers]\nproblem.get(\"impededLast\").clear();\nproblem.get(\"impededLast\").addAll(decision.get(\"customers\"));\n\nexecutor.outFields[\"decision\"] \u003d decision;\nlogger.trace(\"-- decision: \" + decision);\n\nlogger.info(\"vpnsla: priority, impeding customers \" + decision.get(\"customers\"));\n\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".d-pri\");\n\nreturnValue;"
1614             }
1615           }
1616         },
1617         {
1618           "key": {
1619             "name": "VpnSlaPolicyDecideSlaTask",
1620             "version": "1.0.0"
1621           },
1622           "value": {
1623             "key": {
1624               "name": "VpnSlaPolicyDecideSlaTask",
1625               "version": "1.0.0"
1626             },
1627             "inputEvent": {
1628               "key": {
1629                 "name": "VpnSlaEstablishOut",
1630                 "version": "1.0.0"
1631               },
1632               "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
1633               "source": "SlaEstablish",
1634               "target": "SlaDecide",
1635               "parameter": {
1636                 "entry": [
1637                   {
1638                     "key": "matchStart",
1639                     "value": {
1640                       "key": {
1641                         "parentKeyName": "VpnSlaEstablishOut",
1642                         "parentKeyVersion": "1.0.0",
1643                         "parentLocalName": "NULL",
1644                         "localName": "matchStart"
1645                       },
1646                       "fieldSchemaKey": {
1647                         "name": "timestampDecl",
1648                         "version": "1.0.0"
1649                       },
1650                       "optional": false
1651                     }
1652                   },
1653                   {
1654                     "key": "situation",
1655                     "value": {
1656                       "key": {
1657                         "parentKeyName": "VpnSlaEstablishOut",
1658                         "parentKeyVersion": "1.0.0",
1659                         "parentLocalName": "NULL",
1660                         "localName": "situation"
1661                       },
1662                       "fieldSchemaKey": {
1663                         "name": "establishSituationDecl",
1664                         "version": "1.0.0"
1665                       },
1666                       "optional": false
1667                     }
1668                   }
1669                 ]
1670               },
1671               "toscaPolicyState": ""
1672             },
1673             "outputEvents": {
1674               "entry": [
1675                 {
1676                   "key": "VpnSlaDecideOut",
1677                   "value": {
1678                     "key": {
1679                       "name": "VpnSlaDecideOut",
1680                       "version": "1.0.0"
1681                     },
1682                     "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
1683                     "source": "SlaDecide",
1684                     "target": "SlaAct",
1685                     "parameter": {
1686                       "entry": [
1687                         {
1688                           "key": "decision",
1689                           "value": {
1690                             "key": {
1691                               "parentKeyName": "VpnSlaDecideOut",
1692                               "parentKeyVersion": "1.0.0",
1693                               "parentLocalName": "NULL",
1694                               "localName": "decision"
1695                             },
1696                             "fieldSchemaKey": {
1697                               "name": "decideDecisionDecl",
1698                               "version": "1.0.0"
1699                             },
1700                             "optional": false
1701                           }
1702                         },
1703                         {
1704                           "key": "matchStart",
1705                           "value": {
1706                             "key": {
1707                               "parentKeyName": "VpnSlaDecideOut",
1708                               "parentKeyVersion": "1.0.0",
1709                               "parentLocalName": "NULL",
1710                               "localName": "matchStart"
1711                             },
1712                             "fieldSchemaKey": {
1713                               "name": "timestampDecl",
1714                               "version": "1.0.0"
1715                             },
1716                             "optional": false
1717                           }
1718                         }
1719                       ]
1720                     },
1721                     "toscaPolicyState": ""
1722                   }
1723                 }
1724               ]
1725             },
1726             "taskParameters": {
1727               "entry": []
1728             },
1729             "contextAlbumReference": [
1730               {
1731                 "name": "albumCustomerMap",
1732                 "version": "0.0.1"
1733               },
1734               {
1735                 "name": "albumProblemMap",
1736                 "version": "0.0.1"
1737               }
1738             ],
1739             "taskLogic": {
1740               "key": {
1741                 "parentKeyName": "VpnSlaPolicyDecideSlaTask",
1742                 "parentKeyVersion": "1.0.0",
1743                 "parentLocalName": "NULL",
1744                 "localName": "TaskLogic"
1745               },
1746               "logicFlavour": "JAVASCRIPT",
1747               "logic": "/*\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_START\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n *  Modifications Copyright (C) 2020 Nordix Foundation.\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_END\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n */\n\nimportClass(org.slf4j.LoggerFactory);\n\nimportClass(java.util.ArrayList);\n\nimportClass(org.apache.avro.generic.GenericData.Array);\nimportClass(org.apache.avro.generic.GenericRecord);\nimportClass(org.apache.avro.Schema);\n\nvar logger \u003d executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar rootLogger \u003d LoggerFactory.getLogger(logger.ROOT_LOGGER_NAME);\n\nvar ifSituation \u003d executor.inFields[\"situation\"];\n\nvar albumCustomerMap \u003d executor.getContextAlbum(\"albumCustomerMap\");\nvar albumProblemMap \u003d executor.getContextAlbum(\"albumProblemMap\");\n\n// create outfiled for decision\nvar decision \u003d executor.subject.getOutFieldSchemaHelper(\"decision\").createNewInstance();\ndecision.put(\"description\", \"Impede given customers selected based on maximum SLA delta\");\ndecision.put(\"decision\", \"IMPEDE\");\ndecision.put(\"problemID\", ifSituation.get(\"problemID\"));\ndecision.put(\"customers\", new ArrayList());\n\nvar problem \u003d albumProblemMap.get(ifSituation.get(\"problemID\"));\nvar returnValue \u003d true;\nif (problem !\u003d null \u0026\u0026 ifSituation.get(\"violatedSLAs\").size() \u003d\u003d 0) {\n    logger.trace(\"-- impede by maximum SLA\");\n    var customer \u003d \"\";\n    var customerSla \u003d 0;\n    for (var i \u003d 0; i \u003c problem.get(\"edgeUsedBy\").size(); i++) {\n        customerCtxt \u003d albumCustomerMap.get(problem.get(\"edgeUsedBy\").get(i).toString());\n        if (customerSla \u003d\u003d 0) {\n            customerSla \u003d customerCtxt.get(\"dtSLA\") - customerCtxt.get(\"dtYTD\");\n        }\n        if ((customerCtxt.get(\"dtSLA\") - customerCtxt.get(\"dtYTD\")) \u003e\u003d customerSla) {\n            customer \u003d customerCtxt.get(\"customerName\");\n            customerSla \u003d (customerCtxt.get(\"dtSLA\") - customerCtxt.get(\"dtYTD\"));\n        }\n    }\n    decision.get(\"customers\").add(customer);\n} else {\n    logger.trace(\"-- wrong problemID \u003c\" + ifSituation.get(\"problemID\") + \"\u003e for SLA task, we should not be here\");\n    rootLogger.error(executor.subject.id + \" \" + \"-- wrong problemID \u003c\" + ifSituation.get(\"problemID\")\n            + \"\u003e for SLA task, we should not be here\");\n    returnValue \u003d false;\n}\n\n// set impededLast to decision[customers]\nproblem.get(\"impededLast\").clear();\nproblem.get(\"impededLast\").addAll(decision.get(\"customers\"));\n\nexecutor.outFields[\"decision\"] \u003d decision;\nlogger.trace(\"-- decision: \" + decision);\n\nlogger.info(\"vpnsla: sla balance, impeding customers \" + decision.get(\"customers\"));\n\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".d-sla\");\n\nreturnValue;"
1748             }
1749           }
1750         },
1751         {
1752           "key": {
1753             "name": "VpnSlaPolicyDecideSolvedTask",
1754             "version": "1.0.0"
1755           },
1756           "value": {
1757             "key": {
1758               "name": "VpnSlaPolicyDecideSolvedTask",
1759               "version": "1.0.0"
1760             },
1761             "inputEvent": {
1762               "key": {
1763                 "name": "VpnSlaEstablishOut",
1764                 "version": "1.0.0"
1765               },
1766               "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
1767               "source": "SlaEstablish",
1768               "target": "SlaDecide",
1769               "parameter": {
1770                 "entry": [
1771                   {
1772                     "key": "matchStart",
1773                     "value": {
1774                       "key": {
1775                         "parentKeyName": "VpnSlaEstablishOut",
1776                         "parentKeyVersion": "1.0.0",
1777                         "parentLocalName": "NULL",
1778                         "localName": "matchStart"
1779                       },
1780                       "fieldSchemaKey": {
1781                         "name": "timestampDecl",
1782                         "version": "1.0.0"
1783                       },
1784                       "optional": false
1785                     }
1786                   },
1787                   {
1788                     "key": "situation",
1789                     "value": {
1790                       "key": {
1791                         "parentKeyName": "VpnSlaEstablishOut",
1792                         "parentKeyVersion": "1.0.0",
1793                         "parentLocalName": "NULL",
1794                         "localName": "situation"
1795                       },
1796                       "fieldSchemaKey": {
1797                         "name": "establishSituationDecl",
1798                         "version": "1.0.0"
1799                       },
1800                       "optional": false
1801                     }
1802                   }
1803                 ]
1804               },
1805               "toscaPolicyState": ""
1806             },
1807             "outputEvents": {
1808               "entry": [
1809                 {
1810                   "key": "VpnSlaDecideOut",
1811                   "value": {
1812                     "key": {
1813                       "name": "VpnSlaDecideOut",
1814                       "version": "1.0.0"
1815                     },
1816                     "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
1817                     "source": "SlaDecide",
1818                     "target": "SlaAct",
1819                     "parameter": {
1820                       "entry": [
1821                         {
1822                           "key": "decision",
1823                           "value": {
1824                             "key": {
1825                               "parentKeyName": "VpnSlaDecideOut",
1826                               "parentKeyVersion": "1.0.0",
1827                               "parentLocalName": "NULL",
1828                               "localName": "decision"
1829                             },
1830                             "fieldSchemaKey": {
1831                               "name": "decideDecisionDecl",
1832                               "version": "1.0.0"
1833                             },
1834                             "optional": false
1835                           }
1836                         },
1837                         {
1838                           "key": "matchStart",
1839                           "value": {
1840                             "key": {
1841                               "parentKeyName": "VpnSlaDecideOut",
1842                               "parentKeyVersion": "1.0.0",
1843                               "parentLocalName": "NULL",
1844                               "localName": "matchStart"
1845                             },
1846                             "fieldSchemaKey": {
1847                               "name": "timestampDecl",
1848                               "version": "1.0.0"
1849                             },
1850                             "optional": false
1851                           }
1852                         }
1853                       ]
1854                     },
1855                     "toscaPolicyState": ""
1856                   }
1857                 }
1858               ]
1859             },
1860             "taskParameters": {
1861               "entry": []
1862             },
1863             "contextAlbumReference": [
1864               {
1865                 "name": "albumProblemMap",
1866                 "version": "0.0.1"
1867               }
1868             ],
1869             "taskLogic": {
1870               "key": {
1871                 "parentKeyName": "VpnSlaPolicyDecideSolvedTask",
1872                 "parentKeyVersion": "1.0.0",
1873                 "parentLocalName": "NULL",
1874                 "localName": "TaskLogic"
1875               },
1876               "logicFlavour": "JAVASCRIPT",
1877               "logic": "/*\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_START\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n *  Modifications Copyright (C) 2020 Nordix Foundation.\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_END\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n */\n\nimportClass(org.slf4j.LoggerFactory);\n\nimportClass(java.util.ArrayList);\n\nimportClass(org.apache.avro.generic.GenericData.Array);\nimportClass(org.apache.avro.generic.GenericRecord);\nimportClass(org.apache.avro.Schema);\n\nvar logger \u003d executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar rootLogger \u003d LoggerFactory.getLogger(logger.ROOT_LOGGER_NAME);\n\nvar ifSituation \u003d executor.inFields[\"situation\"];\n\nvar albumProblemMap \u003d executor.getContextAlbum(\"albumProblemMap\");\n\n// create outfiled for decision\nvar decision \u003d executor.subject.getOutFieldSchemaHelper(\"decision\").createNewInstance();\ndecision.put(\"description\", \"None, everything is ok\");\ndecision.put(\"decision\", \"REBUILD\");\ndecision.put(\"customers\", new ArrayList());\ndecision.put(\"problemID\", ifSituation.get(\"problemID\"));\n\nvar returnValue \u003d true;\nif (albumProblemMap.get(ifSituation.get(\"problemID\")).get(\"status\") \u003d\u003d \"SOLVED\") {\n    logger.trace(\"-- problem solved\");\n} else {\n    logger.trace(\"-- wrong problemID \u003c\" + problemID + \"\u003e for SOLVED task, we should not be here\");\n    rootLogger.error(executor.subject.id + \" \" + \"-- wrong problemID \u003c\" + problemID\n            + \"\u003e for SOLVED task, we should not be here\");\n    returnValue \u003d false;\n}\n\nexecutor.outFields[\"decision\"] \u003d decision;\n\nlogger.info(\"vpnsla: sla solved, problem solved\");\n\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".d-non\");\n\nreturnValue;"
1878             }
1879           }
1880         },
1881         {
1882           "key": {
1883             "name": "VpnSlaPolicyEstablishTask",
1884             "version": "1.0.0"
1885           },
1886           "value": {
1887             "key": {
1888               "name": "VpnSlaPolicyEstablishTask",
1889               "version": "1.0.0"
1890             },
1891             "inputEvent": {
1892               "key": {
1893                 "name": "VpnSlaMatchOut",
1894                 "version": "1.0.0"
1895               },
1896               "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
1897               "source": "VpnSlaMatch",
1898               "target": "VpnSlaEstablish",
1899               "parameter": {
1900                 "entry": [
1901                   {
1902                     "key": "edgeName",
1903                     "value": {
1904                       "key": {
1905                         "parentKeyName": "VpnSlaMatchOut",
1906                         "parentKeyVersion": "1.0.0",
1907                         "parentLocalName": "NULL",
1908                         "localName": "edgeName"
1909                       },
1910                       "fieldSchemaKey": {
1911                         "name": "edgeNameDecl",
1912                         "version": "1.0.0"
1913                       },
1914                       "optional": false
1915                     }
1916                   },
1917                   {
1918                     "key": "hasChanged",
1919                     "value": {
1920                       "key": {
1921                         "parentKeyName": "VpnSlaMatchOut",
1922                         "parentKeyVersion": "1.0.0",
1923                         "parentLocalName": "NULL",
1924                         "localName": "hasChanged"
1925                       },
1926                       "fieldSchemaKey": {
1927                         "name": "edgeChangedDecl",
1928                         "version": "1.0.0"
1929                       },
1930                       "optional": false
1931                     }
1932                   },
1933                   {
1934                     "key": "matchStart",
1935                     "value": {
1936                       "key": {
1937                         "parentKeyName": "VpnSlaMatchOut",
1938                         "parentKeyVersion": "1.0.0",
1939                         "parentLocalName": "NULL",
1940                         "localName": "matchStart"
1941                       },
1942                       "fieldSchemaKey": {
1943                         "name": "timestampDecl",
1944                         "version": "1.0.0"
1945                       },
1946                       "optional": false
1947                     }
1948                   },
1949                   {
1950                     "key": "status",
1951                     "value": {
1952                       "key": {
1953                         "parentKeyName": "VpnSlaMatchOut",
1954                         "parentKeyVersion": "1.0.0",
1955                         "parentLocalName": "NULL",
1956                         "localName": "status"
1957                       },
1958                       "fieldSchemaKey": {
1959                         "name": "edgeStatusDecl",
1960                         "version": "1.0.0"
1961                       },
1962                       "optional": false
1963                     }
1964                   }
1965                 ]
1966               },
1967               "toscaPolicyState": ""
1968             },
1969             "outputEvents": {
1970               "entry": [
1971                 {
1972                   "key": "VpnSlaEstablishOut",
1973                   "value": {
1974                     "key": {
1975                       "name": "VpnSlaEstablishOut",
1976                       "version": "1.0.0"
1977                     },
1978                     "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
1979                     "source": "SlaEstablish",
1980                     "target": "SlaDecide",
1981                     "parameter": {
1982                       "entry": [
1983                         {
1984                           "key": "matchStart",
1985                           "value": {
1986                             "key": {
1987                               "parentKeyName": "VpnSlaEstablishOut",
1988                               "parentKeyVersion": "1.0.0",
1989                               "parentLocalName": "NULL",
1990                               "localName": "matchStart"
1991                             },
1992                             "fieldSchemaKey": {
1993                               "name": "timestampDecl",
1994                               "version": "1.0.0"
1995                             },
1996                             "optional": false
1997                           }
1998                         },
1999                         {
2000                           "key": "situation",
2001                           "value": {
2002                             "key": {
2003                               "parentKeyName": "VpnSlaEstablishOut",
2004                               "parentKeyVersion": "1.0.0",
2005                               "parentLocalName": "NULL",
2006                               "localName": "situation"
2007                             },
2008                             "fieldSchemaKey": {
2009                               "name": "establishSituationDecl",
2010                               "version": "1.0.0"
2011                             },
2012                             "optional": false
2013                           }
2014                         }
2015                       ]
2016                     },
2017                     "toscaPolicyState": ""
2018                   }
2019                 }
2020               ]
2021             },
2022             "taskParameters": {
2023               "entry": []
2024             },
2025             "contextAlbumReference": [
2026               {
2027                 "name": "albumCustomerMap",
2028                 "version": "0.0.1"
2029               },
2030               {
2031                 "name": "albumProblemMap",
2032                 "version": "0.0.1"
2033               }
2034             ],
2035             "taskLogic": {
2036               "key": {
2037                 "parentKeyName": "VpnSlaPolicyEstablishTask",
2038                 "parentKeyVersion": "1.0.0",
2039                 "parentLocalName": "NULL",
2040                 "localName": "TaskLogic"
2041               },
2042               "logicFlavour": "JAVASCRIPT",
2043               "logic": "/*\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_START\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n *  Modifications Copyright (C) 2020 Nordix Foundation.\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_END\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n */\n\nimportClass(org.slf4j.LoggerFactory);\n\nimportClass(java.util.ArrayList);\n\nimportClass(org.apache.avro.generic.GenericData.Array);\nimportClass(org.apache.avro.generic.GenericRecord);\nimportClass(org.apache.avro.Schema);\n\nvar logger \u003d executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar rootLogger \u003d LoggerFactory.getLogger(logger.ROOT_LOGGER_NAME);\n\nvar ifEdgeName \u003d executor.inFields[\"edgeName\"];\nvar ifEdgeStatus \u003d executor.inFields[\"status\"].toString();\nvar ifhasChanged \u003d executor.inFields[\"hasChanged\"];\nvar ifMatchStart \u003d executor.inFields[\"matchStart\"];\n\nvar albumCustomerMap \u003d executor.getContextAlbum(\"albumCustomerMap\");\nvar albumProblemMap \u003d executor.getContextAlbum(\"albumProblemMap\");\n\nvar linkProblem \u003d albumProblemMap.get(ifEdgeName);\n\n// create outfiled for situation\nvar situation \u003d executor.subject.getOutFieldSchemaHelper(\"situation\").createNewInstance();\nsituation.put(\"violatedSLAs\", new ArrayList());\n\n// create a string as states+hasChanged+linkProblem and switch over it\nvar switchTest \u003d ifEdgeStatus + \":\" + ifhasChanged + \":\" + (linkProblem \u003d\u003d null ? \"no\" : \"yes\");\nswitch (switchTest) {\ncase \"UP:false:no\":\n    logger.trace(\"-- edge \u003c\" + ifEdgeName + \"\u003e UP:false:no \u003d\u003e everything ok\");\n    logger.info(\"vpnsla: everything ok\");\n    situation.put(\"problemID\", \"NONE\");\n    break;\ncase \"UP:false:yes\":\n    logger.trace(\"-- edge \u003c\" + ifEdgeName + \"\u003e UP:false:yes \u003d\u003d\u003e did we miss earlier up?, removing problem\");\n    albumProblemMap.remove(ifEdgeName);\n    linkProblem \u003d null;\n    situation.put(\"problemID\", \"NONE\");\n    break;\ncase \"UP:true:no\":\n    logger.trace(\"-- edge \u003c\" + ifEdgeName + \"\u003e UP:true:no \u003d\u003d\u003e did we miss the earlier down?, creating new problem\");\n    situation.put(\"problemID\", ifEdgeName);\n    break;\ncase \"UP:true:yes\":\n    logger.trace(\"-- edge \u003c\" + ifEdgeName + \"\u003e UP:true:yes \u003d\u003d\u003e detected solution, link up again\");\n    logger.info(\"vpnsla: problem solved\");\n    linkProblem.put(\"endTime\", ifMatchStart);\n    linkProblem.put(\"status\", \"SOLVED\");\n    situation.put(\"problemID\", \"NONE\");\n    break;\ncase \"DOWN:false:no\":\n    logger.trace(\"-- edge \u003c\" + ifEdgeName + \"\u003e DOWN:false:no \u003d\u003d\u003e did we miss an earlier down?, creating new problem\");\n    situation.put(\"problemID\", ifEdgeName);\n    break;\ncase \"DOWN:false:yes\":\n    logger.trace(\"-- edge \u003c\" + ifEdgeName + \"\u003e DOWN:false:yes \u003d\u003d\u003e problem STILL exists\");\n    logger.info(\"vpnsla: problem still exists\");\n    linkProblem.put(\"status\", \"STILL\");\n    situation.put(\"problemID\", ifEdgeName);\n    break;\ncase \"DOWN:true:no\":\n    logger.trace(\"-- edge \u003c\" + ifEdgeName + \"\u003e DOWN:true:no \u003d\u003d\u003e found NEW problem\");\n    logger.info(\"vpnsla: this is a new problem\");\n    situation.put(\"problemID\", ifEdgeName);\n    break;\ncase \"DOWN:true:yes\":\n    logger.trace(\"-- edge \u003c\" + ifEdgeName\n            + \"\u003e DOWN:true:yes \u003d\u003d\u003e did we miss to remove an earlier problem?, remove and create new problem\");\n    linkProblem \u003d null;\n    situation.put(\"problemID\", ifEdgeName);\n    break;\n\ndefault:\n    logger.error(\"-- input wrong for edge\" + ifEdgeName + \": edge status \u003c\" + ifEdgeStatus\n            + \"\u003e unknown or null on hasChanged \u003c\" + ifhasChanged + \"\u003e\");\n    rootLogger.error(\"-- input wrong for edge\" + ifEdgeName + \": edge status \u003c\" + ifEdgeStatus\n            + \"\u003e unknown or null on hasChanged \u003c\" + ifhasChanged + \"\u003e\");\n}\n\n// create new problem if situation requires it\nif (situation.get(\"problemID\").equals(ifEdgeName) \u0026\u0026 linkProblem \u003d\u003d null) {\n    logger.trace(\"-- edge \u003c\" + ifEdgeName + \"\u003e creating new problem\");\n    linkProblem \u003d albumProblemMap.getSchemaHelper().createNewInstance();\n    linkProblem.put(\"edge\", ifEdgeName);\n    linkProblem.put(\"startTime\", ifMatchStart);\n    linkProblem.put(\"lastUpdate\", ifMatchStart);\n    linkProblem.put(\"endTime\", 0);\n    linkProblem.put(\"status\", \"NEW\");\n    linkProblem.put(\"edgeUsedBy\", new ArrayList());\n    linkProblem.put(\"impededLast\", new ArrayList());\n\n    for (var i \u003d 0; i \u003c albumCustomerMap.values().size(); i++) {\n        var customer \u003d albumCustomerMap.values().get(i);\n        var customerLinks \u003d albumCustomerMap.values().get(i).get(\"links\");\n        for (var k \u003d 0; k \u003c customerLinks.size(); k++) {\n            if (customerLinks.get(k) \u003d\u003d ifEdgeName) {\n                linkProblem.get(\"edgeUsedBy\").add(customer.get(\"customerName\"));\n            }\n        }\n    }\n    albumProblemMap.put(ifEdgeName, linkProblem);\n    logger.trace(\"-- edge \u003c\" + ifEdgeName + \"\u003e problem created as \u003c\" + linkProblem + \"\u003e\");\n}\n\n// set dtYTD if situation requires it\nif (linkProblem !\u003d null \u0026\u0026 (linkProblem.get(\"status\") \u003d\u003d \"STILL\" || linkProblem.get(\"status\") \u003d\u003d \"SOLVED\")) {\n    var linkDownTimeinSecs \u003d (ifMatchStart - linkProblem.get(\"lastUpdate\")) / 1000;\n    logger.trace(\"-- edge \u003c\" + ifEdgeName + \"\u003e down time: \" + linkDownTimeinSecs + \" s\");\n    for (var k \u003d 0; k \u003c linkProblem.get(\"impededLast\").size(); k++) {\n        for (var i \u003d 0; i \u003c albumCustomerMap.values().size(); i++) {\n            var customer \u003d albumCustomerMap.values().get(i);\n            if (customer.get(\"customerName\").equals(linkProblem.get(\"impededLast\").get(k))) {\n                logger.info(\"-- vpnsla: customer \" + customer.get(\"customerName\") + \" YDT downtime increased from \"\n                        + customer.get(\"dtYTD\") + \" to \" + (customer.get(\"dtYTD\") + linkDownTimeinSecs));\n                customer.put(\"dtYTD\", (customer.get(\"dtYTD\") + linkDownTimeinSecs))\n            }\n        }\n    }\n    // set lastUpdate to this policy execution for next execution calculation\n    linkProblem.put(\"lastUpdate\", ifMatchStart);\n}\n\n// check SLA violations if situation requires it\nif (linkProblem !\u003d null \u0026\u0026 linkProblem.get(\"status\") !\u003d \"SOLVED\") {\n    logger.info(\"\u003ee\u003e customer\\tDT SLA\\tDT YTD\\tviolation\");\n    for (var i \u003d 0; i \u003c albumCustomerMap.values().size(); i++) {\n        var customer \u003d albumCustomerMap.values().get(i);\n        if (customer.get(\"dtYTD\") \u003e customer.get(\"dtSLA\")) {\n            situation.get(\"violatedSLAs\").add(customer.get(\"customerName\"));\n            logger.info(\"\u003ee\u003e \" + customer.get(\"customerName\") + \"\\t\\t\" + customer.get(\"dtSLA\") + \"s\\t\"\n                    + customer.get(\"dtYTD\") + \"s\\t\" + \"!!\");\n        } else {\n            logger.info(\"\u003ee\u003e \" + customer.get(\"customerName\") + \"\\t\\t\" + customer.get(\"dtSLA\") + \"s\\t\"\n                    + customer.get(\"dtYTD\") + \"s\");\n        }\n    }\n}\n\nexecutor.outFields[\"situation\"] \u003d situation;\n\nlogger.trace(\"-- out fields \u003c\" + executor.outFields + \"\u003e\");\n\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".e\");\n\ntrue;"
2044             }
2045           }
2046         },
2047         {
2048           "key": {
2049             "name": "VpnSlaPolicyMatchTask",
2050             "version": "1.0.0"
2051           },
2052           "value": {
2053             "key": {
2054               "name": "VpnSlaPolicyMatchTask",
2055               "version": "1.0.0"
2056             },
2057             "inputEvent": {
2058               "key": {
2059                 "name": "VpnSlaTrigger",
2060                 "version": "1.0.0"
2061               },
2062               "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
2063               "source": "TriggerSys",
2064               "target": "VpnSlaMatch",
2065               "parameter": {
2066                 "entry": [
2067                   {
2068                     "key": "edgeName",
2069                     "value": {
2070                       "key": {
2071                         "parentKeyName": "VpnSlaTrigger",
2072                         "parentKeyVersion": "1.0.0",
2073                         "parentLocalName": "NULL",
2074                         "localName": "edgeName"
2075                       },
2076                       "fieldSchemaKey": {
2077                         "name": "edgeNameDecl",
2078                         "version": "1.0.0"
2079                       },
2080                       "optional": false
2081                     }
2082                   },
2083                   {
2084                     "key": "status",
2085                     "value": {
2086                       "key": {
2087                         "parentKeyName": "VpnSlaTrigger",
2088                         "parentKeyVersion": "1.0.0",
2089                         "parentLocalName": "NULL",
2090                         "localName": "status"
2091                       },
2092                       "fieldSchemaKey": {
2093                         "name": "edgeStatusDecl",
2094                         "version": "1.0.0"
2095                       },
2096                       "optional": false
2097                     }
2098                   }
2099                 ]
2100               },
2101               "toscaPolicyState": ""
2102             },
2103             "outputEvents": {
2104               "entry": [
2105                 {
2106                   "key": "VpnSlaMatchOut",
2107                   "value": {
2108                     "key": {
2109                       "name": "VpnSlaMatchOut",
2110                       "version": "1.0.0"
2111                     },
2112                     "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
2113                     "source": "VpnSlaMatch",
2114                     "target": "VpnSlaEstablish",
2115                     "parameter": {
2116                       "entry": [
2117                         {
2118                           "key": "edgeName",
2119                           "value": {
2120                             "key": {
2121                               "parentKeyName": "VpnSlaMatchOut",
2122                               "parentKeyVersion": "1.0.0",
2123                               "parentLocalName": "NULL",
2124                               "localName": "edgeName"
2125                             },
2126                             "fieldSchemaKey": {
2127                               "name": "edgeNameDecl",
2128                               "version": "1.0.0"
2129                             },
2130                             "optional": false
2131                           }
2132                         },
2133                         {
2134                           "key": "hasChanged",
2135                           "value": {
2136                             "key": {
2137                               "parentKeyName": "VpnSlaMatchOut",
2138                               "parentKeyVersion": "1.0.0",
2139                               "parentLocalName": "NULL",
2140                               "localName": "hasChanged"
2141                             },
2142                             "fieldSchemaKey": {
2143                               "name": "edgeChangedDecl",
2144                               "version": "1.0.0"
2145                             },
2146                             "optional": false
2147                           }
2148                         },
2149                         {
2150                           "key": "matchStart",
2151                           "value": {
2152                             "key": {
2153                               "parentKeyName": "VpnSlaMatchOut",
2154                               "parentKeyVersion": "1.0.0",
2155                               "parentLocalName": "NULL",
2156                               "localName": "matchStart"
2157                             },
2158                             "fieldSchemaKey": {
2159                               "name": "timestampDecl",
2160                               "version": "1.0.0"
2161                             },
2162                             "optional": false
2163                           }
2164                         },
2165                         {
2166                           "key": "status",
2167                           "value": {
2168                             "key": {
2169                               "parentKeyName": "VpnSlaMatchOut",
2170                               "parentKeyVersion": "1.0.0",
2171                               "parentLocalName": "NULL",
2172                               "localName": "status"
2173                             },
2174                             "fieldSchemaKey": {
2175                               "name": "edgeStatusDecl",
2176                               "version": "1.0.0"
2177                             },
2178                             "optional": false
2179                           }
2180                         }
2181                       ]
2182                     },
2183                     "toscaPolicyState": ""
2184                   }
2185                 }
2186               ]
2187             },
2188             "taskParameters": {
2189               "entry": []
2190             },
2191             "contextAlbumReference": [
2192               {
2193                 "name": "albumTopoEdges",
2194                 "version": "0.0.1"
2195               }
2196             ],
2197             "taskLogic": {
2198               "key": {
2199                 "parentKeyName": "VpnSlaPolicyMatchTask",
2200                 "parentKeyVersion": "1.0.0",
2201                 "parentLocalName": "NULL",
2202                 "localName": "TaskLogic"
2203               },
2204               "logicFlavour": "JAVASCRIPT",
2205               "logic": "/*\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_START\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n *  Modifications Copyright (C) 2020 Nordix Foundation.\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *      http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * SPDX-License-Identifier: Apache-2.0\n * \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003dLICENSE_END\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n */\n\nvar now \u003d new Date().getTime();\nexecutor.outFields[\"matchStart\"] \u003d now;\n\nimportClass(org.slf4j.LoggerFactory);\n\nvar logger \u003d executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar rootLogger \u003d LoggerFactory.getLogger(logger.ROOT_LOGGER_NAME);\n\nvar ifEdgeName \u003d executor.inFields[\"edgeName\"];\nvar ifLinkStatus \u003d executor.inFields[\"status\"];\n\nvar albumTopoEdges \u003d executor.getContextAlbum(\"albumTopoEdges\");\n\nlogger.trace(\"-- got infields, checking albumTopoEdges changes\");\n\nvar active \u003d false;\nswitch (ifLinkStatus.toString()) {\ncase \"UP\":\n    active \u003d true;\n    break;\ncase \"DOWN\":\n    active \u003d false;\n    break;\ndefault:\n    active \u003d false;\n    logger.error(\"-- trigger sent unknown link status \u003c\" + ifLinkStatus + \"\u003e for link \u003c\" + ifEdgeName + \"\u003e\");\n    rootLogger.error(executor.subject.id + \" \" + \"-- trigger sent unknown link status \u003c\" + ifLinkStatus\n            + \"\u003e for link \u003c\" + ifEdgeName + \"\u003e\");\n}\n\nvar link \u003d albumTopoEdges.get(ifEdgeName);\nif (link \u003d\u003d null) {\n    logger.trace(\"-- link \u003c\" + ifEdgeName + \"\u003e not in albumTopoEdges\");\n} else {\n    logger.trace(\"-- found link \u003c\" + link + \"\u003e in albumTopoEdges\");\n    logger.trace(\"-- active \u003c\" + active + \"\u003e : link.active \u003c\" + link.get(\"active\") + \"\u003e\");\n    if (active !\u003d link.get(\"active\")) {\n        link.put(\"active\", active);\n        logger.trace(\"-- link \u003c\" + ifEdgeName + \"\u003e status changed to \u003cactive:\" + link.get(\"active\") + \"\u003e\");\n        executor.outFields[\"hasChanged\"] \u003d true;\n    } else {\n        logger.trace(\"-- link \u003c\" + ifEdgeName + \"\u003e status not changed \u003cactive:\" + link.get(\"active\") + \"\u003e\");\n        executor.outFields[\"hasChanged\"] \u003d false;\n    }\n}\n\nexecutor.outFields[\"edgeName\"] \u003d ifEdgeName;\nexecutor.outFields[\"status\"] \u003d ifLinkStatus;\n\nlogger.info(\"vpnsla: detected \" + ifEdgeName + \" as \" + ifLinkStatus);\n\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".m\");\n\ntrue;"
2206             }
2207           }
2208         }
2209       ]
2210     }
2211   },
2212   "events": {
2213     "key": {
2214       "name": "PCVS-VpnSla_Events",
2215       "version": "1.0.0"
2216     },
2217     "eventMap": {
2218       "entry": [
2219         {
2220           "key": {
2221             "name": "CustomerContextEventIn",
2222             "version": "1.0.0"
2223           },
2224           "value": {
2225             "key": {
2226               "name": "CustomerContextEventIn",
2227               "version": "1.0.0"
2228             },
2229             "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
2230             "source": "CtxtManagement",
2231             "target": "APEX",
2232             "parameter": {
2233               "entry": [
2234                 {
2235                   "key": "customerName",
2236                   "value": {
2237                     "key": {
2238                       "parentKeyName": "CustomerContextEventIn",
2239                       "parentKeyVersion": "1.0.0",
2240                       "parentLocalName": "NULL",
2241                       "localName": "customerName"
2242                     },
2243                     "fieldSchemaKey": {
2244                       "name": "ctxtCustomerNameDecl",
2245                       "version": "1.0.0"
2246                     },
2247                     "optional": false
2248                   }
2249                 },
2250                 {
2251                   "key": "dtSLA",
2252                   "value": {
2253                     "key": {
2254                       "parentKeyName": "CustomerContextEventIn",
2255                       "parentKeyVersion": "1.0.0",
2256                       "parentLocalName": "NULL",
2257                       "localName": "dtSLA"
2258                     },
2259                     "fieldSchemaKey": {
2260                       "name": "ctxtCustomerDowntimeSLADecl",
2261                       "version": "1.0.0"
2262                     },
2263                     "optional": false
2264                   }
2265                 },
2266                 {
2267                   "key": "dtYTD",
2268                   "value": {
2269                     "key": {
2270                       "parentKeyName": "CustomerContextEventIn",
2271                       "parentKeyVersion": "1.0.0",
2272                       "parentLocalName": "NULL",
2273                       "localName": "dtYTD"
2274                     },
2275                     "fieldSchemaKey": {
2276                       "name": "ctxtCustomerDowntimeYTDDecl",
2277                       "version": "1.0.0"
2278                     },
2279                     "optional": false
2280                   }
2281                 },
2282                 {
2283                   "key": "links",
2284                   "value": {
2285                     "key": {
2286                       "parentKeyName": "CustomerContextEventIn",
2287                       "parentKeyVersion": "1.0.0",
2288                       "parentLocalName": "NULL",
2289                       "localName": "links"
2290                     },
2291                     "fieldSchemaKey": {
2292                       "name": "ctxtCustomerLinksDecl",
2293                       "version": "1.0.0"
2294                     },
2295                     "optional": false
2296                   }
2297                 },
2298                 {
2299                   "key": "priority",
2300                   "value": {
2301                     "key": {
2302                       "parentKeyName": "CustomerContextEventIn",
2303                       "parentKeyVersion": "1.0.0",
2304                       "parentLocalName": "NULL",
2305                       "localName": "priority"
2306                     },
2307                     "fieldSchemaKey": {
2308                       "name": "ctxtCustomerPriorityDecl",
2309                       "version": "1.0.0"
2310                     },
2311                     "optional": false
2312                   }
2313                 },
2314                 {
2315                   "key": "satisfaction",
2316                   "value": {
2317                     "key": {
2318                       "parentKeyName": "CustomerContextEventIn",
2319                       "parentKeyVersion": "1.0.0",
2320                       "parentLocalName": "NULL",
2321                       "localName": "satisfaction"
2322                     },
2323                     "fieldSchemaKey": {
2324                       "name": "ctxtCustomerSatisfactionDecl",
2325                       "version": "1.0.0"
2326                     },
2327                     "optional": false
2328                   }
2329                 }
2330               ]
2331             },
2332             "toscaPolicyState": ""
2333           }
2334         },
2335         {
2336           "key": {
2337             "name": "EdgeContextEventIn",
2338             "version": "1.0.0"
2339           },
2340           "value": {
2341             "key": {
2342               "name": "EdgeContextEventIn",
2343               "version": "1.0.0"
2344             },
2345             "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
2346             "source": "CtxtManagement",
2347             "target": "APEX",
2348             "parameter": {
2349               "entry": [
2350                 {
2351                   "key": "edgeName",
2352                   "value": {
2353                     "key": {
2354                       "parentKeyName": "EdgeContextEventIn",
2355                       "parentKeyVersion": "1.0.0",
2356                       "parentLocalName": "NULL",
2357                       "localName": "edgeName"
2358                     },
2359                     "fieldSchemaKey": {
2360                       "name": "ctxtEdgeNameDecl",
2361                       "version": "1.0.0"
2362                     },
2363                     "optional": false
2364                   }
2365                 },
2366                 {
2367                   "key": "end",
2368                   "value": {
2369                     "key": {
2370                       "parentKeyName": "EdgeContextEventIn",
2371                       "parentKeyVersion": "1.0.0",
2372                       "parentLocalName": "NULL",
2373                       "localName": "end"
2374                     },
2375                     "fieldSchemaKey": {
2376                       "name": "ctxtEdgeEndDecl",
2377                       "version": "1.0.0"
2378                     },
2379                     "optional": false
2380                   }
2381                 },
2382                 {
2383                   "key": "start",
2384                   "value": {
2385                     "key": {
2386                       "parentKeyName": "EdgeContextEventIn",
2387                       "parentKeyVersion": "1.0.0",
2388                       "parentLocalName": "NULL",
2389                       "localName": "start"
2390                     },
2391                     "fieldSchemaKey": {
2392                       "name": "ctxtEdgeStartDecl",
2393                       "version": "1.0.0"
2394                     },
2395                     "optional": false
2396                   }
2397                 },
2398                 {
2399                   "key": "status",
2400                   "value": {
2401                     "key": {
2402                       "parentKeyName": "EdgeContextEventIn",
2403                       "parentKeyVersion": "1.0.0",
2404                       "parentLocalName": "NULL",
2405                       "localName": "status"
2406                     },
2407                     "fieldSchemaKey": {
2408                       "name": "ctxtEdgeStatusDecl",
2409                       "version": "1.0.0"
2410                     },
2411                     "optional": false
2412                   }
2413                 }
2414               ]
2415             },
2416             "toscaPolicyState": ""
2417           }
2418         },
2419         {
2420           "key": {
2421             "name": "NodeContextEventIn",
2422             "version": "1.0.0"
2423           },
2424           "value": {
2425             "key": {
2426               "name": "NodeContextEventIn",
2427               "version": "1.0.0"
2428             },
2429             "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
2430             "source": "CtxtManagement",
2431             "target": "APEX",
2432             "parameter": {
2433               "entry": [
2434                 {
2435                   "key": "mininetName",
2436                   "value": {
2437                     "key": {
2438                       "parentKeyName": "NodeContextEventIn",
2439                       "parentKeyVersion": "1.0.0",
2440                       "parentLocalName": "NULL",
2441                       "localName": "mininetName"
2442                     },
2443                     "fieldSchemaKey": {
2444                       "name": "ctxtNodeMininetNameDecl",
2445                       "version": "1.0.0"
2446                     },
2447                     "optional": false
2448                   }
2449                 },
2450                 {
2451                   "key": "nodeName",
2452                   "value": {
2453                     "key": {
2454                       "parentKeyName": "NodeContextEventIn",
2455                       "parentKeyVersion": "1.0.0",
2456                       "parentLocalName": "NULL",
2457                       "localName": "nodeName"
2458                     },
2459                     "fieldSchemaKey": {
2460                       "name": "ctxtNodeNameDecl",
2461                       "version": "1.0.0"
2462                     },
2463                     "optional": false
2464                   }
2465                 }
2466               ]
2467             },
2468             "toscaPolicyState": ""
2469           }
2470         },
2471         {
2472           "key": {
2473             "name": "ReportOut",
2474             "version": "1.0.0"
2475           },
2476           "value": {
2477             "key": {
2478               "name": "ReportOut",
2479               "version": "1.0.0"
2480             },
2481             "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
2482             "source": "APEX",
2483             "target": "CtxtManagement",
2484             "parameter": {
2485               "entry": [
2486                 {
2487                   "key": "report",
2488                   "value": {
2489                     "key": {
2490                       "parentKeyName": "ReportOut",
2491                       "parentKeyVersion": "1.0.0",
2492                       "parentLocalName": "NULL",
2493                       "localName": "report"
2494                     },
2495                     "fieldSchemaKey": {
2496                       "name": "reportDecl",
2497                       "version": "1.0.0"
2498                     },
2499                     "optional": false
2500                   }
2501                 }
2502               ]
2503             },
2504             "toscaPolicyState": ""
2505           }
2506         },
2507         {
2508           "key": {
2509             "name": "VpnSlaActOut",
2510             "version": "1.0.0"
2511           },
2512           "value": {
2513             "key": {
2514               "name": "VpnSlaActOut",
2515               "version": "1.0.0"
2516             },
2517             "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
2518             "source": "SlaAct",
2519             "target": "ActioningSystem",
2520             "parameter": {
2521               "entry": [
2522                 {
2523                   "key": "action",
2524                   "value": {
2525                     "key": {
2526                       "parentKeyName": "VpnSlaActOut",
2527                       "parentKeyVersion": "1.0.0",
2528                       "parentLocalName": "NULL",
2529                       "localName": "action"
2530                     },
2531                     "fieldSchemaKey": {
2532                       "name": "actionDecl",
2533                       "version": "1.0.0"
2534                     },
2535                     "optional": false
2536                   }
2537                 },
2538                 {
2539                   "key": "edgeName",
2540                   "value": {
2541                     "key": {
2542                       "parentKeyName": "VpnSlaActOut",
2543                       "parentKeyVersion": "1.0.0",
2544                       "parentLocalName": "NULL",
2545                       "localName": "edgeName"
2546                     },
2547                     "fieldSchemaKey": {
2548                       "name": "edgeNameDecl",
2549                       "version": "1.0.0"
2550                     },
2551                     "optional": false
2552                   }
2553                 }
2554               ]
2555             },
2556             "toscaPolicyState": ""
2557           }
2558         },
2559         {
2560           "key": {
2561             "name": "VpnSlaDecideOut",
2562             "version": "1.0.0"
2563           },
2564           "value": {
2565             "key": {
2566               "name": "VpnSlaDecideOut",
2567               "version": "1.0.0"
2568             },
2569             "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
2570             "source": "SlaDecide",
2571             "target": "SlaAct",
2572             "parameter": {
2573               "entry": [
2574                 {
2575                   "key": "decision",
2576                   "value": {
2577                     "key": {
2578                       "parentKeyName": "VpnSlaDecideOut",
2579                       "parentKeyVersion": "1.0.0",
2580                       "parentLocalName": "NULL",
2581                       "localName": "decision"
2582                     },
2583                     "fieldSchemaKey": {
2584                       "name": "decideDecisionDecl",
2585                       "version": "1.0.0"
2586                     },
2587                     "optional": false
2588                   }
2589                 },
2590                 {
2591                   "key": "matchStart",
2592                   "value": {
2593                     "key": {
2594                       "parentKeyName": "VpnSlaDecideOut",
2595                       "parentKeyVersion": "1.0.0",
2596                       "parentLocalName": "NULL",
2597                       "localName": "matchStart"
2598                     },
2599                     "fieldSchemaKey": {
2600                       "name": "timestampDecl",
2601                       "version": "1.0.0"
2602                     },
2603                     "optional": false
2604                   }
2605                 }
2606               ]
2607             },
2608             "toscaPolicyState": ""
2609           }
2610         },
2611         {
2612           "key": {
2613             "name": "VpnSlaEstablishOut",
2614             "version": "1.0.0"
2615           },
2616           "value": {
2617             "key": {
2618               "name": "VpnSlaEstablishOut",
2619               "version": "1.0.0"
2620             },
2621             "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
2622             "source": "SlaEstablish",
2623             "target": "SlaDecide",
2624             "parameter": {
2625               "entry": [
2626                 {
2627                   "key": "matchStart",
2628                   "value": {
2629                     "key": {
2630                       "parentKeyName": "VpnSlaEstablishOut",
2631                       "parentKeyVersion": "1.0.0",
2632                       "parentLocalName": "NULL",
2633                       "localName": "matchStart"
2634                     },
2635                     "fieldSchemaKey": {
2636                       "name": "timestampDecl",
2637                       "version": "1.0.0"
2638                     },
2639                     "optional": false
2640                   }
2641                 },
2642                 {
2643                   "key": "situation",
2644                   "value": {
2645                     "key": {
2646                       "parentKeyName": "VpnSlaEstablishOut",
2647                       "parentKeyVersion": "1.0.0",
2648                       "parentLocalName": "NULL",
2649                       "localName": "situation"
2650                     },
2651                     "fieldSchemaKey": {
2652                       "name": "establishSituationDecl",
2653                       "version": "1.0.0"
2654                     },
2655                     "optional": false
2656                   }
2657                 }
2658               ]
2659             },
2660             "toscaPolicyState": ""
2661           }
2662         },
2663         {
2664           "key": {
2665             "name": "VpnSlaMatchOut",
2666             "version": "1.0.0"
2667           },
2668           "value": {
2669             "key": {
2670               "name": "VpnSlaMatchOut",
2671               "version": "1.0.0"
2672             },
2673             "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
2674             "source": "VpnSlaMatch",
2675             "target": "VpnSlaEstablish",
2676             "parameter": {
2677               "entry": [
2678                 {
2679                   "key": "edgeName",
2680                   "value": {
2681                     "key": {
2682                       "parentKeyName": "VpnSlaMatchOut",
2683                       "parentKeyVersion": "1.0.0",
2684                       "parentLocalName": "NULL",
2685                       "localName": "edgeName"
2686                     },
2687                     "fieldSchemaKey": {
2688                       "name": "edgeNameDecl",
2689                       "version": "1.0.0"
2690                     },
2691                     "optional": false
2692                   }
2693                 },
2694                 {
2695                   "key": "hasChanged",
2696                   "value": {
2697                     "key": {
2698                       "parentKeyName": "VpnSlaMatchOut",
2699                       "parentKeyVersion": "1.0.0",
2700                       "parentLocalName": "NULL",
2701                       "localName": "hasChanged"
2702                     },
2703                     "fieldSchemaKey": {
2704                       "name": "edgeChangedDecl",
2705                       "version": "1.0.0"
2706                     },
2707                     "optional": false
2708                   }
2709                 },
2710                 {
2711                   "key": "matchStart",
2712                   "value": {
2713                     "key": {
2714                       "parentKeyName": "VpnSlaMatchOut",
2715                       "parentKeyVersion": "1.0.0",
2716                       "parentLocalName": "NULL",
2717                       "localName": "matchStart"
2718                     },
2719                     "fieldSchemaKey": {
2720                       "name": "timestampDecl",
2721                       "version": "1.0.0"
2722                     },
2723                     "optional": false
2724                   }
2725                 },
2726                 {
2727                   "key": "status",
2728                   "value": {
2729                     "key": {
2730                       "parentKeyName": "VpnSlaMatchOut",
2731                       "parentKeyVersion": "1.0.0",
2732                       "parentLocalName": "NULL",
2733                       "localName": "status"
2734                     },
2735                     "fieldSchemaKey": {
2736                       "name": "edgeStatusDecl",
2737                       "version": "1.0.0"
2738                     },
2739                     "optional": false
2740                   }
2741                 }
2742               ]
2743             },
2744             "toscaPolicyState": ""
2745           }
2746         },
2747         {
2748           "key": {
2749             "name": "VpnSlaTrigger",
2750             "version": "1.0.0"
2751           },
2752           "value": {
2753             "key": {
2754               "name": "VpnSlaTrigger",
2755               "version": "1.0.0"
2756             },
2757             "nameSpace": "org.onap.policy.apex.examples.pcvs.vpnsla",
2758             "source": "TriggerSys",
2759             "target": "VpnSlaMatch",
2760             "parameter": {
2761               "entry": [
2762                 {
2763                   "key": "edgeName",
2764                   "value": {
2765                     "key": {
2766                       "parentKeyName": "VpnSlaTrigger",
2767                       "parentKeyVersion": "1.0.0",
2768                       "parentLocalName": "NULL",
2769                       "localName": "edgeName"
2770                     },
2771                     "fieldSchemaKey": {
2772                       "name": "edgeNameDecl",
2773                       "version": "1.0.0"
2774                     },
2775                     "optional": false
2776                   }
2777                 },
2778                 {
2779                   "key": "status",
2780                   "value": {
2781                     "key": {
2782                       "parentKeyName": "VpnSlaTrigger",
2783                       "parentKeyVersion": "1.0.0",
2784                       "parentLocalName": "NULL",
2785                       "localName": "status"
2786                     },
2787                     "fieldSchemaKey": {
2788                       "name": "edgeStatusDecl",
2789                       "version": "1.0.0"
2790                     },
2791                     "optional": false
2792                   }
2793                 }
2794               ]
2795             },
2796             "toscaPolicyState": ""
2797           }
2798         }
2799       ]
2800     }
2801   },
2802   "albums": {
2803     "key": {
2804       "name": "PCVS-VpnSla_Albums",
2805       "version": "1.0.0"
2806     },
2807     "albums": {
2808       "entry": [
2809         {
2810           "key": {
2811             "name": "albumCustomerMap",
2812             "version": "0.0.1"
2813           },
2814           "value": {
2815             "key": {
2816               "name": "albumCustomerMap",
2817               "version": "0.0.1"
2818             },
2819             "scope": "global",
2820             "isWritable": true,
2821             "itemSchema": {
2822               "name": "ctxtCustomerMapDecl",
2823               "version": "1.0.0"
2824             }
2825           }
2826         },
2827         {
2828           "key": {
2829             "name": "albumProblemMap",
2830             "version": "0.0.1"
2831           },
2832           "value": {
2833             "key": {
2834               "name": "albumProblemMap",
2835               "version": "0.0.1"
2836             },
2837             "scope": "global",
2838             "isWritable": true,
2839             "itemSchema": {
2840               "name": "problemMapDecl",
2841               "version": "1.0.0"
2842             }
2843           }
2844         },
2845         {
2846           "key": {
2847             "name": "albumTopoEdges",
2848             "version": "0.0.1"
2849           },
2850           "value": {
2851             "key": {
2852               "name": "albumTopoEdges",
2853               "version": "0.0.1"
2854             },
2855             "scope": "global",
2856             "isWritable": true,
2857             "itemSchema": {
2858               "name": "ctxtTopologyEdgesDecl",
2859               "version": "1.0.0"
2860             }
2861           }
2862         },
2863         {
2864           "key": {
2865             "name": "albumTopoNodes",
2866             "version": "0.0.1"
2867           },
2868           "value": {
2869             "key": {
2870               "name": "albumTopoNodes",
2871               "version": "0.0.1"
2872             },
2873             "scope": "global",
2874             "isWritable": true,
2875             "itemSchema": {
2876               "name": "ctxtTopologyNodesDecl",
2877               "version": "1.0.0"
2878             }
2879           }
2880         }
2881       ]
2882     }
2883   },
2884   "schemas": {
2885     "key": {
2886       "name": "PCVS-VpnSla_Schemas",
2887       "version": "1.0.0"
2888     },
2889     "schemas": {
2890       "entry": [
2891         {
2892           "key": {
2893             "name": "actionDecl",
2894             "version": "1.0.0"
2895           },
2896           "value": {
2897             "key": {
2898               "name": "actionDecl",
2899               "version": "1.0.0"
2900             },
2901             "schemaFlavour": "Java",
2902             "schemaDefinition": "java.lang.String"
2903           }
2904         },
2905         {
2906           "key": {
2907             "name": "ctxtCustomerDowntimeSLADecl",
2908             "version": "1.0.0"
2909           },
2910           "value": {
2911             "key": {
2912               "name": "ctxtCustomerDowntimeSLADecl",
2913               "version": "1.0.0"
2914             },
2915             "schemaFlavour": "Java",
2916             "schemaDefinition": "java.lang.Integer"
2917           }
2918         },
2919         {
2920           "key": {
2921             "name": "ctxtCustomerDowntimeYTDDecl",
2922             "version": "1.0.0"
2923           },
2924           "value": {
2925             "key": {
2926               "name": "ctxtCustomerDowntimeYTDDecl",
2927               "version": "1.0.0"
2928             },
2929             "schemaFlavour": "Java",
2930             "schemaDefinition": "java.lang.Integer"
2931           }
2932         },
2933         {
2934           "key": {
2935             "name": "ctxtCustomerLinksDecl",
2936             "version": "1.0.0"
2937           },
2938           "value": {
2939             "key": {
2940               "name": "ctxtCustomerLinksDecl",
2941               "version": "1.0.0"
2942             },
2943             "schemaFlavour": "Java",
2944             "schemaDefinition": "java.lang.String"
2945           }
2946         },
2947         {
2948           "key": {
2949             "name": "ctxtCustomerMapDecl",
2950             "version": "1.0.0"
2951           },
2952           "value": {
2953             "key": {
2954               "name": "ctxtCustomerMapDecl",
2955               "version": "1.0.0"
2956             },
2957             "schemaFlavour": "Avro",
2958             "schemaDefinition": "{\n    \"type\" : \"record\",\n    \"name\" : \"Customer\",\n    \"fields\" : [\n        {\"name\" : \"customerName\", \"type\" : \"string\"},\n        {\"name\" : \"dtSLA\"       , \"type\" : \"int\"},\n        {\"name\" : \"dtYTD\"       , \"type\" : \"int\"},\n        {\"name\" : \"priority\"    , \"type\" : \"boolean\"},\n        {\"name\" : \"satisfaction\", \"type\" : \"int\"},\n        {\n            \"name\": \"links\",\n            \"doc\": \"Links used by this customer\",\n            \"type\": {\"type\"  : \"array\", \"items\" : \"string\"}\n        }\n    ]\n}"
2959           }
2960         },
2961         {
2962           "key": {
2963             "name": "ctxtCustomerNameDecl",
2964             "version": "1.0.0"
2965           },
2966           "value": {
2967             "key": {
2968               "name": "ctxtCustomerNameDecl",
2969               "version": "1.0.0"
2970             },
2971             "schemaFlavour": "Java",
2972             "schemaDefinition": "java.lang.String"
2973           }
2974         },
2975         {
2976           "key": {
2977             "name": "ctxtCustomerPriorityDecl",
2978             "version": "1.0.0"
2979           },
2980           "value": {
2981             "key": {
2982               "name": "ctxtCustomerPriorityDecl",
2983               "version": "1.0.0"
2984             },
2985             "schemaFlavour": "Java",
2986             "schemaDefinition": "java.lang.Boolean"
2987           }
2988         },
2989         {
2990           "key": {
2991             "name": "ctxtCustomerSatisfactionDecl",
2992             "version": "1.0.0"
2993           },
2994           "value": {
2995             "key": {
2996               "name": "ctxtCustomerSatisfactionDecl",
2997               "version": "1.0.0"
2998             },
2999             "schemaFlavour": "Java",
3000             "schemaDefinition": "java.lang.Integer"
3001           }
3002         },
3003         {
3004           "key": {
3005             "name": "ctxtEdgeEndDecl",
3006             "version": "1.0.0"
3007           },
3008           "value": {
3009             "key": {
3010               "name": "ctxtEdgeEndDecl",
3011               "version": "1.0.0"
3012             },
3013             "schemaFlavour": "Java",
3014             "schemaDefinition": "java.lang.String"
3015           }
3016         },
3017         {
3018           "key": {
3019             "name": "ctxtEdgeNameDecl",
3020             "version": "1.0.0"
3021           },
3022           "value": {
3023             "key": {
3024               "name": "ctxtEdgeNameDecl",
3025               "version": "1.0.0"
3026             },
3027             "schemaFlavour": "Java",
3028             "schemaDefinition": "java.lang.String"
3029           }
3030         },
3031         {
3032           "key": {
3033             "name": "ctxtEdgeStartDecl",
3034             "version": "1.0.0"
3035           },
3036           "value": {
3037             "key": {
3038               "name": "ctxtEdgeStartDecl",
3039               "version": "1.0.0"
3040             },
3041             "schemaFlavour": "Java",
3042             "schemaDefinition": "java.lang.String"
3043           }
3044         },
3045         {
3046           "key": {
3047             "name": "ctxtEdgeStatusDecl",
3048             "version": "1.0.0"
3049           },
3050           "value": {
3051             "key": {
3052               "name": "ctxtEdgeStatusDecl",
3053               "version": "1.0.0"
3054             },
3055             "schemaFlavour": "Java",
3056             "schemaDefinition": "java.lang.Boolean"
3057           }
3058         },
3059         {
3060           "key": {
3061             "name": "ctxtNodeMininetNameDecl",
3062             "version": "1.0.0"
3063           },
3064           "value": {
3065             "key": {
3066               "name": "ctxtNodeMininetNameDecl",
3067               "version": "1.0.0"
3068             },
3069             "schemaFlavour": "Java",
3070             "schemaDefinition": "java.lang.String"
3071           }
3072         },
3073         {
3074           "key": {
3075             "name": "ctxtNodeNameDecl",
3076             "version": "1.0.0"
3077           },
3078           "value": {
3079             "key": {
3080               "name": "ctxtNodeNameDecl",
3081               "version": "1.0.0"
3082             },
3083             "schemaFlavour": "Java",
3084             "schemaDefinition": "java.lang.String"
3085           }
3086         },
3087         {
3088           "key": {
3089             "name": "ctxtTopologyEdgesDecl",
3090             "version": "1.0.0"
3091           },
3092           "value": {
3093             "key": {
3094               "name": "ctxtTopologyEdgesDecl",
3095               "version": "1.0.0"
3096             },
3097             "schemaFlavour": "Avro",
3098             "schemaDefinition": "{\n    \"type\" : \"record\",\n    \"name\" : \"TopologyEdges\",\n    \"fields\" : [\n        {\"name\": \"name\",   \"type\": \"string\",  \"doc\": \"Name of the Edge, typically a link name\"},\n        {\"name\": \"start\",  \"type\": \"string\",  \"doc\": \"Edge endpoint: start - a node name\"},\n        {\"name\": \"end\",    \"type\": \"string\",  \"doc\": \"Edge endpoint: end - a node name\"},\n        {\"name\": \"active\", \"type\": \"boolean\", \"doc\": \"Flag for active/inactive edges, inactive means a link is down\"}\n    ]\n}"
3099           }
3100         },
3101         {
3102           "key": {
3103             "name": "ctxtTopologyNodesDecl",
3104             "version": "1.0.0"
3105           },
3106           "value": {
3107             "key": {
3108               "name": "ctxtTopologyNodesDecl",
3109               "version": "1.0.0"
3110             },
3111             "schemaFlavour": "Avro",
3112             "schemaDefinition": "{\n    \"type\" : \"record\",\n    \"name\" : \"TopologyNodes\",\n    \"fields\" : [\n        {\"name\" : \"name\",   \"type\" : \"string\", \"doc\": \"The name of the node\"},\n        {\"name\" : \"mnname\", \"type\" : \"string\", \"doc\": \"The name of the node in Mininet\"}\n    ]\n}"
3113           }
3114         },
3115         {
3116           "key": {
3117             "name": "decideDecisionDecl",
3118             "version": "1.0.0"
3119           },
3120           "value": {
3121             "key": {
3122               "name": "decideDecisionDecl",
3123               "version": "1.0.0"
3124             },
3125             "schemaFlavour": "Avro",
3126             "schemaDefinition": "{\n    \"type\" : \"record\",\n    \"name\" : \"Situation\",\n    \"fields\" : [\n        {\"name\": \"description\", \"type\": \"string\", \"doc\": \"Description of the taken decision\"},\n        {\n            \"name\": \"decision\",\n            \"doc\": \"taken decision\",\n            \"type\": {\n                \"type\": \"enum\",\n                \"name\": \"decisionEnum\",\n                \"symbols\" : [\n                    \"IMPEDE\",\n                    \"REBUILD\",\n                    \"NONE\"\n                ]\n            }\n        },\n        {\"name\": \"customers\", \"type\": {\"type\" : \"array\", \"items\" : \"string\"}, \"doc\": \"List of customers affected by the decision\"},\n        {\"name\": \"problemID\", \"type\": \"string\", \"doc\": \"Identifier of the problem for lookup in problemMap\"}\n    ]\n}"
3127           }
3128         },
3129         {
3130           "key": {
3131             "name": "edgeChangedDecl",
3132             "version": "1.0.0"
3133           },
3134           "value": {
3135             "key": {
3136               "name": "edgeChangedDecl",
3137               "version": "1.0.0"
3138             },
3139             "schemaFlavour": "Java",
3140             "schemaDefinition": "java.lang.Boolean"
3141           }
3142         },
3143         {
3144           "key": {
3145             "name": "edgeNameDecl",
3146             "version": "1.0.0"
3147           },
3148           "value": {
3149             "key": {
3150               "name": "edgeNameDecl",
3151               "version": "1.0.0"
3152             },
3153             "schemaFlavour": "Java",
3154             "schemaDefinition": "java.lang.String"
3155           }
3156         },
3157         {
3158           "key": {
3159             "name": "edgeStatusDecl",
3160             "version": "1.0.0"
3161           },
3162           "value": {
3163             "key": {
3164               "name": "edgeStatusDecl",
3165               "version": "1.0.0"
3166             },
3167             "schemaFlavour": "Avro",
3168             "schemaDefinition": "{\n    \"type\": \"enum\",\n    \"name\": \"Status\",\n    \"symbols\" : [\n        \"UP\",\n        \"DOWN\"\n    ]\n}"
3169           }
3170         },
3171         {
3172           "key": {
3173             "name": "establishSituationDecl",
3174             "version": "1.0.0"
3175           },
3176           "value": {
3177             "key": {
3178               "name": "establishSituationDecl",
3179               "version": "1.0.0"
3180             },
3181             "schemaFlavour": "Avro",
3182             "schemaDefinition": "{\n    \"type\" : \"record\",\n    \"name\" : \"Situation\",\n    \"fields\" : [\n        {\"name\": \"problemID\",    \"type\": \"string\",                               \"doc\": \"Identifier of the problem for lookup in problemMap\"},\n        {\"name\": \"violatedSLAs\", \"type\": {\"type\" : \"array\", \"items\" : \"string\"}, \"doc\": \"List of customers with SLA violations\"}\n    ]\n}"
3183           }
3184         },
3185         {
3186           "key": {
3187             "name": "problemMapDecl",
3188             "version": "1.0.0"
3189           },
3190           "value": {
3191             "key": {
3192               "name": "problemMapDecl",
3193               "version": "1.0.0"
3194             },
3195             "schemaFlavour": "Avro",
3196             "schemaDefinition": "{\n    \"type\" : \"record\",\n    \"name\" : \"Problem\",\n    \"fields\" : [\n        {\"name\": \"edge\",       \"type\": \"string\"},\n        {\"name\": \"startTime\",  \"type\": \"long\"},\n        {\"name\": \"lastUpdate\", \"type\": \"long\"},\n        {\"name\": \"endTime\",    \"type\": \"long\"},\n        {\n            \"name\": \"status\",\n            \"doc\": \"problem status\",\n            \"type\": {\n                \"type\": \"enum\",\n                \"name\": \"statusEnum\",\n                \"symbols\" : [\n                    \"NONE\",\n                    \"STILL\",\n                    \"SOLVED\",\n                    \"NEW\"\n                ]\n            }\n        },\n        {\n            \"name\": \"edgeUsedBy\",\n            \"doc\": \"customers using the edge\",\n            \"type\": {\"type\" : \"array\", \"items\" : \"string\"}\n        },\n        {\n            \"name\": \"impededLast\",\n            \"doc\": \"customers last impeded\",\n            \"type\": {\"type\" : \"array\", \"items\" : \"string\"}\n        }\n    ]\n}"
3197           }
3198         },
3199         {
3200           "key": {
3201             "name": "reportDecl",
3202             "version": "1.0.0"
3203           },
3204           "value": {
3205             "key": {
3206               "name": "reportDecl",
3207               "version": "1.0.0"
3208             },
3209             "schemaFlavour": "Java",
3210             "schemaDefinition": "java.lang.String"
3211           }
3212         },
3213         {
3214           "key": {
3215             "name": "timestampDecl",
3216             "version": "1.0.0"
3217           },
3218           "value": {
3219             "key": {
3220               "name": "timestampDecl",
3221               "version": "1.0.0"
3222             },
3223             "schemaFlavour": "Java",
3224             "schemaDefinition": "java.lang.Long"
3225           }
3226         }
3227       ]
3228     }
3229   },
3230   "key": {
3231     "name": "PCVS-VpnSla",
3232     "version": "1.0.0"
3233   },
3234   "keyInformation": {
3235     "key": {
3236       "name": "PCVS-VpnSla_KeyInfo",
3237       "version": "1.0.0"
3238     },
3239     "keyInfoMap": {
3240       "entry": [
3241         {
3242           "key": {
3243             "name": "CustomerContextEventIn",
3244             "version": "1.0.0"
3245           },
3246           "value": {
3247             "key": {
3248               "name": "CustomerContextEventIn",
3249               "version": "1.0.0"
3250             },
3251             "UUID": "1ce15f63-7c90-3a13-96d9-e3964f76aa0e",
3252             "description": "Event to add Customers to engine Context"
3253           }
3254         },
3255         {
3256           "key": {
3257             "name": "CustomerContextPolicy",
3258             "version": "1.0.0"
3259           },
3260           "value": {
3261             "key": {
3262               "name": "CustomerContextPolicy",
3263               "version": "1.0.0"
3264             },
3265             "UUID": "91854e6d-868b-3d1a-aff1-a9390173f144",
3266             "description": "Policy that adds Customer information to engine context"
3267           }
3268         },
3269         {
3270           "key": {
3271             "name": "CustomerContextTask",
3272             "version": "1.0.0"
3273           },
3274           "value": {
3275             "key": {
3276               "name": "CustomerContextTask",
3277               "version": "1.0.0"
3278             },
3279             "UUID": "c43c4cdc-71ef-3e0e-90a2-e36f4f355e3e",
3280             "description": "This task adds event context to customer context"
3281           }
3282         },
3283         {
3284           "key": {
3285             "name": "EdgeContextEventIn",
3286             "version": "1.0.0"
3287           },
3288           "value": {
3289             "key": {
3290               "name": "EdgeContextEventIn",
3291               "version": "1.0.0"
3292             },
3293             "UUID": "1817ee7e-d91a-33cb-b9e3-fa60e5c2f340",
3294             "description": "Event to add an Edge to engine Context"
3295           }
3296         },
3297         {
3298           "key": {
3299             "name": "EdgeContextPolicy",
3300             "version": "1.0.0"
3301           },
3302           "value": {
3303             "key": {
3304               "name": "EdgeContextPolicy",
3305               "version": "1.0.0"
3306             },
3307             "UUID": "652dc1e9-1030-3fe1-8e6e-f7758c68959f",
3308             "description": "Policy that adds an edge to context"
3309           }
3310         },
3311         {
3312           "key": {
3313             "name": "EdgeContextTask",
3314             "version": "1.0.0"
3315           },
3316           "value": {
3317             "key": {
3318               "name": "EdgeContextTask",
3319               "version": "1.0.0"
3320             },
3321             "UUID": "bb3dd70d-ab5c-3ea4-81ca-92f578e9808b",
3322             "description": "This task adds event context to edge context"
3323           }
3324         },
3325         {
3326           "key": {
3327             "name": "NodeContextEventIn",
3328             "version": "1.0.0"
3329           },
3330           "value": {
3331             "key": {
3332               "name": "NodeContextEventIn",
3333               "version": "1.0.0"
3334             },
3335             "UUID": "38bb48b4-07fd-3e53-976d-651fd0bbf5e1",
3336             "description": "Event to add Node to engine Context"
3337           }
3338         },
3339         {
3340           "key": {
3341             "name": "NodeContextPolicy",
3342             "version": "1.0.0"
3343           },
3344           "value": {
3345             "key": {
3346               "name": "NodeContextPolicy",
3347               "version": "1.0.0"
3348             },
3349             "UUID": "6dd58709-d4b7-31d6-8230-ab91e548985a",
3350             "description": "Policy that adds an node to context"
3351           }
3352         },
3353         {
3354           "key": {
3355             "name": "NodeContextTask",
3356             "version": "1.0.0"
3357           },
3358           "value": {
3359             "key": {
3360               "name": "NodeContextTask",
3361               "version": "1.0.0"
3362             },
3363             "UUID": "32ffcbca-fee6-3cb4-b311-fa3ba6a3b9b7",
3364             "description": "This task adds event context to node context"
3365           }
3366         },
3367         {
3368           "key": {
3369             "name": "PCVS-VpnSla",
3370             "version": "1.0.0"
3371           },
3372           "value": {
3373             "key": {
3374               "name": "PCVS-VpnSla",
3375               "version": "1.0.0"
3376             },
3377             "UUID": "fc0d1be0-fc4f-3758-b530-6435d279951e",
3378             "description": "Policies-Controlled Video Streaming, VPN SLA Policy Model"
3379           }
3380         },
3381         {
3382           "key": {
3383             "name": "PCVS-VpnSla_Albums",
3384             "version": "1.0.0"
3385           },
3386           "value": {
3387             "key": {
3388               "name": "PCVS-VpnSla_Albums",
3389               "version": "1.0.0"
3390             },
3391             "UUID": "2e34f18e-37e6-35d2-ba11-e20f96e113d5",
3392             "description": "Generated description for concept referred to by key \"PCVS-VpnSla_Albums:1.0.0\""
3393           }
3394         },
3395         {
3396           "key": {
3397             "name": "PCVS-VpnSla_Events",
3398             "version": "1.0.0"
3399           },
3400           "value": {
3401             "key": {
3402               "name": "PCVS-VpnSla_Events",
3403               "version": "1.0.0"
3404             },
3405             "UUID": "0c04d3b3-86aa-39c2-938e-b44224cb0798",
3406             "description": "Generated description for concept referred to by key \"PCVS-VpnSla_Events:1.0.0\""
3407           }
3408         },
3409         {
3410           "key": {
3411             "name": "PCVS-VpnSla_KeyInfo",
3412             "version": "1.0.0"
3413           },
3414           "value": {
3415             "key": {
3416               "name": "PCVS-VpnSla_KeyInfo",
3417               "version": "1.0.0"
3418             },
3419             "UUID": "6f257a91-576d-3e49-92ca-9c9a92994cff",
3420             "description": "Generated description for concept referred to by key \"PCVS-VpnSla_KeyInfo:1.0.0\""
3421           }
3422         },
3423         {
3424           "key": {
3425             "name": "PCVS-VpnSla_Policies",
3426             "version": "1.0.0"
3427           },
3428           "value": {
3429             "key": {
3430               "name": "PCVS-VpnSla_Policies",
3431               "version": "1.0.0"
3432             },
3433             "UUID": "af00d5d2-f584-37eb-a539-db10284828d8",
3434             "description": "Generated description for concept referred to by key \"PCVS-VpnSla_Policies:1.0.0\""
3435           }
3436         },
3437         {
3438           "key": {
3439             "name": "PCVS-VpnSla_Schemas",
3440             "version": "1.0.0"
3441           },
3442           "value": {
3443             "key": {
3444               "name": "PCVS-VpnSla_Schemas",
3445               "version": "1.0.0"
3446             },
3447             "UUID": "390c3e62-0455-330c-8bdc-c835322cca9c",
3448             "description": "Generated description for concept referred to by key \"PCVS-VpnSla_Schemas:1.0.0\""
3449           }
3450         },
3451         {
3452           "key": {
3453             "name": "PCVS-VpnSla_Tasks",
3454             "version": "1.0.0"
3455           },
3456           "value": {
3457             "key": {
3458               "name": "PCVS-VpnSla_Tasks",
3459               "version": "1.0.0"
3460             },
3461             "UUID": "5834101d-d5e7-323e-8bd2-595ed4618f07",
3462             "description": "Generated description for concept referred to by key \"PCVS-VpnSla_Tasks:1.0.0\""
3463           }
3464         },
3465         {
3466           "key": {
3467             "name": "ReportOut",
3468             "version": "1.0.0"
3469           },
3470           "value": {
3471             "key": {
3472               "name": "ReportOut",
3473               "version": "1.0.0"
3474             },
3475             "UUID": "29b332dc-e8b6-390e-8b41-3edbba45da44",
3476             "description": "Report of a policy (issued by a task)"
3477           }
3478         },
3479         {
3480           "key": {
3481             "name": "VpnSlaActOut",
3482             "version": "1.0.0"
3483           },
3484           "value": {
3485             "key": {
3486               "name": "VpnSlaActOut",
3487               "version": "1.0.0"
3488             },
3489             "UUID": "37d5dfba-d6e0-35a5-958b-21f77cb78a0c",
3490             "description": "Event action"
3491           }
3492         },
3493         {
3494           "key": {
3495             "name": "VpnSlaDecideOut",
3496             "version": "1.0.0"
3497           },
3498           "value": {
3499             "key": {
3500               "name": "VpnSlaDecideOut",
3501               "version": "1.0.0"
3502             },
3503             "UUID": "8d4ea7ed-ed7a-3f34-8ecc-56f6f192357c",
3504             "description": "Event with a decision for the SLA policy"
3505           }
3506         },
3507         {
3508           "key": {
3509             "name": "VpnSlaEstablishOut",
3510             "version": "1.0.0"
3511           },
3512           "value": {
3513             "key": {
3514               "name": "VpnSlaEstablishOut",
3515               "version": "1.0.0"
3516             },
3517             "UUID": "e3fde4f3-338a-3759-a2d8-f23c6fd390ac",
3518             "description": "Event with situation for the SLA policy"
3519           }
3520         },
3521         {
3522           "key": {
3523             "name": "VpnSlaMatchOut",
3524             "version": "1.0.0"
3525           },
3526           "value": {
3527             "key": {
3528               "name": "VpnSlaMatchOut",
3529               "version": "1.0.0"
3530             },
3531             "UUID": "40aa223f-4689-3de1-bfb5-7889a07f6045",
3532             "description": "Event with matched trigger for the VPN SLA policy"
3533           }
3534         },
3535         {
3536           "key": {
3537             "name": "VpnSlaPolicy",
3538             "version": "1.0.0"
3539           },
3540           "value": {
3541             "key": {
3542               "name": "VpnSlaPolicy",
3543               "version": "1.0.0"
3544             },
3545             "UUID": "cd75105c-4cdb-312d-9372-aa508f4c400c",
3546             "description": "Policy deciding customer treatment based on SLAs as MEDA policy"
3547           }
3548         },
3549         {
3550           "key": {
3551             "name": "VpnSlaPolicyActTask",
3552             "version": "1.0.0"
3553           },
3554           "value": {
3555             "key": {
3556               "name": "VpnSlaPolicyActTask",
3557               "version": "1.0.0"
3558             },
3559             "UUID": "c6ff32e6-261b-35cc-a8e8-ba87ecf555e6",
3560             "description": "Task issueing an action for taken decision"
3561           }
3562         },
3563         {
3564           "key": {
3565             "name": "VpnSlaPolicyDecideNoneTask",
3566             "version": "1.0.0"
3567           },
3568           "value": {
3569             "key": {
3570               "name": "VpnSlaPolicyDecideNoneTask",
3571               "version": "1.0.0"
3572             },
3573             "UUID": "360c7f52-0930-38e5-ab54-59e4f3930c1e",
3574             "description": "Decide task for a \u0027none\u0027 problem"
3575           }
3576         },
3577         {
3578           "key": {
3579             "name": "VpnSlaPolicyDecidePriorityTask",
3580             "version": "1.0.0"
3581           },
3582           "value": {
3583             "key": {
3584               "name": "VpnSlaPolicyDecidePriorityTask",
3585               "version": "1.0.0"
3586             },
3587             "UUID": "f5226370-98b2-322d-9eb9-a17dfd834104",
3588             "description": "Decide task solving the problem by using customer priorities"
3589           }
3590         },
3591         {
3592           "key": {
3593             "name": "VpnSlaPolicyDecideSlaTask",
3594             "version": "1.0.0"
3595           },
3596           "value": {
3597             "key": {
3598               "name": "VpnSlaPolicyDecideSlaTask",
3599               "version": "1.0.0"
3600             },
3601             "UUID": "c231c338-fda7-3cc3-b282-382c0ace4015",
3602             "description": "Decide task solving the problem by balancing SLAs"
3603           }
3604         },
3605         {
3606           "key": {
3607             "name": "VpnSlaPolicyDecideSolvedTask",
3608             "version": "1.0.0"
3609           },
3610           "value": {
3611             "key": {
3612               "name": "VpnSlaPolicyDecideSolvedTask",
3613               "version": "1.0.0"
3614             },
3615             "UUID": "5e5b3951-a4c3-387d-9b75-ad1197372695",
3616             "description": "Decide task solving the problem by using customer priorities"
3617           }
3618         },
3619         {
3620           "key": {
3621             "name": "VpnSlaPolicyEstablishTask",
3622             "version": "1.0.0"
3623           },
3624           "value": {
3625             "key": {
3626               "name": "VpnSlaPolicyEstablishTask",
3627               "version": "1.0.0"
3628             },
3629             "UUID": "83774c6c-73dd-3ce6-98ed-6c9295da9562",
3630             "description": "Task taking a match event and establishing a situation"
3631           }
3632         },
3633         {
3634           "key": {
3635             "name": "VpnSlaPolicyMatchTask",
3636             "version": "1.0.0"
3637           },
3638           "value": {
3639             "key": {
3640               "name": "VpnSlaPolicyMatchTask",
3641               "version": "1.0.0"
3642             },
3643             "UUID": "bb6c7e85-b5de-3f02-96c6-34c85ae174e3",
3644             "description": "Pre-process an edge event"
3645           }
3646         },
3647         {
3648           "key": {
3649             "name": "VpnSlaTrigger",
3650             "version": "1.0.0"
3651           },
3652           "value": {
3653             "key": {
3654               "name": "VpnSlaTrigger",
3655               "version": "1.0.0"
3656             },
3657             "UUID": "7224a6d5-02cf-3fa0-803e-f930120c14d3",
3658             "description": "Event triggering the VPN SLA policy"
3659           }
3660         },
3661         {
3662           "key": {
3663             "name": "actionDecl",
3664             "version": "1.0.0"
3665           },
3666           "value": {
3667             "key": {
3668               "name": "actionDecl",
3669               "version": "1.0.0"
3670             },
3671             "UUID": "9818146b-f42c-378b-8818-519d5e16ea2b",
3672             "description": "An action for the actioning system"
3673           }
3674         },
3675         {
3676           "key": {
3677             "name": "albumCustomerMap",
3678             "version": "0.0.1"
3679           },
3680           "value": {
3681             "key": {
3682               "name": "albumCustomerMap",
3683               "version": "0.0.1"
3684             },
3685             "UUID": "dde24214-9a5b-3995-a942-81e5c509af7d",
3686             "description": "Generated description for concept referred to by key \"albumCustomerMap:0.0.1\""
3687           }
3688         },
3689         {
3690           "key": {
3691             "name": "albumProblemMap",
3692             "version": "0.0.1"
3693           },
3694           "value": {
3695             "key": {
3696               "name": "albumProblemMap",
3697               "version": "0.0.1"
3698             },
3699             "UUID": "681ed388-d70e-3a87-a322-a11813fb4cd5",
3700             "description": "Generated description for concept referred to by key \"albumProblemMap:0.0.1\""
3701           }
3702         },
3703         {
3704           "key": {
3705             "name": "albumTopoEdges",
3706             "version": "0.0.1"
3707           },
3708           "value": {
3709             "key": {
3710               "name": "albumTopoEdges",
3711               "version": "0.0.1"
3712             },
3713             "UUID": "4ac38510-3a01-33cc-9015-334408041b53",
3714             "description": "Generated description for concept referred to by key \"albumTopoEdges:0.0.1\""
3715           }
3716         },
3717         {
3718           "key": {
3719             "name": "albumTopoNodes",
3720             "version": "0.0.1"
3721           },
3722           "value": {
3723             "key": {
3724               "name": "albumTopoNodes",
3725               "version": "0.0.1"
3726             },
3727             "UUID": "0ca9d9c1-073f-3183-af0c-c5f02cbdb26b",
3728             "description": "Generated description for concept referred to by key \"albumTopoNodes:0.0.1\""
3729           }
3730         },
3731         {
3732           "key": {
3733             "name": "ctxtCustomerDowntimeSLADecl",
3734             "version": "1.0.0"
3735           },
3736           "value": {
3737             "key": {
3738               "name": "ctxtCustomerDowntimeSLADecl",
3739               "version": "1.0.0"
3740             },
3741             "UUID": "dd0d2302-58f2-3904-a5b2-60e950c7db9f",
3742             "description": "Customer Context: contracted downtime as per SLA"
3743           }
3744         },
3745         {
3746           "key": {
3747             "name": "ctxtCustomerDowntimeYTDDecl",
3748             "version": "1.0.0"
3749           },
3750           "value": {
3751             "key": {
3752               "name": "ctxtCustomerDowntimeYTDDecl",
3753               "version": "1.0.0"
3754             },
3755             "UUID": "dc75514e-19dc-307e-9de9-c07317197b17",
3756             "description": "Customer Context: year-to-date downtime experienced"
3757           }
3758         },
3759         {
3760           "key": {
3761             "name": "ctxtCustomerLinksDecl",
3762             "version": "1.0.0"
3763           },
3764           "value": {
3765             "key": {
3766               "name": "ctxtCustomerLinksDecl",
3767               "version": "1.0.0"
3768             },
3769             "UUID": "49c6b6e3-d987-3612-a846-9305fc5369f2",
3770             "description": "Customer Context: links a customer uses (for events/task)"
3771           }
3772         },
3773         {
3774           "key": {
3775             "name": "ctxtCustomerMapDecl",
3776             "version": "1.0.0"
3777           },
3778           "value": {
3779             "key": {
3780               "name": "ctxtCustomerMapDecl",
3781               "version": "1.0.0"
3782             },
3783             "UUID": "a32fe8e8-f626-3ad6-a979-6dc0897d0435",
3784             "description": "Map of customers with all known information"
3785           }
3786         },
3787         {
3788           "key": {
3789             "name": "ctxtCustomerNameDecl",
3790             "version": "1.0.0"
3791           },
3792           "value": {
3793             "key": {
3794               "name": "ctxtCustomerNameDecl",
3795               "version": "1.0.0"
3796             },
3797             "UUID": "38151d46-be2d-354b-8142-994d880314a0",
3798             "description": "Customer Context: customer name"
3799           }
3800         },
3801         {
3802           "key": {
3803             "name": "ctxtCustomerPriorityDecl",
3804             "version": "1.0.0"
3805           },
3806           "value": {
3807             "key": {
3808               "name": "ctxtCustomerPriorityDecl",
3809               "version": "1.0.0"
3810             },
3811             "UUID": "8c4d86b6-58fa-38a8-a86c-1498701a08fa",
3812             "description": "Customer Context: priority flag"
3813           }
3814         },
3815         {
3816           "key": {
3817             "name": "ctxtCustomerSatisfactionDecl",
3818             "version": "1.0.0"
3819           },
3820           "value": {
3821             "key": {
3822               "name": "ctxtCustomerSatisfactionDecl",
3823               "version": "1.0.0"
3824             },
3825             "UUID": "5d995fbe-f60a-3e6a-b60e-ed46dba0fc28",
3826             "description": "Customer Context: satisfaction in percent"
3827           }
3828         },
3829         {
3830           "key": {
3831             "name": "ctxtEdgeEndDecl",
3832             "version": "1.0.0"
3833           },
3834           "value": {
3835             "key": {
3836               "name": "ctxtEdgeEndDecl",
3837               "version": "1.0.0"
3838             },
3839             "UUID": "a68eab04-4297-369b-85ac-2968e418fcbd",
3840             "description": "Topology Edges: edge endpoint (end)"
3841           }
3842         },
3843         {
3844           "key": {
3845             "name": "ctxtEdgeNameDecl",
3846             "version": "1.0.0"
3847           },
3848           "value": {
3849             "key": {
3850               "name": "ctxtEdgeNameDecl",
3851               "version": "1.0.0"
3852             },
3853             "UUID": "7688d4e1-bb1f-30f3-92a6-f3eef9816236",
3854             "description": "Topology Edges: edge (link) name"
3855           }
3856         },
3857         {
3858           "key": {
3859             "name": "ctxtEdgeStartDecl",
3860             "version": "1.0.0"
3861           },
3862           "value": {
3863             "key": {
3864               "name": "ctxtEdgeStartDecl",
3865               "version": "1.0.0"
3866             },
3867             "UUID": "c20605f1-5b90-38a5-8782-d2d23309007a",
3868             "description": "Topology Edges: edge endpoint (start)"
3869           }
3870         },
3871         {
3872           "key": {
3873             "name": "ctxtEdgeStatusDecl",
3874             "version": "1.0.0"
3875           },
3876           "value": {
3877             "key": {
3878               "name": "ctxtEdgeStatusDecl",
3879               "version": "1.0.0"
3880             },
3881             "UUID": "785e1b75-5389-35b6-b4a1-e9ec49891155",
3882             "description": "Topology Edges: edge status as up (true) or down (false)"
3883           }
3884         },
3885         {
3886           "key": {
3887             "name": "ctxtNodeMininetNameDecl",
3888             "version": "1.0.0"
3889           },
3890           "value": {
3891             "key": {
3892               "name": "ctxtNodeMininetNameDecl",
3893               "version": "1.0.0"
3894             },
3895             "UUID": "ecfd3326-1425-3793-b4fb-54d5ca58324c",
3896             "description": "Topology Nodes: node name in Mininet"
3897           }
3898         },
3899         {
3900           "key": {
3901             "name": "ctxtNodeNameDecl",
3902             "version": "1.0.0"
3903           },
3904           "value": {
3905             "key": {
3906               "name": "ctxtNodeNameDecl",
3907               "version": "1.0.0"
3908             },
3909             "UUID": "80654d36-82eb-3dc6-b411-1442341946fb",
3910             "description": "Topology Nodes: node name"
3911           }
3912         },
3913         {
3914           "key": {
3915             "name": "ctxtTopologyEdgesDecl",
3916             "version": "1.0.0"
3917           },
3918           "value": {
3919             "key": {
3920               "name": "ctxtTopologyEdgesDecl",
3921               "version": "1.0.0"
3922             },
3923             "UUID": "d2561824-0bf1-3923-b779-89d2e527c507",
3924             "description": "Topology Edges Context Map"
3925           }
3926         },
3927         {
3928           "key": {
3929             "name": "ctxtTopologyNodesDecl",
3930             "version": "1.0.0"
3931           },
3932           "value": {
3933             "key": {
3934               "name": "ctxtTopologyNodesDecl",
3935               "version": "1.0.0"
3936             },
3937             "UUID": "0ee08c50-b09e-36d5-8fb0-ec97c5be8b20",
3938             "description": "Topology Nodes Context Map"
3939           }
3940         },
3941         {
3942           "key": {
3943             "name": "decideDecisionDecl",
3944             "version": "1.0.0"
3945           },
3946           "value": {
3947             "key": {
3948               "name": "decideDecisionDecl",
3949               "version": "1.0.0"
3950             },
3951             "UUID": "8f9a3a78-1807-3be5-b70a-e084d638f1f2",
3952             "description": "Decide: the taken decision"
3953           }
3954         },
3955         {
3956           "key": {
3957             "name": "edgeChangedDecl",
3958             "version": "1.0.0"
3959           },
3960           "value": {
3961             "key": {
3962               "name": "edgeChangedDecl",
3963               "version": "1.0.0"
3964             },
3965             "UUID": "d21f8db2-1ac0-345a-b328-9227b47628fd",
3966             "description": "Status Change (true:change, false:no change)"
3967           }
3968         },
3969         {
3970           "key": {
3971             "name": "edgeNameDecl",
3972             "version": "1.0.0"
3973           },
3974           "value": {
3975             "key": {
3976               "name": "edgeNameDecl",
3977               "version": "1.0.0"
3978             },
3979             "UUID": "bd8f33d8-b7a5-3fae-82b8-783b84bc7e17",
3980             "description": "Edge name"
3981           }
3982         },
3983         {
3984           "key": {
3985             "name": "edgeStatusDecl",
3986             "version": "1.0.0"
3987           },
3988           "value": {
3989             "key": {
3990               "name": "edgeStatusDecl",
3991               "version": "1.0.0"
3992             },
3993             "UUID": "ba935212-80f1-3ac1-96d9-6e2519773b9c",
3994             "description": "Statuf of the edge (UP, DOWN)"
3995           }
3996         },
3997         {
3998           "key": {
3999             "name": "establishSituationDecl",
4000             "version": "1.0.0"
4001           },
4002           "value": {
4003             "key": {
4004               "name": "establishSituationDecl",
4005               "version": "1.0.0"
4006             },
4007             "UUID": "206ffbd0-cb07-329a-93fe-990961e3f92c",
4008             "description": "Establish: the situation that was established"
4009           }
4010         },
4011         {
4012           "key": {
4013             "name": "problemMapDecl",
4014             "version": "1.0.0"
4015           },
4016           "value": {
4017             "key": {
4018               "name": "problemMapDecl",
4019               "version": "1.0.0"
4020             },
4021             "UUID": "260c46a5-4e27-3575-9076-0ff72c9bf32a",
4022             "description": "Map of problems with all known Information"
4023           }
4024         },
4025         {
4026           "key": {
4027             "name": "reportDecl",
4028             "version": "1.0.0"
4029           },
4030           "value": {
4031             "key": {
4032               "name": "reportDecl",
4033               "version": "1.0.0"
4034             },
4035             "UUID": "788e86c5-26d6-3af1-b1ab-2d530a0a45fb",
4036             "description": "Report of activities of a policy/task"
4037           }
4038         },
4039         {
4040           "key": {
4041             "name": "timestampDecl",
4042             "version": "1.0.0"
4043           },
4044           "value": {
4045             "key": {
4046               "name": "timestampDecl",
4047               "version": "1.0.0"
4048             },
4049             "UUID": "4d385841-1db1-3ddc-bb7b-8b67b3c701ad",
4050             "description": "Timestamp"
4051           }
4052         }
4053       ]
4054     }
4055   }
4056 }