Remove dmaap from models
[policy/models.git] / models-examples / src / main / resources / policies / vCPE.apex.policy.operational.input.tosca.json
1 {
2   "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
3   "topology_template": {
4     "policies": [
5       {
6         "operational.apex.vCPE": {
7           "type": "onap.policies.controlloop.operational.common.Apex",
8           "type_version": "1.0.0",
9           "derived_from": "tosca.policies.Root",
10           "name": "operational.apex.vCPE",
11           "version": "1.0.0",
12           "properties": {
13             "engineServiceParameters": {
14               "name": "MyApexEngine",
15               "version": "0.0.1",
16               "id": 45,
17               "instanceCount": 4,
18               "deploymentPort": 12561,
19               "policy_type_impl": {
20                 "apexPolicyModel": {
21                   "key": {
22                     "name": "ONAPvCPEPolicyModel",
23                     "version": "0.0.1"
24                   },
25                   "keyInformation": {
26                     "key": {
27                       "name": "ONAPvCPEPolicyModel_KeyInfo",
28                       "version": "0.0.1"
29                     },
30                     "keyInfoMap": {
31                       "entry": [
32                         {
33                           "key": {
34                             "name": "AAILookupTask",
35                             "version": "0.0.1"
36                           },
37                           "value": {
38                             "key": {
39                               "name": "AAILookupTask",
40                               "version": "0.0.1"
41                             },
42                             "UUID": "bc77813f-e2fa-33e0-aef0-c5b6a8832698",
43                             "description": "Generated description for concept referred to by key \"AAILookupTask:0.0.1\""
44                           }
45                         },
46                         {
47                           "key": {
48                             "name": "APPCLCMRequestType",
49                             "version": "0.0.1"
50                           },
51                           "value": {
52                             "key": {
53                               "name": "APPCLCMRequestType",
54                               "version": "0.0.1"
55                             },
56                             "UUID": "ab26e475-d09d-36cd-a65c-8a8b556f0fa2",
57                             "description": "Generated description for concept referred to by key \"APPCLCMRequestType:0.0.1\""
58                           }
59                         },
60                         {
61                           "key": {
62                             "name": "APPCLCMResponseType",
63                             "version": "0.0.1"
64                           },
65                           "value": {
66                             "key": {
67                               "name": "APPCLCMResponseType",
68                               "version": "0.0.1"
69                             },
70                             "UUID": "a60b42bb-c308-30ea-be59-5bc54864508b",
71                             "description": "Generated description for concept referred to by key \"APPCLCMResponseType:0.0.1\""
72                           }
73                         },
74                         {
75                           "key": {
76                             "name": "APPCRestartVNFRequestEvent",
77                             "version": "2.0.0"
78                           },
79                           "value": {
80                             "key": {
81                               "name": "APPCRestartVNFRequestEvent",
82                               "version": "2.0.0"
83                             },
84                             "UUID": "0b16f8d9-6ee9-30d7-bcd2-e4ded9fccf9b",
85                             "description": "Generated description for concept referred to by key \"APPCRestartVNFRequestEvent:2.0.0\""
86                           }
87                         },
88                         {
89                           "key": {
90                             "name": "APPCRestartVNFRequestTask",
91                             "version": "0.0.1"
92                           },
93                           "value": {
94                             "key": {
95                               "name": "APPCRestartVNFRequestTask",
96                               "version": "0.0.1"
97                             },
98                             "UUID": "719ae90e-ab01-322e-ace3-8c379e7c1fbf",
99                             "description": "Generated description for concept referred to by key \"APPCRestartVNFRequestTask:0.0.1\""
100                           }
101                         },
102                         {
103                           "key": {
104                             "name": "APPCRestartVNFResponseEvent",
105                             "version": "2.0.0"
106                           },
107                           "value": {
108                             "key": {
109                               "name": "APPCRestartVNFResponseEvent",
110                               "version": "2.0.0"
111                             },
112                             "UUID": "7034c5a9-2ea7-3e9e-9ccf-3610c3bf80d9",
113                             "description": "Generated description for concept referred to by key \"APPCRestartVNFResponseEvent:2.0.0\""
114                           }
115                         },
116                         {
117                           "key": {
118                             "name": "APPCRestartVNFResponseTask",
119                             "version": "0.0.1"
120                           },
121                           "value": {
122                             "key": {
123                               "name": "APPCRestartVNFResponseTask",
124                               "version": "0.0.1"
125                             },
126                             "UUID": "fe641fd9-6583-37c5-b317-2a33a3ca5ac7",
127                             "description": "Generated description for concept referred to by key \"APPCRestartVNFResponseTask:0.0.1\""
128                           }
129                         },
130                         {
131                           "key": {
132                             "name": "AbatedTask",
133                             "version": "0.0.1"
134                           },
135                           "value": {
136                             "key": {
137                               "name": "AbatedTask",
138                               "version": "0.0.1"
139                             },
140                             "UUID": "0eb3974f-4fdc-3c90-b351-34e7e18ff1ab",
141                             "description": "Generated description for concept referred to by key \"AbatedTask:0.0.1\""
142                           }
143                         },
144                         {
145                           "key": {
146                             "name": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
147                             "version": "1.0.2"
148                           },
149                           "value": {
150                             "key": {
151                               "name": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
152                               "version": "1.0.2"
153                             },
154                             "UUID": "63ff5c25-f245-37e9-a580-6ac274ced3a7",
155                             "description": "Generated description for concept referred to by key \"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e:1.0.2\""
156                           }
157                         },
158                         {
159                           "key": {
160                             "name": "ControlLoopExecutionIDAlbum",
161                             "version": "0.0.1"
162                           },
163                           "value": {
164                             "key": {
165                               "name": "ControlLoopExecutionIDAlbum",
166                               "version": "0.0.1"
167                             },
168                             "UUID": "5b2bc0cf-0807-3ab1-9004-f21806d800f0",
169                             "description": "Generated description for concept referred to by key \"ControlLoopExecutionIDAlbum:0.0.1\""
170                           }
171                         },
172                         {
173                           "key": {
174                             "name": "ControlLoopLogEvent",
175                             "version": "0.0.1"
176                           },
177                           "value": {
178                             "key": {
179                               "name": "ControlLoopLogEvent",
180                               "version": "0.0.1"
181                             },
182                             "UUID": "ed8a82ad-52c2-3d58-8c08-601606894b86",
183                             "description": "Generated description for concept referred to by key \"ControlLoopLogEvent:0.0.1\""
184                           }
185                         },
186                         {
187                           "key": {
188                             "name": "ControlLoopLogTask",
189                             "version": "0.0.1"
190                           },
191                           "value": {
192                             "key": {
193                               "name": "ControlLoopLogTask",
194                               "version": "0.0.1"
195                             },
196                             "UUID": "1b175691-6b5d-31f6-bf2d-4be95a01f92e",
197                             "description": "Generated description for concept referred to by key \"ControlLoopLogTask:0.0.1\""
198                           }
199                         },
200                         {
201                           "key": {
202                             "name": "DeniedTask",
203                             "version": "0.0.1"
204                           },
205                           "value": {
206                             "key": {
207                               "name": "DeniedTask",
208                               "version": "0.0.1"
209                             },
210                             "UUID": "00142e3c-ee3b-323f-9490-6e4b7f34b09f",
211                             "description": "Generated description for concept referred to by key \"DeniedTask:0.0.1\""
212                           }
213                         },
214                         {
215                           "key": {
216                             "name": "GetVCPEStateTask",
217                             "version": "0.0.1"
218                           },
219                           "value": {
220                             "key": {
221                               "name": "GetVCPEStateTask",
222                               "version": "0.0.1"
223                             },
224                             "UUID": "644d2a3d-0f3a-3664-8000-280c400a5cc1",
225                             "description": "Generated description for concept referred to by key \"GetVCPEStateTask:0.0.1\""
226                           }
227                         },
228                         {
229                           "key": {
230                             "name": "GuardDecisionAttributesType",
231                             "version": "0.0.1"
232                           },
233                           "value": {
234                             "key": {
235                               "name": "GuardDecisionAttributesType",
236                               "version": "0.0.1"
237                             },
238                             "UUID": "5f6dff51-c183-322f-9aba-c6074aa0ece5",
239                             "description": "Generated description for concept referred to by key \"GuardDecisionAttributesType:0.0.1\""
240                           }
241                         },
242                         {
243                           "key": {
244                             "name": "GuardRequestEvent",
245                             "version": "0.0.1"
246                           },
247                           "value": {
248                             "key": {
249                               "name": "GuardRequestEvent",
250                               "version": "0.0.1"
251                             },
252                             "UUID": "fb383a58-715b-3972-a3e6-38010a8de234",
253                             "description": "Generated description for concept referred to by key \"GuardRequestEvent:0.0.1\""
254                           }
255                         },
256                         {
257                           "key": {
258                             "name": "GuardRequestTask",
259                             "version": "0.0.1"
260                           },
261                           "value": {
262                             "key": {
263                               "name": "GuardRequestTask",
264                               "version": "0.0.1"
265                             },
266                             "UUID": "0427d63c-da78-334c-a5bd-95fbbb162398",
267                             "description": "Generated description for concept referred to by key \"GuardRequestTask:0.0.1\""
268                           }
269                         },
270                         {
271                           "key": {
272                             "name": "GuardResponseEvent",
273                             "version": "0.0.1"
274                           },
275                           "value": {
276                             "key": {
277                               "name": "GuardResponseEvent",
278                               "version": "0.0.1"
279                             },
280                             "UUID": "395f6d46-cf24-3d3e-b1fd-1a189a58993d",
281                             "description": "Generated description for concept referred to by key \"GuardResponseEvent:0.0.1\""
282                           }
283                         },
284                         {
285                           "key": {
286                             "name": "GuardResponseTask",
287                             "version": "0.0.1"
288                           },
289                           "value": {
290                             "key": {
291                               "name": "GuardResponseTask",
292                               "version": "0.0.1"
293                             },
294                             "UUID": "1a8b3f30-a7aa-330b-8131-4aea06ad6934",
295                             "description": "Generated description for concept referred to by key \"GuardResponseTask:0.0.1\""
296                           }
297                         },
298                         {
299                           "key": {
300                             "name": "NoAAILookupTask",
301                             "version": "0.0.1"
302                           },
303                           "value": {
304                             "key": {
305                               "name": "NoAAILookupTask",
306                               "version": "0.0.1"
307                             },
308                             "UUID": "648bc8f9-ad2b-3a1b-abe2-89401645f191",
309                             "description": "Generated description for concept referred to by key \"NoAAILookupTask:0.0.1\""
310                           }
311                         },
312                         {
313                           "key": {
314                             "name": "ONAPvCPEPolicyModel",
315                             "version": "0.0.1"
316                           },
317                           "value": {
318                             "key": {
319                               "name": "ONAPvCPEPolicyModel",
320                               "version": "0.0.1"
321                             },
322                             "UUID": "cf1aa7f4-6fe3-3cba-90b4-49dcf46f0d57",
323                             "description": "Generated description for concept referred to by key \"ONAPvCPEPolicyModel:0.0.1\""
324                           }
325                         },
326                         {
327                           "key": {
328                             "name": "ONAPvCPEPolicyModel_Albums",
329                             "version": "0.0.1"
330                           },
331                           "value": {
332                             "key": {
333                               "name": "ONAPvCPEPolicyModel_Albums",
334                               "version": "0.0.1"
335                             },
336                             "UUID": "13f8471b-2b9c-32e0-940b-fe640ea442cf",
337                             "description": "Generated description for concept referred to by key \"ONAPvCPEPolicyModel_Albums:0.0.1\""
338                           }
339                         },
340                         {
341                           "key": {
342                             "name": "ONAPvCPEPolicyModel_Events",
343                             "version": "0.0.1"
344                           },
345                           "value": {
346                             "key": {
347                               "name": "ONAPvCPEPolicyModel_Events",
348                               "version": "0.0.1"
349                             },
350                             "UUID": "4b8e6653-731d-38c5-a195-0cadf533a7a1",
351                             "description": "Generated description for concept referred to by key \"ONAPvCPEPolicyModel_Events:0.0.1\""
352                           }
353                         },
354                         {
355                           "key": {
356                             "name": "ONAPvCPEPolicyModel_KeyInfo",
357                             "version": "0.0.1"
358                           },
359                           "value": {
360                             "key": {
361                               "name": "ONAPvCPEPolicyModel_KeyInfo",
362                               "version": "0.0.1"
363                             },
364                             "UUID": "87a9d6da-7d4b-3041-8a70-49442750d590",
365                             "description": "Generated description for concept referred to by key \"ONAPvCPEPolicyModel_KeyInfo:0.0.1\""
366                           }
367                         },
368                         {
369                           "key": {
370                             "name": "ONAPvCPEPolicyModel_Policies",
371                             "version": "0.0.1"
372                           },
373                           "value": {
374                             "key": {
375                               "name": "ONAPvCPEPolicyModel_Policies",
376                               "version": "0.0.1"
377                             },
378                             "UUID": "6220cca4-66f5-3d1b-9f19-688a9b4b70f5",
379                             "description": "Generated description for concept referred to by key \"ONAPvCPEPolicyModel_Policies:0.0.1\""
380                           }
381                         },
382                         {
383                           "key": {
384                             "name": "ONAPvCPEPolicyModel_Schemas",
385                             "version": "0.0.1"
386                           },
387                           "value": {
388                             "key": {
389                               "name": "ONAPvCPEPolicyModel_Schemas",
390                               "version": "0.0.1"
391                             },
392                             "UUID": "3df4eef8-e764-3398-afe9-86730e20905a",
393                             "description": "Generated description for concept referred to by key \"ONAPvCPEPolicyModel_Schemas:0.0.1\""
394                           }
395                         },
396                         {
397                           "key": {
398                             "name": "ONAPvCPEPolicyModel_Tasks",
399                             "version": "0.0.1"
400                           },
401                           "value": {
402                             "key": {
403                               "name": "ONAPvCPEPolicyModel_Tasks",
404                               "version": "0.0.1"
405                             },
406                             "UUID": "1781b875-a3e8-3407-98bd-ba9580cfc543",
407                             "description": "Generated description for concept referred to by key \"ONAPvCPEPolicyModel_Tasks:0.0.1\""
408                           }
409                         },
410                         {
411                           "key": {
412                             "name": "ReceiveEventPolicy",
413                             "version": "0.0.1"
414                           },
415                           "value": {
416                             "key": {
417                               "name": "ReceiveEventPolicy",
418                               "version": "0.0.1"
419                             },
420                             "UUID": "568b7345-9de1-36d3-b6a3-9b857e6809a1",
421                             "description": "Generated description for concept referred to by key \"ReceiveEventPolicy:0.0.1\""
422                           }
423                         },
424                         {
425                           "key": {
426                             "name": "RequestIDVNFIDAlbum",
427                             "version": "0.0.1"
428                           },
429                           "value": {
430                             "key": {
431                               "name": "RequestIDVNFIDAlbum",
432                               "version": "0.0.1"
433                             },
434                             "UUID": "5d8e8298-ded6-30a5-9825-48111dc17a58",
435                             "description": "Generated description for concept referred to by key \"RequestIDVNFIDAlbum:0.0.1\""
436                           }
437                         },
438                         {
439                           "key": {
440                             "name": "RestartAPPCRequestPolicy",
441                             "version": "0.0.1"
442                           },
443                           "value": {
444                             "key": {
445                               "name": "RestartAPPCRequestPolicy",
446                               "version": "0.0.1"
447                             },
448                             "UUID": "33d02162-314b-352b-b8b9-2862e8883894",
449                             "description": "Generated description for concept referred to by key \"RestartAPPCRequestPolicy:0.0.1\""
450                           }
451                         },
452                         {
453                           "key": {
454                             "name": "RestartAPPCResponsePolicy",
455                             "version": "0.0.1"
456                           },
457                           "value": {
458                             "key": {
459                               "name": "RestartAPPCResponsePolicy",
460                               "version": "0.0.1"
461                             },
462                             "UUID": "ef4fcbd2-1609-377c-9875-8d27f7a901df",
463                             "description": "Generated description for concept referred to by key \"RestartAPPCResponsePolicy:0.0.1\""
464                           }
465                         },
466                         {
467                           "key": {
468                             "name": "SimpleBooleanType",
469                             "version": "0.0.1"
470                           },
471                           "value": {
472                             "key": {
473                               "name": "SimpleBooleanType",
474                               "version": "0.0.1"
475                             },
476                             "UUID": "7218fb2f-59e3-321d-9ae1-bc97b19eb4ae",
477                             "description": "Generated description for concept referred to by key \"SimpleBooleanType:0.0.1\""
478                           }
479                         },
480                         {
481                           "key": {
482                             "name": "SimpleLongType",
483                             "version": "0.0.1"
484                           },
485                           "value": {
486                             "key": {
487                               "name": "SimpleLongType",
488                               "version": "0.0.1"
489                             },
490                             "UUID": "2dfcd9ec-a6f9-3f9f-958f-9b36cf4ac574",
491                             "description": "Generated description for concept referred to by key \"SimpleLongType:0.0.1\""
492                           }
493                         },
494                         {
495                           "key": {
496                             "name": "SimpleStringType",
497                             "version": "0.0.1"
498                           },
499                           "value": {
500                             "key": {
501                               "name": "SimpleStringType",
502                               "version": "0.0.1"
503                             },
504                             "UUID": "8a4957cf-9493-3a76-8c22-a208e23259af",
505                             "description": "Generated description for concept referred to by key \"SimpleStringType:0.0.1\""
506                           }
507                         },
508                         {
509                           "key": {
510                             "name": "UUIDType",
511                             "version": "0.0.1"
512                           },
513                           "value": {
514                             "key": {
515                               "name": "UUIDType",
516                               "version": "0.0.1"
517                             },
518                             "UUID": "6a8cc68e-dfc8-3403-9c6d-071c886b319c",
519                             "description": "Generated description for concept referred to by key \"UUIDType:0.0.1\""
520                           }
521                         },
522                         {
523                           "key": {
524                             "name": "VCPEClosedLoopStatusAlbum",
525                             "version": "0.0.1"
526                           },
527                           "value": {
528                             "key": {
529                               "name": "VCPEClosedLoopStatusAlbum",
530                               "version": "0.0.1"
531                             },
532                             "UUID": "47a4403e-3074-3964-83ef-93eefaffd192",
533                             "description": "Generated description for concept referred to by key \"VCPEClosedLoopStatusAlbum:0.0.1\""
534                           }
535                         },
536                         {
537                           "key": {
538                             "name": "VCPEClosedLoopStatusType",
539                             "version": "0.0.1"
540                           },
541                           "value": {
542                             "key": {
543                               "name": "VCPEClosedLoopStatusType",
544                               "version": "0.0.1"
545                             },
546                             "UUID": "6e7dced1-53f1-39e2-b4e6-412b75d5b9e6",
547                             "description": "Generated description for concept referred to by key \"VCPEClosedLoopStatusType:0.0.1\""
548                           }
549                         },
550                         {
551                           "key": {
552                             "name": "VCPEStateUpdatedEvent",
553                             "version": "0.0.1"
554                           },
555                           "value": {
556                             "key": {
557                               "name": "VCPEStateUpdatedEvent",
558                               "version": "0.0.1"
559                             },
560                             "UUID": "5e56a3fd-f82a-3ced-821b-b9fbaf65d367",
561                             "description": "Generated description for concept referred to by key \"VCPEStateUpdatedEvent:0.0.1\""
562                           }
563                         },
564                         {
565                           "key": {
566                             "name": "VirtualControlLoopEventType",
567                             "version": "0.0.1"
568                           },
569                           "value": {
570                             "key": {
571                               "name": "VirtualControlLoopEventType",
572                               "version": "0.0.1"
573                             },
574                             "UUID": "15aca887-8f6c-3713-8114-0f49f03adab7",
575                             "description": "Generated description for concept referred to by key \"VirtualControlLoopEventType:0.0.1\""
576                           }
577                         },
578                         {
579                           "key": {
580                             "name": "VirtualControlLoopNotificationType",
581                             "version": "0.0.1"
582                           },
583                           "value": {
584                             "key": {
585                               "name": "VirtualControlLoopNotificationType",
586                               "version": "0.0.1"
587                             },
588                             "UUID": "283f5b0d-d8cd-31b0-91fa-89b9de2e1fda",
589                             "description": "Generated description for concept referred to by key \"VirtualControlLoopNotificationType:0.0.1\""
590                           }
591                         }
592                       ]
593                     }
594                   },
595                   "policies": {
596                     "key": {
597                       "name": "ONAPvCPEPolicyModel_Policies",
598                       "version": "0.0.1"
599                     },
600                     "policyMap": {
601                       "entry": [
602                         {
603                           "key": {
604                             "name": "ReceiveEventPolicy",
605                             "version": "0.0.1"
606                           },
607                           "value": {
608                             "policyKey": {
609                               "name": "ReceiveEventPolicy",
610                               "version": "0.0.1"
611                             },
612                             "template": "Freestyle",
613                             "state": {
614                               "entry": [
615                                 {
616                                   "key": "AbatedState",
617                                   "value": {
618                                     "stateKey": {
619                                       "parentKeyName": "ReceiveEventPolicy",
620                                       "parentKeyVersion": "0.0.1",
621                                       "parentLocalName": "NULL",
622                                       "localName": "AbatedState"
623                                     },
624                                     "trigger": {
625                                       "name": "VCPEStateUpdatedEvent",
626                                       "version": "0.0.1"
627                                     },
628                                     "stateOutputs": {
629                                       "entry": [
630                                         {
631                                           "key": "AbatedOutput",
632                                           "value": {
633                                             "key": {
634                                               "parentKeyName": "ReceiveEventPolicy",
635                                               "parentKeyVersion": "0.0.1",
636                                               "parentLocalName": "AbatedState",
637                                               "localName": "AbatedOutput"
638                                             },
639                                             "outgoingEvent": {
640                                               "name": "ControlLoopLogEvent",
641                                               "version": "0.0.1"
642                                             },
643                                             "nextState": {
644                                               "parentKeyName": "NULL",
645                                               "parentKeyVersion": "0.0.0",
646                                               "parentLocalName": "NULL",
647                                               "localName": "NULL"
648                                             }
649                                           }
650                                         }
651                                       ]
652                                     },
653                                     "contextAlbumReference": [],
654                                     "taskSelectionLogic": {
655                                       "key": "NULL",
656                                       "logicFlavour": "UNDEFINED",
657                                       "logic": ""
658                                     },
659                                     "stateFinalizerLogicMap": {
660                                       "entry": []
661                                     },
662                                     "defaultTask": {
663                                       "name": "ControlLoopLogTask",
664                                       "version": "0.0.1"
665                                     },
666                                     "taskReferences": {
667                                       "entry": [
668                                         {
669                                           "key": {
670                                             "name": "ControlLoopLogTask",
671                                             "version": "0.0.1"
672                                           },
673                                           "value": {
674                                             "key": {
675                                               "parentKeyName": "ReceiveEventPolicy",
676                                               "parentKeyVersion": "0.0.1",
677                                               "parentLocalName": "AbatedState",
678                                               "localName": "ReceiveEventPolicy"
679                                             },
680                                             "outputType": "DIRECT",
681                                             "output": {
682                                               "parentKeyName": "ReceiveEventPolicy",
683                                               "parentKeyVersion": "0.0.1",
684                                               "parentLocalName": "AbatedState",
685                                               "localName": "AbatedOutput"
686                                             }
687                                           }
688                                         }
689                                       ]
690                                     }
691                                   }
692                                 },
693                                 {
694                                   "key": "GetVCPEState",
695                                   "value": {
696                                     "stateKey": {
697                                       "parentKeyName": "ReceiveEventPolicy",
698                                       "parentKeyVersion": "0.0.1",
699                                       "parentLocalName": "NULL",
700                                       "localName": "GetVCPEState"
701                                     },
702                                     "trigger": {
703                                       "name": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
704                                       "version": "1.0.2"
705                                     },
706                                     "stateOutputs": {
707                                       "entry": [
708                                         {
709                                           "key": "GetVCPEStateOutput",
710                                           "value": {
711                                             "key": {
712                                               "parentKeyName": "ReceiveEventPolicy",
713                                               "parentKeyVersion": "0.0.1",
714                                               "parentLocalName": "GetVCPEState",
715                                               "localName": "GetVCPEStateOutput"
716                                             },
717                                             "outgoingEvent": {
718                                               "name": "VCPEStateUpdatedEvent",
719                                               "version": "0.0.1"
720                                             },
721                                             "nextState": {
722                                               "parentKeyName": "ReceiveEventPolicy",
723                                               "parentKeyVersion": "0.0.1",
724                                               "parentLocalName": "NULL",
725                                               "localName": "RequestAAIState"
726                                             }
727                                           }
728                                         }
729                                       ]
730                                     },
731                                     "contextAlbumReference": [],
732                                     "taskSelectionLogic": {
733                                       "key": "NULL",
734                                       "logicFlavour": "UNDEFINED",
735                                       "logic": ""
736                                     },
737                                     "stateFinalizerLogicMap": {
738                                       "entry": []
739                                     },
740                                     "defaultTask": {
741                                       "name": "GetVCPEStateTask",
742                                       "version": "0.0.1"
743                                     },
744                                     "taskReferences": {
745                                       "entry": [
746                                         {
747                                           "key": {
748                                             "name": "GetVCPEStateTask",
749                                             "version": "0.0.1"
750                                           },
751                                           "value": {
752                                             "key": {
753                                               "parentKeyName": "ReceiveEventPolicy",
754                                               "parentKeyVersion": "0.0.1",
755                                               "parentLocalName": "GetVCPEState",
756                                               "localName": "ReceiveEventPolicy"
757                                             },
758                                             "outputType": "DIRECT",
759                                             "output": {
760                                               "parentKeyName": "ReceiveEventPolicy",
761                                               "parentKeyVersion": "0.0.1",
762                                               "parentLocalName": "GetVCPEState",
763                                               "localName": "GetVCPEStateOutput"
764                                             }
765                                           }
766                                         }
767                                       ]
768                                     }
769                                   }
770                                 },
771                                 {
772                                   "key": "OnsetOrAbatedState",
773                                   "value": {
774                                     "stateKey": {
775                                       "parentKeyName": "ReceiveEventPolicy",
776                                       "parentKeyVersion": "0.0.1",
777                                       "parentLocalName": "NULL",
778                                       "localName": "OnsetOrAbatedState"
779                                     },
780                                     "trigger": {
781                                       "name": "VCPEStateUpdatedEvent",
782                                       "version": "0.0.1"
783                                     },
784                                     "stateOutputs": {
785                                       "entry": [
786                                         {
787                                           "key": "AbatedOutput",
788                                           "value": {
789                                             "key": {
790                                               "parentKeyName": "ReceiveEventPolicy",
791                                               "parentKeyVersion": "0.0.1",
792                                               "parentLocalName": "OnsetOrAbatedState",
793                                               "localName": "AbatedOutput"
794                                             },
795                                             "outgoingEvent": {
796                                               "name": "VCPEStateUpdatedEvent",
797                                               "version": "0.0.1"
798                                             },
799                                             "nextState": {
800                                               "parentKeyName": "ReceiveEventPolicy",
801                                               "parentKeyVersion": "0.0.1",
802                                               "parentLocalName": "NULL",
803                                               "localName": "AbatedState"
804                                             }
805                                           }
806                                         },
807                                         {
808                                           "key": "OnsetOutput",
809                                           "value": {
810                                             "key": {
811                                               "parentKeyName": "ReceiveEventPolicy",
812                                               "parentKeyVersion": "0.0.1",
813                                               "parentLocalName": "OnsetOrAbatedState",
814                                               "localName": "OnsetOutput"
815                                             },
816                                             "outgoingEvent": {
817                                               "name": "GuardRequestEvent",
818                                               "version": "0.0.1"
819                                             },
820                                             "nextState": {
821                                               "parentKeyName": "NULL",
822                                               "parentKeyVersion": "0.0.0",
823                                               "parentLocalName": "NULL",
824                                               "localName": "NULL"
825                                             }
826                                           }
827                                         }
828                                       ]
829                                     },
830                                     "contextAlbumReference": [
831                                       {
832                                         "name": "VCPEClosedLoopStatusAlbum",
833                                         "version": "0.0.1"
834                                       }
835                                     ],
836                                     "taskSelectionLogic": {
837                                       "key": "TaskSelectionLogic",
838                                       "logicFlavour": "JAVASCRIPT",
839                                       "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n *  Modifications Copyright (C) 2020 Nordix Foundation.\n * ================================================================================\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 * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.info(executor.subject.id);\nexecutor.logger.info(executor.inFields);\n\nvar returnValue = true;\nvar status = null;\n\nif( executor.inFields.get(\"vnfID\") == null) {\n   executor.logger.info(\"OnsetOrAbatedStateTSL: vnfID is null\");\n   var vnfName = executor.inFields.get(\"vnfName\");\n   var vcpeClosedLoopStatus = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").get(\n        executor.inFields.get(\"vnfName\"));\n   status = vcpeClosedLoopStatus.get(\"closedLoopEventStatus\").toString();\n} else {\n   var vcpeClosedLoopStatus = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").get(\n        executor.inFields.get(\"vnfID\").toString());\n   status = vcpeClosedLoopStatus.get(\"closedLoopEventStatus\").toString();\n}\n\nif (status == \"ONSET\") {\n    executor.subject.getTaskKey(\"GuardRequestTask\").copyTo(executor.selectedTask);\n} else if (status == \"ABATED\") {\n    executor.subject.getTaskKey(\"AbatedTask\").copyTo(executor.selectedTask);\n    onsetFlag = executor.isFalse;\n} else {\n    executor.message = \"closedLoopEventStatus is \\\"\" + status + \"\\\", it must be either \\\"ONSET\\\" or \\\"ABATED\\\"\";\n    returnValue = false;\n}\n\nexecutor.logger.info(\"ReceiveEventPolicyOnsetOrAbatedStateTSL State Selected Task:\" + executor.selectedTask);\n\nreturnValue;"
840                                     },
841                                     "stateFinalizerLogicMap": {
842                                       "entry": []
843                                     },
844                                     "defaultTask": {
845                                       "name": "AbatedTask",
846                                       "version": "0.0.1"
847                                     },
848                                     "taskReferences": {
849                                       "entry": [
850                                         {
851                                           "key": {
852                                             "name": "AbatedTask",
853                                             "version": "0.0.1"
854                                           },
855                                           "value": {
856                                             "key": {
857                                               "parentKeyName": "ReceiveEventPolicy",
858                                               "parentKeyVersion": "0.0.1",
859                                               "parentLocalName": "OnsetOrAbatedState",
860                                               "localName": "ReceiveEventPolicy"
861                                             },
862                                             "outputType": "DIRECT",
863                                             "output": {
864                                               "parentKeyName": "ReceiveEventPolicy",
865                                               "parentKeyVersion": "0.0.1",
866                                               "parentLocalName": "OnsetOrAbatedState",
867                                               "localName": "AbatedOutput"
868                                             }
869                                           }
870                                         },
871                                         {
872                                           "key": {
873                                             "name": "GuardRequestTask",
874                                             "version": "0.0.1"
875                                           },
876                                           "value": {
877                                             "key": {
878                                               "parentKeyName": "ReceiveEventPolicy",
879                                               "parentKeyVersion": "0.0.1",
880                                               "parentLocalName": "OnsetOrAbatedState",
881                                               "localName": "ReceiveEventPolicy"
882                                             },
883                                             "outputType": "DIRECT",
884                                             "output": {
885                                               "parentKeyName": "ReceiveEventPolicy",
886                                               "parentKeyVersion": "0.0.1",
887                                               "parentLocalName": "OnsetOrAbatedState",
888                                               "localName": "OnsetOutput"
889                                             }
890                                           }
891                                         }
892                                       ]
893                                     }
894                                   }
895                                 },
896                                 {
897                                   "key": "RequestAAIState",
898                                   "value": {
899                                     "stateKey": {
900                                       "parentKeyName": "ReceiveEventPolicy",
901                                       "parentKeyVersion": "0.0.1",
902                                       "parentLocalName": "NULL",
903                                       "localName": "RequestAAIState"
904                                     },
905                                     "trigger": {
906                                       "name": "VCPEStateUpdatedEvent",
907                                       "version": "0.0.1"
908                                     },
909                                     "stateOutputs": {
910                                       "entry": [
911                                         {
912                                           "key": "RequestAAIStateOutput",
913                                           "value": {
914                                             "key": {
915                                               "parentKeyName": "ReceiveEventPolicy",
916                                               "parentKeyVersion": "0.0.1",
917                                               "parentLocalName": "RequestAAIState",
918                                               "localName": "RequestAAIStateOutput"
919                                             },
920                                             "outgoingEvent": {
921                                               "name": "VCPEStateUpdatedEvent",
922                                               "version": "0.0.1"
923                                             },
924                                             "nextState": {
925                                               "parentKeyName": "ReceiveEventPolicy",
926                                               "parentKeyVersion": "0.0.1",
927                                               "parentLocalName": "NULL",
928                                               "localName": "OnsetOrAbatedState"
929                                             }
930                                           }
931                                         }
932                                       ]
933                                     },
934                                     "contextAlbumReference": [
935                                       {
936                                         "name": "VCPEClosedLoopStatusAlbum",
937                                         "version": "0.0.1"
938                                       }
939                                     ],
940                                     "taskSelectionLogic": {
941                                       "key": "NULL",
942                                       "logicFlavour": "UNDEFINED",
943                                       "logic": ""
944                                     },
945                                     "stateFinalizerLogicMap": {
946                                       "entry": []
947                                     },
948                                     "defaultTask": {
949                                       "name": "AAILookupTask",
950                                       "version": "0.0.1"
951                                     },
952                                     "taskReferences": {
953                                       "entry": [
954                                         {
955                                           "key": {
956                                             "name": "AAILookupTask",
957                                             "version": "0.0.1"
958                                           },
959                                           "value": {
960                                             "key": {
961                                               "parentKeyName": "ReceiveEventPolicy",
962                                               "parentKeyVersion": "0.0.1",
963                                               "parentLocalName": "RequestAAIState",
964                                               "localName": "ReceiveEventPolicy"
965                                             },
966                                             "outputType": "DIRECT",
967                                             "output": {
968                                               "parentKeyName": "ReceiveEventPolicy",
969                                               "parentKeyVersion": "0.0.1",
970                                               "parentLocalName": "RequestAAIState",
971                                               "localName": "RequestAAIStateOutput"
972                                             }
973                                           }
974                                         }
975                                       ]
976                                     }
977                                   }
978                                 }
979                               ]
980                             },
981                             "firstState": "GetVCPEState"
982                           }
983                         },
984                         {
985                           "key": {
986                             "name": "RestartAPPCRequestPolicy",
987                             "version": "0.0.1"
988                           },
989                           "value": {
990                             "policyKey": {
991                               "name": "RestartAPPCRequestPolicy",
992                               "version": "0.0.1"
993                             },
994                             "template": "Freestyle",
995                             "state": {
996                               "entry": [
997                                 {
998                                   "key": "DeniedState",
999                                   "value": {
1000                                     "stateKey": {
1001                                       "parentKeyName": "RestartAPPCRequestPolicy",
1002                                       "parentKeyVersion": "0.0.1",
1003                                       "parentLocalName": "NULL",
1004                                       "localName": "DeniedState"
1005                                     },
1006                                     "trigger": {
1007                                       "name": "VCPEStateUpdatedEvent",
1008                                       "version": "0.0.1"
1009                                     },
1010                                     "stateOutputs": {
1011                                       "entry": [
1012                                         {
1013                                           "key": "DeniedOutput",
1014                                           "value": {
1015                                             "key": {
1016                                               "parentKeyName": "RestartAPPCRequestPolicy",
1017                                               "parentKeyVersion": "0.0.1",
1018                                               "parentLocalName": "DeniedState",
1019                                               "localName": "DeniedOutput"
1020                                             },
1021                                             "outgoingEvent": {
1022                                               "name": "ControlLoopLogEvent",
1023                                               "version": "0.0.1"
1024                                             },
1025                                             "nextState": {
1026                                               "parentKeyName": "NULL",
1027                                               "parentKeyVersion": "0.0.0",
1028                                               "parentLocalName": "NULL",
1029                                               "localName": "NULL"
1030                                             }
1031                                           }
1032                                         }
1033                                       ]
1034                                     },
1035                                     "contextAlbumReference": [],
1036                                     "taskSelectionLogic": {
1037                                       "key": "NULL",
1038                                       "logicFlavour": "UNDEFINED",
1039                                       "logic": ""
1040                                     },
1041                                     "stateFinalizerLogicMap": {
1042                                       "entry": []
1043                                     },
1044                                     "defaultTask": {
1045                                       "name": "ControlLoopLogTask",
1046                                       "version": "0.0.1"
1047                                     },
1048                                     "taskReferences": {
1049                                       "entry": [
1050                                         {
1051                                           "key": {
1052                                             "name": "ControlLoopLogTask",
1053                                             "version": "0.0.1"
1054                                           },
1055                                           "value": {
1056                                             "key": {
1057                                               "parentKeyName": "RestartAPPCRequestPolicy",
1058                                               "parentKeyVersion": "0.0.1",
1059                                               "parentLocalName": "DeniedState",
1060                                               "localName": "RestartAPPCRequestPolicy"
1061                                             },
1062                                             "outputType": "DIRECT",
1063                                             "output": {
1064                                               "parentKeyName": "RestartAPPCRequestPolicy",
1065                                               "parentKeyVersion": "0.0.1",
1066                                               "parentLocalName": "DeniedState",
1067                                               "localName": "DeniedOutput"
1068                                             }
1069                                           }
1070                                         }
1071                                       ]
1072                                     }
1073                                   }
1074                                 },
1075                                 {
1076                                   "key": "PermitOrDenyState",
1077                                   "value": {
1078                                     "stateKey": {
1079                                       "parentKeyName": "RestartAPPCRequestPolicy",
1080                                       "parentKeyVersion": "0.0.1",
1081                                       "parentLocalName": "NULL",
1082                                       "localName": "PermitOrDenyState"
1083                                     },
1084                                     "trigger": {
1085                                       "name": "VCPEStateUpdatedEvent",
1086                                       "version": "0.0.1"
1087                                     },
1088                                     "stateOutputs": {
1089                                       "entry": [
1090                                         {
1091                                           "key": "DenyOutput",
1092                                           "value": {
1093                                             "key": {
1094                                               "parentKeyName": "RestartAPPCRequestPolicy",
1095                                               "parentKeyVersion": "0.0.1",
1096                                               "parentLocalName": "PermitOrDenyState",
1097                                               "localName": "DenyOutput"
1098                                             },
1099                                             "outgoingEvent": {
1100                                               "name": "VCPEStateUpdatedEvent",
1101                                               "version": "0.0.1"
1102                                             },
1103                                             "nextState": {
1104                                               "parentKeyName": "RestartAPPCRequestPolicy",
1105                                               "parentKeyVersion": "0.0.1",
1106                                               "parentLocalName": "NULL",
1107                                               "localName": "DeniedState"
1108                                             }
1109                                           }
1110                                         },
1111                                         {
1112                                           "key": "PermitOutput",
1113                                           "value": {
1114                                             "key": {
1115                                               "parentKeyName": "RestartAPPCRequestPolicy",
1116                                               "parentKeyVersion": "0.0.1",
1117                                               "parentLocalName": "PermitOrDenyState",
1118                                               "localName": "PermitOutput"
1119                                             },
1120                                             "outgoingEvent": {
1121                                               "name": "APPCRestartVNFRequestEvent",
1122                                               "version": "2.0.0"
1123                                             },
1124                                             "nextState": {
1125                                               "parentKeyName": "NULL",
1126                                               "parentKeyVersion": "0.0.0",
1127                                               "parentLocalName": "NULL",
1128                                               "localName": "NULL"
1129                                             }
1130                                           }
1131                                         }
1132                                       ]
1133                                     },
1134                                     "contextAlbumReference": [
1135                                       {
1136                                         "name": "VCPEClosedLoopStatusAlbum",
1137                                         "version": "0.0.1"
1138                                       }
1139                                     ],
1140                                     "taskSelectionLogic": {
1141                                       "key": "TaskSelectionLogic",
1142                                       "logicFlavour": "JAVASCRIPT",
1143                                       "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n *  Modifications Copyright (C) 2020 Nordix Foundation.\n * ================================================================================\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 * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.info(executor.subject.id);\nexecutor.logger.info(executor.inFields);\n\nvar vcpeClosedLoopStatus = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").get(\n        executor.inFields.get(\"vnfID\").toString());\n\nvar guardResult = vcpeClosedLoopStatus.get(\"notification\");\n\nif (guardResult == \"OPERATION: GUARD_PERMIT\") {\n    executor.subject.getTaskKey(\"APPCRestartVNFRequestTask\").copyTo(executor.selectedTask);\n} else {\n    executor.subject.getTaskKey(\"DeniedTask\").copyTo(executor.selectedTask);\n}\n\nexecutor.logger.info(\"RestartAPPCRequestPolicyPermitOrDenyTSL State Selected Task:\" + executor.selectedTask);\n\ntrue;"
1144                                     },
1145                                     "stateFinalizerLogicMap": {
1146                                       "entry": []
1147                                     },
1148                                     "defaultTask": {
1149                                       "name": "DeniedTask",
1150                                       "version": "0.0.1"
1151                                     },
1152                                     "taskReferences": {
1153                                       "entry": [
1154                                         {
1155                                           "key": {
1156                                             "name": "APPCRestartVNFRequestTask",
1157                                             "version": "0.0.1"
1158                                           },
1159                                           "value": {
1160                                             "key": {
1161                                               "parentKeyName": "RestartAPPCRequestPolicy",
1162                                               "parentKeyVersion": "0.0.1",
1163                                               "parentLocalName": "PermitOrDenyState",
1164                                               "localName": "RestartAPPCRequestPolicy"
1165                                             },
1166                                             "outputType": "DIRECT",
1167                                             "output": {
1168                                               "parentKeyName": "RestartAPPCRequestPolicy",
1169                                               "parentKeyVersion": "0.0.1",
1170                                               "parentLocalName": "PermitOrDenyState",
1171                                               "localName": "PermitOutput"
1172                                             }
1173                                           }
1174                                         },
1175                                         {
1176                                           "key": {
1177                                             "name": "DeniedTask",
1178                                             "version": "0.0.1"
1179                                           },
1180                                           "value": {
1181                                             "key": {
1182                                               "parentKeyName": "RestartAPPCRequestPolicy",
1183                                               "parentKeyVersion": "0.0.1",
1184                                               "parentLocalName": "PermitOrDenyState",
1185                                               "localName": "RestartAPPCRequestPolicy"
1186                                             },
1187                                             "outputType": "DIRECT",
1188                                             "output": {
1189                                               "parentKeyName": "RestartAPPCRequestPolicy",
1190                                               "parentKeyVersion": "0.0.1",
1191                                               "parentLocalName": "PermitOrDenyState",
1192                                               "localName": "DenyOutput"
1193                                             }
1194                                           }
1195                                         }
1196                                       ]
1197                                     }
1198                                   }
1199                                 },
1200                                 {
1201                                   "key": "PolicyGuardResponseState",
1202                                   "value": {
1203                                     "stateKey": {
1204                                       "parentKeyName": "RestartAPPCRequestPolicy",
1205                                       "parentKeyVersion": "0.0.1",
1206                                       "parentLocalName": "NULL",
1207                                       "localName": "PolicyGuardResponseState"
1208                                     },
1209                                     "trigger": {
1210                                       "name": "GuardResponseEvent",
1211                                       "version": "0.0.1"
1212                                     },
1213                                     "stateOutputs": {
1214                                       "entry": [
1215                                         {
1216                                           "key": "GuardResponseOutput",
1217                                           "value": {
1218                                             "key": {
1219                                               "parentKeyName": "RestartAPPCRequestPolicy",
1220                                               "parentKeyVersion": "0.0.1",
1221                                               "parentLocalName": "PolicyGuardResponseState",
1222                                               "localName": "GuardResponseOutput"
1223                                             },
1224                                             "outgoingEvent": {
1225                                               "name": "VCPEStateUpdatedEvent",
1226                                               "version": "0.0.1"
1227                                             },
1228                                             "nextState": {
1229                                               "parentKeyName": "RestartAPPCRequestPolicy",
1230                                               "parentKeyVersion": "0.0.1",
1231                                               "parentLocalName": "NULL",
1232                                               "localName": "PermitOrDenyState"
1233                                             }
1234                                           }
1235                                         }
1236                                       ]
1237                                     },
1238                                     "contextAlbumReference": [],
1239                                     "taskSelectionLogic": {
1240                                       "key": "NULL",
1241                                       "logicFlavour": "UNDEFINED",
1242                                       "logic": ""
1243                                     },
1244                                     "stateFinalizerLogicMap": {
1245                                       "entry": []
1246                                     },
1247                                     "defaultTask": {
1248                                       "name": "GuardResponseTask",
1249                                       "version": "0.0.1"
1250                                     },
1251                                     "taskReferences": {
1252                                       "entry": [
1253                                         {
1254                                           "key": {
1255                                             "name": "GuardResponseTask",
1256                                             "version": "0.0.1"
1257                                           },
1258                                           "value": {
1259                                             "key": {
1260                                               "parentKeyName": "RestartAPPCRequestPolicy",
1261                                               "parentKeyVersion": "0.0.1",
1262                                               "parentLocalName": "PolicyGuardResponseState",
1263                                               "localName": "RestartAPPCRequestPolicy"
1264                                             },
1265                                             "outputType": "DIRECT",
1266                                             "output": {
1267                                               "parentKeyName": "RestartAPPCRequestPolicy",
1268                                               "parentKeyVersion": "0.0.1",
1269                                               "parentLocalName": "PolicyGuardResponseState",
1270                                               "localName": "GuardResponseOutput"
1271                                             }
1272                                           }
1273                                         }
1274                                       ]
1275                                     }
1276                                   }
1277                                 }
1278                               ]
1279                             },
1280                             "firstState": "PolicyGuardResponseState"
1281                           }
1282                         },
1283                         {
1284                           "key": {
1285                             "name": "RestartAPPCResponsePolicy",
1286                             "version": "0.0.1"
1287                           },
1288                           "value": {
1289                             "policyKey": {
1290                               "name": "RestartAPPCResponsePolicy",
1291                               "version": "0.0.1"
1292                             },
1293                             "template": "Freestyle",
1294                             "state": {
1295                               "entry": [
1296                                 {
1297                                   "key": "ResponseLogState",
1298                                   "value": {
1299                                     "stateKey": {
1300                                       "parentKeyName": "RestartAPPCResponsePolicy",
1301                                       "parentKeyVersion": "0.0.1",
1302                                       "parentLocalName": "NULL",
1303                                       "localName": "ResponseLogState"
1304                                     },
1305                                     "trigger": {
1306                                       "name": "VCPEStateUpdatedEvent",
1307                                       "version": "0.0.1"
1308                                     },
1309                                     "stateOutputs": {
1310                                       "entry": [
1311                                         {
1312                                           "key": "ResponseLogOutput",
1313                                           "value": {
1314                                             "key": {
1315                                               "parentKeyName": "RestartAPPCResponsePolicy",
1316                                               "parentKeyVersion": "0.0.1",
1317                                               "parentLocalName": "ResponseLogState",
1318                                               "localName": "ResponseLogOutput"
1319                                             },
1320                                             "outgoingEvent": {
1321                                               "name": "ControlLoopLogEvent",
1322                                               "version": "0.0.1"
1323                                             },
1324                                             "nextState": {
1325                                               "parentKeyName": "NULL",
1326                                               "parentKeyVersion": "0.0.0",
1327                                               "parentLocalName": "NULL",
1328                                               "localName": "NULL"
1329                                             }
1330                                           }
1331                                         }
1332                                       ]
1333                                     },
1334                                     "contextAlbumReference": [],
1335                                     "taskSelectionLogic": {
1336                                       "key": "NULL",
1337                                       "logicFlavour": "UNDEFINED",
1338                                       "logic": ""
1339                                     },
1340                                     "stateFinalizerLogicMap": {
1341                                       "entry": []
1342                                     },
1343                                     "defaultTask": {
1344                                       "name": "ControlLoopLogTask",
1345                                       "version": "0.0.1"
1346                                     },
1347                                     "taskReferences": {
1348                                       "entry": [
1349                                         {
1350                                           "key": {
1351                                             "name": "ControlLoopLogTask",
1352                                             "version": "0.0.1"
1353                                           },
1354                                           "value": {
1355                                             "key": {
1356                                               "parentKeyName": "RestartAPPCResponsePolicy",
1357                                               "parentKeyVersion": "0.0.1",
1358                                               "parentLocalName": "ResponseLogState",
1359                                               "localName": "RestartAPPCResponsePolicy"
1360                                             },
1361                                             "outputType": "DIRECT",
1362                                             "output": {
1363                                               "parentKeyName": "RestartAPPCResponsePolicy",
1364                                               "parentKeyVersion": "0.0.1",
1365                                               "parentLocalName": "ResponseLogState",
1366                                               "localName": "ResponseLogOutput"
1367                                             }
1368                                           }
1369                                         }
1370                                       ]
1371                                     }
1372                                   }
1373                                 },
1374                                 {
1375                                   "key": "RestartAPPCResponseState",
1376                                   "value": {
1377                                     "stateKey": {
1378                                       "parentKeyName": "RestartAPPCResponsePolicy",
1379                                       "parentKeyVersion": "0.0.1",
1380                                       "parentLocalName": "NULL",
1381                                       "localName": "RestartAPPCResponseState"
1382                                     },
1383                                     "trigger": {
1384                                       "name": "APPCRestartVNFResponseEvent",
1385                                       "version": "2.0.0"
1386                                     },
1387                                     "stateOutputs": {
1388                                       "entry": [
1389                                         {
1390                                           "key": "APPCRestartVNFResponseOutput",
1391                                           "value": {
1392                                             "key": {
1393                                               "parentKeyName": "RestartAPPCResponsePolicy",
1394                                               "parentKeyVersion": "0.0.1",
1395                                               "parentLocalName": "RestartAPPCResponseState",
1396                                               "localName": "APPCRestartVNFResponseOutput"
1397                                             },
1398                                             "outgoingEvent": {
1399                                               "name": "VCPEStateUpdatedEvent",
1400                                               "version": "0.0.1"
1401                                             },
1402                                             "nextState": {
1403                                               "parentKeyName": "RestartAPPCResponsePolicy",
1404                                               "parentKeyVersion": "0.0.1",
1405                                               "parentLocalName": "NULL",
1406                                               "localName": "ResponseLogState"
1407                                             }
1408                                           }
1409                                         }
1410                                       ]
1411                                     },
1412                                     "contextAlbumReference": [],
1413                                     "taskSelectionLogic": {
1414                                       "key": "NULL",
1415                                       "logicFlavour": "UNDEFINED",
1416                                       "logic": ""
1417                                     },
1418                                     "stateFinalizerLogicMap": {
1419                                       "entry": []
1420                                     },
1421                                     "defaultTask": {
1422                                       "name": "APPCRestartVNFResponseTask",
1423                                       "version": "0.0.1"
1424                                     },
1425                                     "taskReferences": {
1426                                       "entry": [
1427                                         {
1428                                           "key": {
1429                                             "name": "APPCRestartVNFResponseTask",
1430                                             "version": "0.0.1"
1431                                           },
1432                                           "value": {
1433                                             "key": {
1434                                               "parentKeyName": "RestartAPPCResponsePolicy",
1435                                               "parentKeyVersion": "0.0.1",
1436                                               "parentLocalName": "RestartAPPCResponseState",
1437                                               "localName": "RestartAPPCResponsePolicy"
1438                                             },
1439                                             "outputType": "DIRECT",
1440                                             "output": {
1441                                               "parentKeyName": "RestartAPPCResponsePolicy",
1442                                               "parentKeyVersion": "0.0.1",
1443                                               "parentLocalName": "RestartAPPCResponseState",
1444                                               "localName": "APPCRestartVNFResponseOutput"
1445                                             }
1446                                           }
1447                                         }
1448                                       ]
1449                                     }
1450                                   }
1451                                 }
1452                               ]
1453                             },
1454                             "firstState": "RestartAPPCResponseState"
1455                           }
1456                         }
1457                       ]
1458                     }
1459                   },
1460                   "tasks": {
1461                     "key": {
1462                       "name": "ONAPvCPEPolicyModel_Tasks",
1463                       "version": "0.0.1"
1464                     },
1465                     "taskMap": {
1466                       "entry": [
1467                         {
1468                           "key": {
1469                             "name": "AAILookupTask",
1470                             "version": "0.0.1"
1471                           },
1472                           "value": {
1473                             "key": {
1474                               "name": "AAILookupTask",
1475                               "version": "0.0.1"
1476                             },
1477                             "inputFields": {
1478                               "entry": [
1479                                 {
1480                                   "key": "requestID",
1481                                   "value": {
1482                                     "key": "requestID",
1483                                     "fieldSchemaKey": {
1484                                       "name": "UUIDType",
1485                                       "version": "0.0.1"
1486                                     },
1487                                     "optional": false
1488                                   }
1489                                 },
1490                                 {
1491                                   "key": "vnfID",
1492                                   "value": {
1493                                     "key": "vnfID",
1494                                     "fieldSchemaKey": {
1495                                       "name": "UUIDType",
1496                                       "version": "0.0.1"
1497                                     },
1498                                     "optional": false
1499                                   }
1500                                 }
1501                               ]
1502                             },
1503                             "outputFields": {
1504                               "entry": [
1505                                 {
1506                                   "key": "requestID",
1507                                   "value": {
1508                                     "key": "requestID",
1509                                     "fieldSchemaKey": {
1510                                       "name": "UUIDType",
1511                                       "version": "0.0.1"
1512                                     },
1513                                     "optional": false
1514                                   }
1515                                 },
1516                                 {
1517                                   "key": "vnfID",
1518                                   "value": {
1519                                     "key": "vnfID",
1520                                     "fieldSchemaKey": {
1521                                       "name": "UUIDType",
1522                                       "version": "0.0.1"
1523                                     },
1524                                     "optional": false
1525                                   }
1526                                 }
1527                               ]
1528                             },
1529                             "taskParameters": {
1530                               "entry": []
1531                             },
1532                             "contextAlbumReference": [
1533                               {
1534                                 "name": "VCPEClosedLoopStatusAlbum",
1535                                 "version": "0.0.1"
1536                               }
1537                             ],
1538                             "taskLogic": {
1539                               "key": "TaskLogic",
1540                               "logicFlavour": "JAVASCRIPT",
1541                               "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n *  Modifications Copyright (C) 2020 Nordix Foundation.\n * ================================================================================\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 * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.info(executor.subject.id);\nexecutor.logger.info(executor.inFields);\n\nvar vcpeClosedLoopStatus = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").get(\n        executor.inFields.get(\"vnfID\").toString());\n\nexecutor.logger.info(\"Executing A&AI Lookup\");\nexecutor.logger.info(vcpeClosedLoopStatus);\n\nvar aaiInfo = vcpeClosedLoopStatus.get(\"AAI\");\nvar returnValue = true;\n\nif (aaiInfo.get(\"vserverName\") == null) {\n    executor.message = \"the field vserver.vserver-name must exist in the onset control loop event\";\n    executor.logger.warn(executor.message);\n    returnValue = false;\n}\nelse if (aaiInfo.get(\"genericVnfVnfId\") == null && aaiInfo.get(\"genericVnfVnfName\") == null) {\n    executor.message = \"either the field generic-vnf.vnf-id or generic-vnf.vnf-name must exist\"\n        + \" in the onset control loop event\";\n    executor.logger.warn(executor.message);\n    returnValue = false;\n}\nelse {\n    var restManager = new org.onap.policy.rest.RestManager;\n    var aaiManager = new org.onap.policy.aai.AaiManager(restManager);\n\n    // We need to instantiate the type in order to trigger the static JAXB handling\n    // in the AaiCqResponse class\n    var aaiCqResponseType = org.onap.policy.aai.AaiCqResponse;\n\n    var aaiResponse = aaiManager.getCustomQueryResponse(\n            \"http://localhost:54321/OnapVCpeSim/sim\",\n            \"aai.username\",\n            \"aai.password\",\n            executor.inFields.get(\"requestID\"),\n            vcpeClosedLoopStatus.get(\"AAI\").get(\"vserverName\")\n    );\n\n    var genericVnf;\n\n    if (aaiInfo.get(\"genericVnfVnfId\") != null) {\n        genericVnf = aaiResponse.getGenericVnfByModelInvariantId(aaiInfo.get(\"genericVnfVnfId\"));\n    }\n    else {\n        genericVnf = aaiResponse.getGenericVnfByVnfName(aaiInfo.get(\"genericVnfVnfId\"));\n    }\n\n    aaiInfo.put(\"genericVnfResourceVersion\",      genericVnf.getResourceVersion());\n    aaiInfo.put(\"genericVnfVnfName\",              genericVnf.getVnfName());\n    aaiInfo.put(\"genericVnfProvStatus\",           genericVnf.getProvStatus());\n    aaiInfo.put(\"genericVnfIsClosedLoopDisabled\", genericVnf.isIsClosedLoopDisabled().toString());\n    aaiInfo.put(\"genericVnfVnfType\",              genericVnf.getVnfType());\n    aaiInfo.put(\"genericVnfInMaint\",              genericVnf.isInMaint().toString());\n    aaiInfo.put(\"genericVnfServiceId\",            genericVnf.getServiceId());\n    aaiInfo.put(\"genericVnfVnfId\",                genericVnf.getVnfId());\n    aaiInfo.put(\"genericVnfOrchestrationStatus\",\n            genericVnf.getVfModules().getVfModule().get(0).getOrchestrationStatus());\n\n    executor.outFields.put(\"requestID\", executor.inFields.get(\"requestID\"));\n    executor.outFields.put(\"vnfID\", executor.inFields.get(\"vnfID\"));\n\n    executor.logger.info(executor.outFields);\n}\n\nreturnValue;"
1542                             }
1543                           }
1544                         },
1545                         {
1546                           "key": {
1547                             "name": "APPCRestartVNFRequestTask",
1548                             "version": "0.0.1"
1549                           },
1550                           "value": {
1551                             "key": {
1552                               "name": "APPCRestartVNFRequestTask",
1553                               "version": "0.0.1"
1554                             },
1555                             "inputFields": {
1556                               "entry": [
1557                                 {
1558                                   "key": "requestID",
1559                                   "value": {
1560                                     "key": "requestID",
1561                                     "fieldSchemaKey": {
1562                                       "name": "UUIDType",
1563                                       "version": "0.0.1"
1564                                     },
1565                                     "optional": false
1566                                   }
1567                                 },
1568                                 {
1569                                   "key": "vnfID",
1570                                   "value": {
1571                                     "key": "vnfID",
1572                                     "fieldSchemaKey": {
1573                                       "name": "UUIDType",
1574                                       "version": "0.0.1"
1575                                     },
1576                                     "optional": false
1577                                   }
1578                                 }
1579                               ]
1580                             },
1581                             "outputFields": {
1582                               "entry": [
1583                                 {
1584                                   "key": "APPCLCMRequestEvent",
1585                                   "value": {
1586                                     "key": "APPCLCMRequestEvent",
1587                                     "fieldSchemaKey": {
1588                                       "name": "APPCLCMRequestType",
1589                                       "version": "0.0.1"
1590                                     },
1591                                     "optional": false
1592                                   }
1593                                 }
1594                               ]
1595                             },
1596                             "taskParameters": {
1597                               "entry": []
1598                             },
1599                             "contextAlbumReference": [
1600                               {
1601                                 "name": "RequestIDVNFIDAlbum",
1602                                 "version": "0.0.1"
1603                               },
1604                               {
1605                                 "name": "VCPEClosedLoopStatusAlbum",
1606                                 "version": "0.0.1"
1607                               }
1608                             ],
1609                             "taskLogic": {
1610                               "key": "TaskLogic",
1611                               "logicFlavour": "JAVASCRIPT",
1612                               "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n *  Modifications Copyright (C) 2020 Nordix Foundation.\n * ================================================================================\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 * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.info(executor.subject.id);\nexecutor.logger.info(executor.inFields);\n\nvar appcRequest = new org.onap.policy.appclcm.AppcLcmMessageWrapper;\nappcRequest.setBody(new org.onap.policy.appclcm.AppcLcmBody);\nappcRequest.getBody().setInput(new org.onap.policy.appclcm.AppcLcmInput);\nappcRequest.getBody().getInput().setCommonHeader(\n        new org.onap.policy.appclcm.AppcLcmCommonHeader);\n\nappcRequest.setVersion(\"2.0.0\");\nappcRequest.setRpcName(\"restart\");\nappcRequest.setCorrelationId(executor.inFields.get(\"requestID\"));\nappcRequest.setType(\"request\");\n\nvar vcpeClosedLoopStatus = executor\n        .getContextAlbum(\"VCPEClosedLoopStatusAlbum\").get(\n                executor.inFields.get(\"vnfID\").toString());\n\nappcRequest.getBody().getInput().getCommonHeader().setTimeStamp(java.time.Instant.now());\nappcRequest.getBody().getInput().getCommonHeader().setApiVer(\"2.00\");\nappcRequest.getBody().getInput().getCommonHeader().setOriginatorId(\n        executor.inFields.get(\"requestID\").toString());\nappcRequest.getBody().getInput().getCommonHeader().setRequestId(\n        executor.inFields.get(\"requestID\"));\nappcRequest.getBody().getInput().getCommonHeader().setSubRequestId(\"1\");\nappcRequest.getBody().getInput().getCommonHeader().getFlags().put(\"ttl\", \"10000\");\nappcRequest.getBody().getInput().getCommonHeader().getFlags().put(\"force\", \"TRUE\");\nappcRequest.getBody().getInput().getCommonHeader().getFlags().put(\"mode\", \"EXCLUSIVE\");\n\nappcRequest.getBody().getInput().setAction(\"Restart\");\nappcRequest.getBody().getInput().setActionIdentifiers(new java.util.HashMap());\nappcRequest.getBody().getInput().getActionIdentifiers().put(\"vnf-id\",\n        executor.inFields.get(\"vnfID\").toString());\n\nexecutor.getContextAlbum(\"RequestIDVNFIDAlbum\").put(\n        executor.inFields.get(\"requestID\").toString(),\n        executor.inFields.get(\"vnfID\"));\n\nvcpeClosedLoopStatus.put(\"notification\", \"OPERATION\");\nvcpeClosedLoopStatus.put(\"notificationTime\", java.lang.System\n        .currentTimeMillis());\n\nexecutor.outFields.put(\"APPCLCMRequestEvent\", appcRequest);\n\nexecutor.logger.info(executor.outFields);\n\ntrue;"
1613                             }
1614                           }
1615                         },
1616                         {
1617                           "key": {
1618                             "name": "APPCRestartVNFResponseTask",
1619                             "version": "0.0.1"
1620                           },
1621                           "value": {
1622                             "key": {
1623                               "name": "APPCRestartVNFResponseTask",
1624                               "version": "0.0.1"
1625                             },
1626                             "inputFields": {
1627                               "entry": [
1628                                 {
1629                                   "key": "APPCLCMResponseEvent",
1630                                   "value": {
1631                                     "key": "APPCLCMResponseEvent",
1632                                     "fieldSchemaKey": {
1633                                       "name": "APPCLCMResponseType",
1634                                       "version": "0.0.1"
1635                                     },
1636                                     "optional": false
1637                                   }
1638                                 }
1639                               ]
1640                             },
1641                             "outputFields": {
1642                               "entry": [
1643                                 {
1644                                   "key": "requestID",
1645                                   "value": {
1646                                     "key": "requestID",
1647                                     "fieldSchemaKey": {
1648                                       "name": "UUIDType",
1649                                       "version": "0.0.1"
1650                                     },
1651                                     "optional": false
1652                                   }
1653                                 },
1654                                 {
1655                                   "key": "vnfID",
1656                                   "value": {
1657                                     "key": "vnfID",
1658                                     "fieldSchemaKey": {
1659                                       "name": "UUIDType",
1660                                       "version": "0.0.1"
1661                                     },
1662                                     "optional": false
1663                                   }
1664                                 }
1665                               ]
1666                             },
1667                             "taskParameters": {
1668                               "entry": []
1669                             },
1670                             "contextAlbumReference": [
1671                               {
1672                                 "name": "RequestIDVNFIDAlbum",
1673                                 "version": "0.0.1"
1674                               },
1675                               {
1676                                 "name": "VCPEClosedLoopStatusAlbum",
1677                                 "version": "0.0.1"
1678                               }
1679                             ],
1680                             "taskLogic": {
1681                               "key": "TaskLogic",
1682                               "logicFlavour": "JAVASCRIPT",
1683                               "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n *  Modifications Copyright (C) 2020 Nordix Foundation.\n * ================================================================================\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 * APPC LCM Response code: 100 ACCEPTED\n *                         200 ERROR UNEXPECTED ERROR means failure\n *                         312 REJECTED DUPLICATE REQUEST\n *                         400 SUCCESS\n *\n * Note: Sometimes the corelationId has a -1 at the tail, need to get rid of it when present.\n *\n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.info(executor.subject.id);\nexecutor.logger.info(executor.inFields);\n\nvar appcResponse = executor.inFields.get(\"APPCLCMResponseEvent\");\n\nvar requestIDString = appcResponse.getCorrelationId().substr(0, 36);\nexecutor.logger.info(\"requestIDString = \" + requestIDString);\nvar vnfID = executor.getContextAlbum(\"RequestIDVNFIDAlbum\")\n        .get(requestIDString);\nexecutor.logger.info(\"Size of RequestIDVNFIDAlbum = \"\n        + executor.getContextAlbum(\"RequestIDVNFIDAlbum\").size());\nexecutor.logger.info(\"vnfID = \" + vnfID);\n\nvar returnValue = true;\n\nif (vnfID != null) {\n    var vcpeClosedLoopStatus = executor.getContextAlbum(\n            \"VCPEClosedLoopStatusAlbum\").get(vnfID.toString());\n    var requestId = java.util.UUID.fromString(vcpeClosedLoopStatus\n            .get(\"requestID\"));\n\n    vcpeClosedLoopStatus.put(\"notificationTime\", java.lang.System\n            .currentTimeMillis());\n\n    executor.logger.info(\"Got from APPC code: \"\n            + org.onap.policy.appclcm.AppcLcmResponseCode\n                    .toResponseValue(appcResponse.getBody().getOutput()\n                            .getStatus().getCode()));\n\n    if (org.onap.policy.appclcm.AppcLcmResponseCode\n            .toResponseValue(appcResponse.getBody().getOutput().getStatus()\n                    .getCode()) == org.onap.policy.appclcm.AppcLcmResponseCode.SUCCESS) {\n        vcpeClosedLoopStatus.put(\"notification\", \"OPERATION_SUCCESS\");\n        vcpeClosedLoopStatus.put(\"message\", \"vCPE restarted\");\n        executor.getContextAlbum(\"RequestIDVNFIDAlbum\").remove(requestIDString);\n    } else if (org.onap.policy.appclcm.AppcLcmResponseCode\n            .toResponseValue(appcResponse.getBody().getOutput().getStatus()\n                    .getCode()) == \"ACCEPTED\"\n            || org.onap.policy.appclcm.AppcLcmResponseCode\n                    .toResponseValue(appcResponse.getBody().getOutput()\n                            .getStatus().getCode()) == \"REJECT\") {\n        executor.logger\n                .info(\"Got ACCEPTED 100 or REJECT 312, keep the context, wait for next response. Code is: \"\n                        + org.onap.policy.appclcm.AppcLcmResponseCode\n                                .toResponseValue(appcResponse.getBody()\n                                        .getOutput().getStatus().getCode()));\n    } else {\n        executor.getContextAlbum(\"RequestIDVNFIDAlbum\").remove(requestIDString);\n        vcpeClosedLoopStatus.put(\"notification\", \"OPERATION_FAILURE\");\n        vcpeClosedLoopStatus.put(\"message\", \"vCPE restart failed\");\n    }\n\n    executor.outFields.put(\"requestID\", requestId);\n    executor.outFields.put(\"vnfID\", vnfID);\n} else {\n    executor.message = \"VNF ID not found in context album for request ID \"\n            + requestIDString;\n    returnValue = false\n}\n\nexecutor.logger.info(executor.outFields);\n\nreturnValue;"
1684                             }
1685                           }
1686                         },
1687                         {
1688                           "key": {
1689                             "name": "AbatedTask",
1690                             "version": "0.0.1"
1691                           },
1692                           "value": {
1693                             "key": {
1694                               "name": "AbatedTask",
1695                               "version": "0.0.1"
1696                             },
1697                             "inputFields": {
1698                               "entry": [
1699                                 {
1700                                   "key": "requestID",
1701                                   "value": {
1702                                     "key": "requestID",
1703                                     "fieldSchemaKey": {
1704                                       "name": "UUIDType",
1705                                       "version": "0.0.1"
1706                                     },
1707                                     "optional": false
1708                                   }
1709                                 },
1710                                 {
1711                                   "key": "vnfID",
1712                                   "value": {
1713                                     "key": "vnfID",
1714                                     "fieldSchemaKey": {
1715                                       "name": "UUIDType",
1716                                       "version": "0.0.1"
1717                                     },
1718                                     "optional": false
1719                                   }
1720                                 },
1721                                 {
1722                                   "key": "vnfName",
1723                                   "value": {
1724                                     "key": "vnfName",
1725                                     "fieldSchemaKey": {
1726                                       "name": "SimpleStringType",
1727                                       "version": "0.0.1"
1728                                     },
1729                                     "optional": true
1730                                   }
1731                                 }
1732                               ]
1733                             },
1734                             "outputFields": {
1735                               "entry": [
1736                                 {
1737                                   "key": "requestID",
1738                                   "value": {
1739                                     "key": "requestID",
1740                                     "fieldSchemaKey": {
1741                                       "name": "UUIDType",
1742                                       "version": "0.0.1"
1743                                     },
1744                                     "optional": false
1745                                   }
1746                                 },
1747                                 {
1748                                   "key": "vnfID",
1749                                   "value": {
1750                                     "key": "vnfID",
1751                                     "fieldSchemaKey": {
1752                                       "name": "UUIDType",
1753                                       "version": "0.0.1"
1754                                     },
1755                                     "optional": false
1756                                   }
1757                                 },
1758                                 {
1759                                   "key": "vnfName",
1760                                   "value": {
1761                                     "key": "vnfName",
1762                                     "fieldSchemaKey": {
1763                                       "name": "SimpleStringType",
1764                                       "version": "0.0.1"
1765                                     },
1766                                     "optional": true
1767                                   }
1768                                 }
1769                               ]
1770                             },
1771                             "taskParameters": {
1772                               "entry": []
1773                             },
1774                             "contextAlbumReference": [
1775                               {
1776                                 "name": "VCPEClosedLoopStatusAlbum",
1777                                 "version": "0.0.1"
1778                               }
1779                             ],
1780                             "taskLogic": {
1781                               "key": "TaskLogic",
1782                               "logicFlavour": "JAVASCRIPT",
1783                               "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n *  Modifications Copyright (C) 2020 Nordix Foundation.\n * ================================================================================\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 * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.info(executor.subject.id);\nexecutor.logger.info(executor.inFields);\n\nvar vcpeClosedLoopStatus = null;\nif( executor.inFields.get(\"vnfID\") == null) {\n   executor.logger.info(\"AbatedTask: vnfID is null\");\n   var vnfName = executor.inFields.get(\"vnfName\");\n   vcpeClosedLoopStatus = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").get(\n        executor.inFields.get(\"vnfName\"));\n} else {\n   vcpeClosedLoopStatus = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").get(\n        executor.inFields.get(\"vnfID\").toString());\n}\n\nvcpeClosedLoopStatus.put(\"notification\",     \"FINAL_SUCCESS\");\nvcpeClosedLoopStatus.put(\"notificationTime\", java.lang.System.currentTimeMillis());\nvcpeClosedLoopStatus.put(\"message\",          \"situation has been abated\");\n\nexecutor.logger.info(executor.outFields);\n\ntrue;"
1784                             }
1785                           }
1786                         },
1787                         {
1788                           "key": {
1789                             "name": "ControlLoopLogTask",
1790                             "version": "0.0.1"
1791                           },
1792                           "value": {
1793                             "key": {
1794                               "name": "ControlLoopLogTask",
1795                               "version": "0.0.1"
1796                             },
1797                             "inputFields": {
1798                               "entry": [
1799                                 {
1800                                   "key": "requestID",
1801                                   "value": {
1802                                     "key": "requestID",
1803                                     "fieldSchemaKey": {
1804                                       "name": "UUIDType",
1805                                       "version": "0.0.1"
1806                                     },
1807                                     "optional": false
1808                                   }
1809                                 },
1810                                 {
1811                                   "key": "vnfID",
1812                                   "value": {
1813                                     "key": "vnfID",
1814                                     "fieldSchemaKey": {
1815                                       "name": "UUIDType",
1816                                       "version": "0.0.1"
1817                                     },
1818                                     "optional": false
1819                                   }
1820                                 }
1821                               ]
1822                             },
1823                             "outputFields": {
1824                               "entry": [
1825                                 {
1826                                   "key": "VirtualControlLoopNotification",
1827                                   "value": {
1828                                     "key": "VirtualControlLoopNotification",
1829                                     "fieldSchemaKey": {
1830                                       "name": "VirtualControlLoopNotificationType",
1831                                       "version": "0.0.1"
1832                                     },
1833                                     "optional": false
1834                                   }
1835                                 }
1836                               ]
1837                             },
1838                             "taskParameters": {
1839                               "entry": []
1840                             },
1841                             "contextAlbumReference": [
1842                               {
1843                                 "name": "VCPEClosedLoopStatusAlbum",
1844                                 "version": "0.0.1"
1845                               }
1846                             ],
1847                             "taskLogic": {
1848                               "key": "TaskLogic",
1849                               "logicFlavour": "JAVASCRIPT",
1850                               "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n *  Modifications Copyright (C) 2020 Nordix Foundation.\n * ================================================================================\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 * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.info(executor.subject.id);\nexecutor.logger.info(executor.inFields);\n\nvar vnfID = executor.inFields.get(\"vnfID\");\nif(vnfID == null) {\n   vnfID = executor.inFields.get(\"vnfName\");\n}\nexecutor.logger.info(\"vnfID=\" + vnfID);\n\nvar vcpeClosedLoopStatus = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").get(vnfID.toString());\n\nexecutor.logger.info(\"Logging context information for VNF \\\"\" + vnfID + \"\\\"\");\n\nvar clNotification = new org.onap.policy.controlloop.VirtualControlLoopNotification();\n\nclNotification.setClosedLoopControlName(vcpeClosedLoopStatus.get(\"closedLoopControlName\"));\nclNotification.setClosedLoopAlarmStart(java.time.Instant.ofEpochMilli(vcpeClosedLoopStatus.get(\"closedLoopAlarmStart\")));\nclNotification.setClosedLoopAlarmEnd(java.time.Instant.ofEpochMilli(vcpeClosedLoopStatus.get(\"closedLoopAlarmEnd\")));\nclNotification.setClosedLoopEventClient(vcpeClosedLoopStatus.get(\"closedLoopEventClient\"));\nclNotification.setVersion(vcpeClosedLoopStatus.get(\"version\"));\nclNotification.setRequestId(java.util.UUID.fromString(vcpeClosedLoopStatus.get(\"requestID\")));\nclNotification.setTargetType(vcpeClosedLoopStatus.get(\"target_type\"));\nclNotification.setTarget(vcpeClosedLoopStatus.get(\"target\"));\nclNotification.setFrom(vcpeClosedLoopStatus.get(\"from\"));\nclNotification.setPolicyScope(vcpeClosedLoopStatus.get(\"policyScope\"));\nclNotification.setPolicyName(vcpeClosedLoopStatus.get(\"policyName\"));\nclNotification.setPolicyVersion(vcpeClosedLoopStatus.get(\"policyVersion\"));\nclNotification.setNotification(org.onap.policy.controlloop.ControlLoopNotificationType.toType(vcpeClosedLoopStatus.get(\"notification\")));\nclNotification.setMessage(vcpeClosedLoopStatus.get(\"message\"));\n\nvar notificationInstant = java.time.Instant.ofEpochSecond(vcpeClosedLoopStatus.get(\"notificationTime\"));\nvar notificationTime = java.time.ZonedDateTime.ofInstant(notificationInstant, java.time.ZoneOffset.UTC);\nclNotification.setNotificationTime(notificationTime);\n\nvar aaiInfo = vcpeClosedLoopStatus.get(\"AAI\");\n\nclNotification.getAai().put(\"generic-vnf.resource-version\",        aaiInfo.get(\"genericVnfResourceVersion\"));\nclNotification.getAai().put(\"generic-vnf.vnf-name\",                aaiInfo.get(\"genericVnfVnfName\"));\nclNotification.getAai().put(\"generic-vnf.prov-status\",             aaiInfo.get(\"genericVnfProvStatus\"));\nclNotification.getAai().put(\"generic-vnf.is-closed-loop-disabled\", aaiInfo.get(\"genericVnfIsClosedLoopDisabled\"));\nclNotification.getAai().put(\"generic-vnf.orchestration-status\",    aaiInfo.get(\"genericVnfOrchestrationStatus\"));\nclNotification.getAai().put(\"generic-vnf.vnf-type\",                aaiInfo.get(\"genericVnfVnfType\"));\nclNotification.getAai().put(\"generic-vnf.in-maint\",                aaiInfo.get(\"genericVnfInMaint\"));\nclNotification.getAai().put(\"generic-vnf.service-id\",              aaiInfo.get(\"genericVnfServiceId\"));\n\nif(vnfID != null) {\n   clNotification.getAai().put(\"generic-vnf.vnf-id\",                  aaiInfo.get(\"genericVnfVnfId\"));\n}\nexecutor.outFields.put(\"VirtualControlLoopNotification\", clNotification);\n\nexecutor.logger.info(executor.outFields);\n\ntrue;"
1851                             }
1852                           }
1853                         },
1854                         {
1855                           "key": {
1856                             "name": "DeniedTask",
1857                             "version": "0.0.1"
1858                           },
1859                           "value": {
1860                             "key": {
1861                               "name": "DeniedTask",
1862                               "version": "0.0.1"
1863                             },
1864                             "inputFields": {
1865                               "entry": [
1866                                 {
1867                                   "key": "requestID",
1868                                   "value": {
1869                                     "key": "requestID",
1870                                     "fieldSchemaKey": {
1871                                       "name": "UUIDType",
1872                                       "version": "0.0.1"
1873                                     },
1874                                     "optional": false
1875                                   }
1876                                 },
1877                                 {
1878                                   "key": "vnfID",
1879                                   "value": {
1880                                     "key": "vnfID",
1881                                     "fieldSchemaKey": {
1882                                       "name": "UUIDType",
1883                                       "version": "0.0.1"
1884                                     },
1885                                     "optional": false
1886                                   }
1887                                 }
1888                               ]
1889                             },
1890                             "outputFields": {
1891                               "entry": [
1892                                 {
1893                                   "key": "requestID",
1894                                   "value": {
1895                                     "key": "requestID",
1896                                     "fieldSchemaKey": {
1897                                       "name": "UUIDType",
1898                                       "version": "0.0.1"
1899                                     },
1900                                     "optional": false
1901                                   }
1902                                 },
1903                                 {
1904                                   "key": "vnfID",
1905                                   "value": {
1906                                     "key": "vnfID",
1907                                     "fieldSchemaKey": {
1908                                       "name": "UUIDType",
1909                                       "version": "0.0.1"
1910                                     },
1911                                     "optional": false
1912                                   }
1913                                 }
1914                               ]
1915                             },
1916                             "taskParameters": {
1917                               "entry": []
1918                             },
1919                             "contextAlbumReference": [
1920                               {
1921                                 "name": "VCPEClosedLoopStatusAlbum",
1922                                 "version": "0.0.1"
1923                               }
1924                             ],
1925                             "taskLogic": {
1926                               "key": "TaskLogic",
1927                               "logicFlavour": "JAVASCRIPT",
1928                               "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n *  Modifications Copyright (C) 2020 Nordix Foundation.\n * ================================================================================\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 * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.info(executor.subject.id);\nexecutor.logger.info(executor.inFields);\n\nvar vcpeClosedLoopStatus = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").get(\n        executor.inFields.get(\"vnfID\").toString());\n\nvcpeClosedLoopStatus.put(\"notification\",     \"REJECTED\");\nvcpeClosedLoopStatus.put(\"notificationTime\", java.lang.System.currentTimeMillis());\n\nexecutor.logger.info(executor.outFields);\n\ntrue;"
1929                             }
1930                           }
1931                         },
1932                         {
1933                           "key": {
1934                             "name": "GetVCPEStateTask",
1935                             "version": "0.0.1"
1936                           },
1937                           "value": {
1938                             "key": {
1939                               "name": "GetVCPEStateTask",
1940                               "version": "0.0.1"
1941                             },
1942                             "inputFields": {
1943                               "entry": [
1944                                 {
1945                                   "key": "VirtualControlLoopEvent",
1946                                   "value": {
1947                                     "key": "VirtualControlLoopEvent",
1948                                     "fieldSchemaKey": {
1949                                       "name": "VirtualControlLoopEventType",
1950                                       "version": "0.0.1"
1951                                     },
1952                                     "optional": false
1953                                   }
1954                                 }
1955                               ]
1956                             },
1957                             "outputFields": {
1958                               "entry": [
1959                                 {
1960                                   "key": "requestID",
1961                                   "value": {
1962                                     "key": "requestID",
1963                                     "fieldSchemaKey": {
1964                                       "name": "UUIDType",
1965                                       "version": "0.0.1"
1966                                     },
1967                                     "optional": false
1968                                   }
1969                                 },
1970                                 {
1971                                   "key": "vnfID",
1972                                   "value": {
1973                                     "key": "vnfID",
1974                                     "fieldSchemaKey": {
1975                                       "name": "UUIDType",
1976                                       "version": "0.0.1"
1977                                     },
1978                                     "optional": false
1979                                   }
1980                                 },
1981                                 {
1982                                   "key": "vnfName",
1983                                   "value": {
1984                                     "key": "vnfName",
1985                                     "fieldSchemaKey": {
1986                                       "name": "SimpleStringType",
1987                                       "version": "0.0.1"
1988                                     },
1989                                     "optional": true
1990                                   }
1991                                 }
1992                               ]
1993                             },
1994                             "taskParameters": {
1995                               "entry": []
1996                             },
1997                             "contextAlbumReference": [
1998                               {
1999                                 "name": "RequestIDVNFIDAlbum",
2000                                 "version": "0.0.1"
2001                               },
2002                               {
2003                                 "name": "VCPEClosedLoopStatusAlbum",
2004                                 "version": "0.0.1"
2005                               }
2006                             ],
2007                             "taskLogic": {
2008                               "key": "TaskLogic",
2009                               "logicFlavour": "JAVASCRIPT",
2010                               "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n *  Modifications Copyright (C) 2020 Nordix Foundation.\n * ================================================================================\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 * Note: The incoming closedloop message can be ONSET with both VNF-name and VNF-ID\n *       or ABATED with only VNF-name. So need to handle differently. For ABATED case,\n *       since we still keep the RequireIDVNFID context album, we can get it from there.\n *\n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.info(executor.subject.id);\nexecutor.logger.info(executor.inFields);\n\nvar clEventType = org.onap.policy.controlloop.VirtualControlLoopEvent;\nvar longType = java.lang.Long;\nvar uuidType = java.util.UUID;\n\nvar clEvent = executor.inFields.get(\"VirtualControlLoopEvent\");\n\nexecutor.logger.info(clEvent.toString());\nexecutor.logger.info(clEvent.getClosedLoopControlName());\n\nvar requestID = clEvent.getRequestId();\nexecutor.logger.info(\"requestID = \" + requestID);\nvar vnfID = null;\nvar vcpeClosedLoopStatus = null;\n\nif (clEvent.getAai().get(\"generic-vnf.vnf-id\") != null) {\n   vnfID = uuidType.fromString(clEvent.getAai().get(\"generic-vnf.vnf-id\"));\n   executor.logger.info(\"vnfID = \" + vnfID);\n   vcpeClosedLoopStatus = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").get(vnfID);\n\n   if (vcpeClosedLoopStatus == null) {\n      executor.logger.info(\"Creating context information for new vCPE VNF \\\"\" + vnfID.toString() + \"\\\"\");\n\n      vcpeClosedLoopStatus = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").getSchemaHelper().createNewInstance();\n\n      vcpeClosedLoopStatus.put(\"closedLoopControlName\", clEvent.getClosedLoopControlName());\n      vcpeClosedLoopStatus.put(\"closedLoopAlarmStart\",  clEvent.getClosedLoopAlarmStart().toEpochMilli());\n      vcpeClosedLoopStatus.put(\"closedLoopEventClient\", clEvent.getClosedLoopEventClient());\n      vcpeClosedLoopStatus.put(\"closedLoopEventStatus\", clEvent.getClosedLoopEventStatus().toString());\n      vcpeClosedLoopStatus.put(\"version\",               clEvent.getVersion());\n      vcpeClosedLoopStatus.put(\"requestID\",             clEvent.getRequestId().toString());\n      vcpeClosedLoopStatus.put(\"target_type\",           clEvent.getTargetType().toString());\n      vcpeClosedLoopStatus.put(\"target\",                clEvent.getTarget());\n      vcpeClosedLoopStatus.put(\"from\",                  clEvent.getFrom());\n      vcpeClosedLoopStatus.put(\"policyScope\",           \"vCPE\");\n      vcpeClosedLoopStatus.put(\"policyName\",            \"ONAPvCPEPolicyModel\");\n      vcpeClosedLoopStatus.put(\"policyVersion\",         \"0.0.1\");\n      vcpeClosedLoopStatus.put(\"notification\",          \"ACTIVE\");\n      vcpeClosedLoopStatus.put(\"notificationTime\",      java.lang.System.currentTimeMillis());\n      vcpeClosedLoopStatus.put(\"message\",               \"\");\n\n      var aaiInfo = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").getSchemaHelper().createNewSubInstance(\"VCPE_AAI_Type\");\n\n      aaiInfo.put(\"genericVnfResourceVersion\",      clEvent.getAai().get(\"generic-vnf.resource-version\"));\n      aaiInfo.put(\"genericVnfVnfName\",              clEvent.getAai().get(\"generic-vnf.vnf-name\"));\n      aaiInfo.put(\"genericVnfProvStatus\",           clEvent.getAai().get(\"generic-vnf.prov-status\"));\n      aaiInfo.put(\"genericVnfIsClosedLoopDisabled\", clEvent.getAai().get(\"generic-vnf.is-closed-loop-disabled\"));\n      aaiInfo.put(\"genericVnfOrchestrationStatus\",  clEvent.getAai().get(\"generic-vnf.orchestration-status\"));\n      aaiInfo.put(\"genericVnfVnfType\",              clEvent.getAai().get(\"generic-vnf.vnf-type\"));\n      aaiInfo.put(\"genericVnfInMaint\",              clEvent.getAai().get(\"generic-vnf.in-maint\"));\n      aaiInfo.put(\"genericVnfServiceId\",            clEvent.getAai().get(\"generic-vnf.service-id\"));\n      aaiInfo.put(\"genericVnfVnfId\",                clEvent.getAai().get(\"generic-vnf.vnf-id\"));\n      aaiInfo.put(\"vserverIsClosedLoopDisabled\",    clEvent.getAai().get(\"vserver.is-closed-loop-disabled\"));\n      aaiInfo.put(\"vserverProvStatus\",              clEvent.getAai().get(\"vserver.prov-status\"));\n      aaiInfo.put(\"vserverName\",                    clEvent.getAai().get(\"vserver.vserver-name\"));\n\n      vcpeClosedLoopStatus.put(\"AAI\", aaiInfo);\n\n      if (clEvent.getClosedLoopAlarmEnd() != null) {\n         vcpeClosedLoopStatus.put(\"closedLoopAlarmEnd\", clEvent.getClosedLoopAlarmEnd().toEpochMilli());\n      } else {\n         vcpeClosedLoopStatus.put(\"closedLoopAlarmEnd\", java.lang.Long.valueOf(0));\n      }\n\n      executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").put(vnfID.toString(), vcpeClosedLoopStatus);\n\n      executor.logger.info(\"Created context information for new vCPE VNF \\\"\" + vnfID.toString() + \"\\\"\");\n   }\n\n   executor.outFields.put(\"requestID\", requestID);\n   executor.outFields.put(\"vnfID\", vnfID);\n\n   executor.logger.info(executor.outFields);\n}\nelse {\n    executor.logger.info(\"No vnf-id in VirtualControlLoopEvent, status:\" + clEvent.getClosedLoopEventStatus().toString());\n    var vnfName = clEvent.getAai().get(\"generic-vnf.vnf-name\");\n    executor.logger.info(\"No vnf-id in VirtualControlLoopEvent for \" + vnfName);\n\n    vcpeClosedLoopStatus = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").get(vnfName.toString());\n\n    if (vcpeClosedLoopStatus == null) {\n        executor.logger.info(\"Creating context information for new vCPE VNF \\\"\" + vnfName.toString() + \"\\\"\");\n\n        vcpeClosedLoopStatus = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").getSchemaHelper().createNewInstance();\n\n        vcpeClosedLoopStatus.put(\"closedLoopControlName\", clEvent.getClosedLoopControlName());\n        vcpeClosedLoopStatus.put(\"closedLoopAlarmStart\",  clEvent.getClosedLoopAlarmStart().toEpochMilli());\n        vcpeClosedLoopStatus.put(\"closedLoopEventClient\", clEvent.getClosedLoopEventClient());\n        vcpeClosedLoopStatus.put(\"closedLoopEventStatus\", clEvent.getClosedLoopEventStatus().toString());\n        vcpeClosedLoopStatus.put(\"version\",               clEvent.getVersion());\n        vcpeClosedLoopStatus.put(\"requestID\",             clEvent.getRequestId().toString());\n        vcpeClosedLoopStatus.put(\"target_type\",           clEvent.getTargetType().toString());\n        vcpeClosedLoopStatus.put(\"target\",                clEvent.getTarget());\n        vcpeClosedLoopStatus.put(\"from\",                  clEvent.getFrom());\n        vcpeClosedLoopStatus.put(\"policyScope\",           \"vCPE\");\n        vcpeClosedLoopStatus.put(\"policyName\",            \"ONAPvCPEPolicyModel\");\n        vcpeClosedLoopStatus.put(\"policyVersion\",         \"0.0.1\");\n        vcpeClosedLoopStatus.put(\"notification\",          \"ACTIVE\");\n        vcpeClosedLoopStatus.put(\"notificationTime\",      java.lang.System.currentTimeMillis());\n        vcpeClosedLoopStatus.put(\"message\",               \"\");\n\n        var aaiInfo = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").getSchemaHelper().createNewSubInstance(\"VCPE_AAI_Type\");\n\n        aaiInfo.put(\"genericVnfVnfName\", clEvent.getAai().get(\"generic-vnf.vnf-name\"));\n        vcpeClosedLoopStatus.put(\"AAI\", aaiInfo);\n\n        if (clEvent.getClosedLoopAlarmEnd() != null) {\n            vcpeClosedLoopStatus.put(\"closedLoopAlarmEnd\", clEvent.getClosedLoopAlarmEnd().toEpochMilli());\n        } else {\n            vcpeClosedLoopStatus.put(\"closedLoopAlarmEnd\", java.lang.Long.valueOf(0));\n        }\n\n        executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").put(vnfName.toString(), vcpeClosedLoopStatus);\n\n        executor.logger.info(\"Created context information for new vCPE VNF \\\"\" + vnfName.toString() + \"\\\"\");\n    }\n    executor.outFields.put(\"requestID\", requestID);\n    executor.outFields.put(\"vnfName\", vnfName);\n    executor.logger.info(executor.outFields);\n}\n\ntrue;"
2011                             }
2012                           }
2013                         },
2014                         {
2015                           "key": {
2016                             "name": "GuardRequestTask",
2017                             "version": "0.0.1"
2018                           },
2019                           "value": {
2020                             "key": {
2021                               "name": "GuardRequestTask",
2022                               "version": "0.0.1"
2023                             },
2024                             "inputFields": {
2025                               "entry": [
2026                                 {
2027                                   "key": "requestID",
2028                                   "value": {
2029                                     "key": "requestID",
2030                                     "fieldSchemaKey": {
2031                                       "name": "UUIDType",
2032                                       "version": "0.0.1"
2033                                     },
2034                                     "optional": false
2035                                   }
2036                                 },
2037                                 {
2038                                   "key": "vnfID",
2039                                   "value": {
2040                                     "key": "vnfID",
2041                                     "fieldSchemaKey": {
2042                                       "name": "UUIDType",
2043                                       "version": "0.0.1"
2044                                     },
2045                                     "optional": false
2046                                   }
2047                                 }
2048                               ]
2049                             },
2050                             "outputFields": {
2051                               "entry": [
2052                                 {
2053                                   "key": "decisionAttributes",
2054                                   "value": {
2055                                     "key": "decisionAttributes",
2056                                     "fieldSchemaKey": {
2057                                       "name": "GuardDecisionAttributesType",
2058                                       "version": "0.0.1"
2059                                     },
2060                                     "optional": false
2061                                   }
2062                                 },
2063                                 {
2064                                   "key": "onapName",
2065                                   "value": {
2066                                     "key": "onapName",
2067                                     "fieldSchemaKey": {
2068                                       "name": "SimpleStringType",
2069                                       "version": "0.0.1"
2070                                     },
2071                                     "optional": false
2072                                   }
2073                                 }
2074                               ]
2075                             },
2076                             "taskParameters": {
2077                               "entry": []
2078                             },
2079                             "contextAlbumReference": [
2080                               {
2081                                 "name": "ControlLoopExecutionIDAlbum",
2082                                 "version": "0.0.1"
2083                               },
2084                               {
2085                                 "name": "VCPEClosedLoopStatusAlbum",
2086                                 "version": "0.0.1"
2087                               }
2088                             ],
2089                             "taskLogic": {
2090                               "key": "TaskLogic",
2091                               "logicFlavour": "JAVASCRIPT",
2092                               "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n *  Modifications Copyright (C) 2020 Nordix Foundation.\n * ================================================================================\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 * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.info(executor.subject.id);\nexecutor.logger.info(executor.inFields);\n\nvar vcpeClosedLoopStatus = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").get(\n        executor.inFields.get(\"vnfID\").toString());\n\nvar guardDecisionAttributes = executor.subject.getOutFieldSchemaHelper(\"decisionAttributes\").createNewInstance();\n\nguardDecisionAttributes.put(\"actor\", \"APPC\");\nguardDecisionAttributes.put(\"recipe\", \"Restart\");\nguardDecisionAttributes.put(\"target\", executor.inFields.get(\"vnfID\").toString());\nguardDecisionAttributes.put(\"clname\", \"APEXvCPEImplementation\");\n\nexecutor.logger.info(guardDecisionAttributes);\n\nexecutor.outFields.put(\"decisionAttributes\", guardDecisionAttributes);\nexecutor.outFields.put(\"onapName\", \"PDPD\");\n\nexecutor.getContextAlbum(\"ControlLoopExecutionIDAlbum\").put(executor.executionId.toString(),\n        executor.inFields.get(\"vnfID\"));\n\nexecutor.logger.info(executor.outFields);\n\ntrue;"
2093                             }
2094                           }
2095                         },
2096                         {
2097                           "key": {
2098                             "name": "GuardResponseTask",
2099                             "version": "0.0.1"
2100                           },
2101                           "value": {
2102                             "key": {
2103                               "name": "GuardResponseTask",
2104                               "version": "0.0.1"
2105                             },
2106                             "inputFields": {
2107                               "entry": [
2108                                 {
2109                                   "key": "decision",
2110                                   "value": {
2111                                     "key": "decision",
2112                                     "fieldSchemaKey": {
2113                                       "name": "SimpleStringType",
2114                                       "version": "0.0.1"
2115                                     },
2116                                     "optional": false
2117                                   }
2118                                 },
2119                                 {
2120                                   "key": "details",
2121                                   "value": {
2122                                     "key": "details",
2123                                     "fieldSchemaKey": {
2124                                       "name": "SimpleStringType",
2125                                       "version": "0.0.1"
2126                                     },
2127                                     "optional": false
2128                                   }
2129                                 }
2130                               ]
2131                             },
2132                             "outputFields": {
2133                               "entry": [
2134                                 {
2135                                   "key": "requestID",
2136                                   "value": {
2137                                     "key": "requestID",
2138                                     "fieldSchemaKey": {
2139                                       "name": "UUIDType",
2140                                       "version": "0.0.1"
2141                                     },
2142                                     "optional": false
2143                                   }
2144                                 },
2145                                 {
2146                                   "key": "vnfID",
2147                                   "value": {
2148                                     "key": "vnfID",
2149                                     "fieldSchemaKey": {
2150                                       "name": "UUIDType",
2151                                       "version": "0.0.1"
2152                                     },
2153                                     "optional": false
2154                                   }
2155                                 }
2156                               ]
2157                             },
2158                             "taskParameters": {
2159                               "entry": []
2160                             },
2161                             "contextAlbumReference": [
2162                               {
2163                                 "name": "ControlLoopExecutionIDAlbum",
2164                                 "version": "0.0.1"
2165                               },
2166                               {
2167                                 "name": "VCPEClosedLoopStatusAlbum",
2168                                 "version": "0.0.1"
2169                               }
2170                             ],
2171                             "taskLogic": {
2172                               "key": "TaskLogic",
2173                               "logicFlavour": "JAVASCRIPT",
2174                               "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n *  Modifications Copyright (C) 2020 Nordix Foundation.\n * ================================================================================\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 * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.info(executor.subject.id);\nexecutor.logger.info(executor.inFields);\n\nvar vnfID = executor.getContextAlbum(\"ControlLoopExecutionIDAlbum\").remove(executor.executionId.toString());\n\nexecutor.logger.info(\"Continuing execution with VNF ID: \" + vnfID);\n\nvar vcpeClosedLoopStatus = executor.getContextAlbum(\"VCPEClosedLoopStatusAlbum\").get(vnfID.toString());\nexecutor.logger.info(vcpeClosedLoopStatus);\n\nvar guardResult = executor.inFields.get(\"decision\");\nvar returnValue = true;\n\nif (guardResult == \"PERMIT\") {\n    vcpeClosedLoopStatus.put(\"notification\", \"OPERATION: GUARD_PERMIT\");\n} else if (guardResult == \"DENY\") {\n    vcpeClosedLoopStatus.put(\"notification\", \"OPERATION: GUARD_DENY\");\n} else {\n    executor.message = \"guard result must be either \\\"PERMIT\\\" or \\\"DENY\\\"\";\n    returnValue = false;\n}\n\nvar uuidType = java.util.UUID;\nvar requestID = uuidType.fromString(vcpeClosedLoopStatus.get(\"requestID\"));\n\nexecutor.outFields.put(\"requestID\", requestID);\nexecutor.outFields.put(\"vnfID\", vnfID);\n\nexecutor.logger.info(executor.outFields);\n\n\nreturnValue;"
2175                             }
2176                           }
2177                         },
2178                         {
2179                           "key": {
2180                             "name": "NoAAILookupTask",
2181                             "version": "0.0.1"
2182                           },
2183                           "value": {
2184                             "key": {
2185                               "name": "NoAAILookupTask",
2186                               "version": "0.0.1"
2187                             },
2188                             "inputFields": {
2189                               "entry": [
2190                                 {
2191                                   "key": "requestID",
2192                                   "value": {
2193                                     "key": "requestID",
2194                                     "fieldSchemaKey": {
2195                                       "name": "UUIDType",
2196                                       "version": "0.0.1"
2197                                     },
2198                                     "optional": false
2199                                   }
2200                                 },
2201                                 {
2202                                   "key": "vnfID",
2203                                   "value": {
2204                                     "key": "vnfID",
2205                                     "fieldSchemaKey": {
2206                                       "name": "UUIDType",
2207                                       "version": "0.0.1"
2208                                     },
2209                                     "optional": false
2210                                   }
2211                                 }
2212                               ]
2213                             },
2214                             "outputFields": {
2215                               "entry": [
2216                                 {
2217                                   "key": "requestID",
2218                                   "value": {
2219                                     "key": "requestID",
2220                                     "fieldSchemaKey": {
2221                                       "name": "UUIDType",
2222                                       "version": "0.0.1"
2223                                     },
2224                                     "optional": false
2225                                   }
2226                                 },
2227                                 {
2228                                   "key": "vnfID",
2229                                   "value": {
2230                                     "key": "vnfID",
2231                                     "fieldSchemaKey": {
2232                                       "name": "UUIDType",
2233                                       "version": "0.0.1"
2234                                     },
2235                                     "optional": false
2236                                   }
2237                                 }
2238                               ]
2239                             },
2240                             "taskParameters": {
2241                               "entry": []
2242                             },
2243                             "contextAlbumReference": [],
2244                             "taskLogic": {
2245                               "key": "TaskLogic",
2246                               "logicFlavour": "JAVASCRIPT",
2247                               "logic": "/*\n * ============LICENSE_START=======================================================\n *  Copyright (C) 2016-2018 Ericsson. All rights reserved.\n *  Modifications Copyright (C) 2020 Nordix Foundation.\n * ================================================================================\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 * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.info(executor.subject.id);\nexecutor.logger.info(executor.inFields);\n\nexecutor.logger.info(executor.outFields);\n\ntrue;"
2248                             }
2249                           }
2250                         }
2251                       ]
2252                     }
2253                   },
2254                   "events": {
2255                     "key": {
2256                       "name": "ONAPvCPEPolicyModel_Events",
2257                       "version": "0.0.1"
2258                     },
2259                     "eventMap": {
2260                       "entry": [
2261                         {
2262                           "key": {
2263                             "name": "APPCRestartVNFRequestEvent",
2264                             "version": "2.0.0"
2265                           },
2266                           "value": {
2267                             "key": {
2268                               "name": "APPCRestartVNFRequestEvent",
2269                               "version": "2.0.0"
2270                             },
2271                             "nameSpace": "org.onap.policy.apex.onap.vcpe",
2272                             "source": "APEX",
2273                             "target": "APPC",
2274                             "parameter": {
2275                               "entry": [
2276                                 {
2277                                   "key": "APPCLCMRequestEvent",
2278                                   "value": {
2279                                     "key": "APPCLCMRequestEvent",
2280                                     "fieldSchemaKey": {
2281                                       "name": "APPCLCMRequestType",
2282                                       "version": "0.0.1"
2283                                     },
2284                                     "optional": false
2285                                   }
2286                                 }
2287                               ]
2288                             }
2289                           }
2290                         },
2291                         {
2292                           "key": {
2293                             "name": "APPCRestartVNFResponseEvent",
2294                             "version": "2.0.0"
2295                           },
2296                           "value": {
2297                             "key": {
2298                               "name": "APPCRestartVNFResponseEvent",
2299                               "version": "2.0.0"
2300                             },
2301                             "nameSpace": "org.onap.policy.apex.onap.vcpe",
2302                             "source": "APEX",
2303                             "target": "APPC",
2304                             "parameter": {
2305                               "entry": [
2306                                 {
2307                                   "key": "APPCLCMResponseEvent",
2308                                   "value": {
2309                                     "key": "APPCLCMResponseEvent",
2310                                     "fieldSchemaKey": {
2311                                       "name": "APPCLCMResponseType",
2312                                       "version": "0.0.1"
2313                                     },
2314                                     "optional": false
2315                                   }
2316                                 }
2317                               ]
2318                             }
2319                           }
2320                         },
2321                         {
2322                           "key": {
2323                             "name": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
2324                             "version": "1.0.2"
2325                           },
2326                           "value": {
2327                             "key": {
2328                               "name": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
2329                               "version": "1.0.2"
2330                             },
2331                             "nameSpace": "org.onap.policy.apex.onap.vcpe",
2332                             "source": "DCAE",
2333                             "target": "APEX",
2334                             "parameter": {
2335                               "entry": [
2336                                 {
2337                                   "key": "VirtualControlLoopEvent",
2338                                   "value": {
2339                                     "key": "VirtualControlLoopEvent",
2340                                     "fieldSchemaKey": {
2341                                       "name": "VirtualControlLoopEventType",
2342                                       "version": "0.0.1"
2343                                     },
2344                                     "optional": false
2345                                   }
2346                                 }
2347                               ]
2348                             }
2349                           }
2350                         },
2351                         {
2352                           "key": {
2353                             "name": "ControlLoopLogEvent",
2354                             "version": "0.0.1"
2355                           },
2356                           "value": {
2357                             "key": {
2358                               "name": "ControlLoopLogEvent",
2359                               "version": "0.0.1"
2360                             },
2361                             "nameSpace": "org.onap.policy.apex.onap.vcpe",
2362                             "source": "APEX",
2363                             "target": "APEX",
2364                             "parameter": {
2365                               "entry": [
2366                                 {
2367                                   "key": "VirtualControlLoopNotification",
2368                                   "value": {
2369                                     "key": "VirtualControlLoopNotification",
2370                                     "fieldSchemaKey": {
2371                                       "name": "VirtualControlLoopNotificationType",
2372                                       "version": "0.0.1"
2373                                     },
2374                                     "optional": false
2375                                   }
2376                                 }
2377                               ]
2378                             }
2379                           }
2380                         },
2381                         {
2382                           "key": {
2383                             "name": "GuardRequestEvent",
2384                             "version": "0.0.1"
2385                           },
2386                           "value": {
2387                             "key": {
2388                               "name": "GuardRequestEvent",
2389                               "version": "0.0.1"
2390                             },
2391                             "nameSpace": "org.onap.policy.apex.onap.vcpe",
2392                             "source": "APEX",
2393                             "target": "APEX",
2394                             "parameter": {
2395                               "entry": [
2396                                 {
2397                                   "key": "decisionAttributes",
2398                                   "value": {
2399                                     "key": "decisionAttributes",
2400                                     "fieldSchemaKey": {
2401                                       "name": "GuardDecisionAttributesType",
2402                                       "version": "0.0.1"
2403                                     },
2404                                     "optional": false
2405                                   }
2406                                 },
2407                                 {
2408                                   "key": "onapName",
2409                                   "value": {
2410                                     "key": "onapName",
2411                                     "fieldSchemaKey": {
2412                                       "name": "SimpleStringType",
2413                                       "version": "0.0.1"
2414                                     },
2415                                     "optional": false
2416                                   }
2417                                 }
2418                               ]
2419                             }
2420                           }
2421                         },
2422                         {
2423                           "key": {
2424                             "name": "GuardResponseEvent",
2425                             "version": "0.0.1"
2426                           },
2427                           "value": {
2428                             "key": {
2429                               "name": "GuardResponseEvent",
2430                               "version": "0.0.1"
2431                             },
2432                             "nameSpace": "org.onap.policy.apex.onap.vcpe",
2433                             "source": "APEX",
2434                             "target": "APEX",
2435                             "parameter": {
2436                               "entry": [
2437                                 {
2438                                   "key": "decision",
2439                                   "value": {
2440                                     "key": "decision",
2441                                     "fieldSchemaKey": {
2442                                       "name": "SimpleStringType",
2443                                       "version": "0.0.1"
2444                                     },
2445                                     "optional": false
2446                                   }
2447                                 },
2448                                 {
2449                                   "key": "details",
2450                                   "value": {
2451                                     "key": "details",
2452                                     "fieldSchemaKey": {
2453                                       "name": "SimpleStringType",
2454                                       "version": "0.0.1"
2455                                     },
2456                                     "optional": false
2457                                   }
2458                                 }
2459                               ]
2460                             }
2461                           }
2462                         },
2463                         {
2464                           "key": {
2465                             "name": "VCPEStateUpdatedEvent",
2466                             "version": "0.0.1"
2467                           },
2468                           "value": {
2469                             "key": {
2470                               "name": "VCPEStateUpdatedEvent",
2471                               "version": "0.0.1"
2472                             },
2473                             "nameSpace": "org.onap.policy.apex.onap.vcpe",
2474                             "source": "APEX",
2475                             "target": "APEX",
2476                             "parameter": {
2477                               "entry": [
2478                                 {
2479                                   "key": "requestID",
2480                                   "value": {
2481                                     "key": "requestID",
2482                                     "fieldSchemaKey": {
2483                                       "name": "UUIDType",
2484                                       "version": "0.0.1"
2485                                     },
2486                                     "optional": false
2487                                   }
2488                                 },
2489                                 {
2490                                   "key": "vnfID",
2491                                   "value": {
2492                                     "key": "vnfID",
2493                                     "fieldSchemaKey": {
2494                                       "name": "UUIDType",
2495                                       "version": "0.0.1"
2496                                     },
2497                                     "optional": false
2498                                   }
2499                                 },
2500                                 {
2501                                   "key": "vnfName",
2502                                   "value": {
2503                                     "key": "vnfName",
2504                                     "fieldSchemaKey": {
2505                                       "name": "SimpleStringType",
2506                                       "version": "0.0.1"
2507                                     },
2508                                     "optional": true
2509                                   }
2510                                 }
2511                               ]
2512                             }
2513                           }
2514                         }
2515                       ]
2516                     }
2517                   },
2518                   "albums": {
2519                     "key": {
2520                       "name": "ONAPvCPEPolicyModel_Albums",
2521                       "version": "0.0.1"
2522                     },
2523                     "albums": {
2524                       "entry": [
2525                         {
2526                           "key": {
2527                             "name": "ControlLoopExecutionIDAlbum",
2528                             "version": "0.0.1"
2529                           },
2530                           "value": {
2531                             "key": {
2532                               "name": "ControlLoopExecutionIDAlbum",
2533                               "version": "0.0.1"
2534                             },
2535                             "scope": "policy",
2536                             "isWritable": true,
2537                             "itemSchema": {
2538                               "name": "UUIDType",
2539                               "version": "0.0.1"
2540                             }
2541                           }
2542                         },
2543                         {
2544                           "key": {
2545                             "name": "RequestIDVNFIDAlbum",
2546                             "version": "0.0.1"
2547                           },
2548                           "value": {
2549                             "key": {
2550                               "name": "RequestIDVNFIDAlbum",
2551                               "version": "0.0.1"
2552                             },
2553                             "scope": "policy",
2554                             "isWritable": true,
2555                             "itemSchema": {
2556                               "name": "UUIDType",
2557                               "version": "0.0.1"
2558                             }
2559                           }
2560                         },
2561                         {
2562                           "key": {
2563                             "name": "VCPEClosedLoopStatusAlbum",
2564                             "version": "0.0.1"
2565                           },
2566                           "value": {
2567                             "key": {
2568                               "name": "VCPEClosedLoopStatusAlbum",
2569                               "version": "0.0.1"
2570                             },
2571                             "scope": "policy",
2572                             "isWritable": true,
2573                             "itemSchema": {
2574                               "name": "VCPEClosedLoopStatusType",
2575                               "version": "0.0.1"
2576                             }
2577                           }
2578                         }
2579                       ]
2580                     }
2581                   },
2582                   "schemas": {
2583                     "key": {
2584                       "name": "ONAPvCPEPolicyModel_Schemas",
2585                       "version": "0.0.1"
2586                     },
2587                     "schemas": {
2588                       "entry": [
2589                         {
2590                           "key": {
2591                             "name": "APPCLCMRequestType",
2592                             "version": "0.0.1"
2593                           },
2594                           "value": {
2595                             "key": {
2596                               "name": "APPCLCMRequestType",
2597                               "version": "0.0.1"
2598                             },
2599                             "schemaFlavour": "Java",
2600                             "schemaDefinition": "org.onap.policy.appclcm.AppcLcmMessageWrapper"
2601                           }
2602                         },
2603                         {
2604                           "key": {
2605                             "name": "APPCLCMResponseType",
2606                             "version": "0.0.1"
2607                           },
2608                           "value": {
2609                             "key": {
2610                               "name": "APPCLCMResponseType",
2611                               "version": "0.0.1"
2612                             },
2613                             "schemaFlavour": "Java",
2614                             "schemaDefinition": "org.onap.policy.appclcm.AppcLcmMessageWrapper"
2615                           }
2616                         },
2617                         {
2618                           "key": {
2619                             "name": "GuardDecisionAttributesType",
2620                             "version": "0.0.1"
2621                           },
2622                           "value": {
2623                             "key": {
2624                               "name": "GuardDecisionAttributesType",
2625                               "version": "0.0.1"
2626                             },
2627                             "schemaFlavour": "Avro",
2628                             "schemaDefinition": "{\n    \"type\": \"record\",\n    \"name\": \"GuardDecisionAttributes_Type\",\n    \"namespace\": \"org.onap.policy.apex.onap.vcpe\",\n    \"fields\": [\n        {\n            \"name\": \"actor\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"recipe\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"target\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"clname\",\n            \"type\": \"string\"\n        }\n    ]\n}"
2629                           }
2630                         },
2631                         {
2632                           "key": {
2633                             "name": "SimpleBooleanType",
2634                             "version": "0.0.1"
2635                           },
2636                           "value": {
2637                             "key": {
2638                               "name": "SimpleBooleanType",
2639                               "version": "0.0.1"
2640                             },
2641                             "schemaFlavour": "Java",
2642                             "schemaDefinition": "java.lang.Boolean"
2643                           }
2644                         },
2645                         {
2646                           "key": {
2647                             "name": "SimpleLongType",
2648                             "version": "0.0.1"
2649                           },
2650                           "value": {
2651                             "key": {
2652                               "name": "SimpleLongType",
2653                               "version": "0.0.1"
2654                             },
2655                             "schemaFlavour": "Java",
2656                             "schemaDefinition": "java.lang.Long"
2657                           }
2658                         },
2659                         {
2660                           "key": {
2661                             "name": "SimpleStringType",
2662                             "version": "0.0.1"
2663                           },
2664                           "value": {
2665                             "key": {
2666                               "name": "SimpleStringType",
2667                               "version": "0.0.1"
2668                             },
2669                             "schemaFlavour": "Java",
2670                             "schemaDefinition": "java.lang.String"
2671                           }
2672                         },
2673                         {
2674                           "key": {
2675                             "name": "UUIDType",
2676                             "version": "0.0.1"
2677                           },
2678                           "value": {
2679                             "key": {
2680                               "name": "UUIDType",
2681                               "version": "0.0.1"
2682                             },
2683                             "schemaFlavour": "Java",
2684                             "schemaDefinition": "java.util.UUID"
2685                           }
2686                         },
2687                         {
2688                           "key": {
2689                             "name": "VCPEClosedLoopStatusType",
2690                             "version": "0.0.1"
2691                           },
2692                           "value": {
2693                             "key": {
2694                               "name": "VCPEClosedLoopStatusType",
2695                               "version": "0.0.1"
2696                             },
2697                             "schemaFlavour": "Avro",
2698                             "schemaDefinition": "{\n    \"type\": \"record\",\n    \"name\": \"VCPEClosedLoopStatus\",\n    \"fields\": [\n        {\n            \"name\": \"AAI\",\n            \"type\": {\n                \"type\": \"record\",\n                \"name\": \"VCPE_AAI_Type\",\n                \"namespace\": \"org.onap.policy.apex.onap.vcpe\",\n                \"fields\": [\n                    {\n                        \"name\": \"genericVnfResourceVersion\",\n                        \"type\": \"string\"\n                    },\n                    {\n                        \"name\": \"genericVnfVnfName\",\n                        \"type\": \"string\"\n                    },\n                    {\n                        \"name\": \"genericVnfProvStatus\",\n                        \"type\": \"string\"\n                    },\n                    {\n                        \"name\": \"genericVnfIsClosedLoopDisabled\",\n                        \"type\": \"string\"\n                    },\n                    {\n                        \"name\": \"genericVnfOrchestrationStatus\",\n                        \"type\": \"string\"\n                    },\n                    {\n                        \"name\": \"genericVnfVnfType\",\n                        \"type\": \"string\"\n                    },\n                    {\n                        \"name\": \"genericVnfInMaint\",\n                        \"type\": \"string\"\n                    },\n                    {\n                        \"name\": \"genericVnfServiceId\",\n                        \"type\": \"string\"\n                    },\n                    {\n                        \"name\": \"genericVnfVnfId\",\n                        \"type\": \"string\"\n                    },\n                    {\n                        \"name\": \"vserverIsClosedLoopDisabled\",\n                        \"type\": \"string\"\n                    },\n                    {\n                        \"name\": \"vserverName\",\n                        \"type\": \"string\"\n                    },\n                    {\n                        \"name\": \"vserverProvStatus\",\n                        \"type\": \"string\"\n                    }\n                ]\n            }\n        },\n        {\n            \"name\": \"closedLoopAlarmStart\",\n            \"type\": \"long\"\n        },\n        {\n            \"name\": \"closedLoopAlarmEnd\",\n            \"type\": \"long\"\n        },\n        {\n            \"name\": \"closedLoopControlName\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"version\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"requestID\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"closedLoopEventClient\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"closedLoopEventStatus\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"target_type\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"target\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"from\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"policyScope\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"policyName\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"policyVersion\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"notification\",\n            \"type\": \"string\"\n        },\n        {\n            \"name\": \"notificationTime\",\n            \"type\": \"long\"\n        },\n        {\n            \"name\": \"message\",\n            \"type\": \"string\"\n        }\n    ]\n}"
2699                           }
2700                         },
2701                         {
2702                           "key": {
2703                             "name": "VirtualControlLoopEventType",
2704                             "version": "0.0.1"
2705                           },
2706                           "value": {
2707                             "key": {
2708                               "name": "VirtualControlLoopEventType",
2709                               "version": "0.0.1"
2710                             },
2711                             "schemaFlavour": "Java",
2712                             "schemaDefinition": "org.onap.policy.controlloop.VirtualControlLoopEvent"
2713                           }
2714                         },
2715                         {
2716                           "key": {
2717                             "name": "VirtualControlLoopNotificationType",
2718                             "version": "0.0.1"
2719                           },
2720                           "value": {
2721                             "key": {
2722                               "name": "VirtualControlLoopNotificationType",
2723                               "version": "0.0.1"
2724                             },
2725                             "schemaFlavour": "Java",
2726                             "schemaDefinition": "org.onap.policy.controlloop.VirtualControlLoopNotification"
2727                           }
2728                         }
2729                       ]
2730                     }
2731                   }
2732                 }
2733               },
2734               "engineParameters": {
2735                 "executorParameters": {
2736                   "JAVASCRIPT": {
2737                     "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
2738                   }
2739                 },
2740                 "contextParameters": {
2741                   "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters",
2742                   "schemaParameters": {
2743                     "Avro": {
2744                       "parameterClassName": "org.onap.policy.apex.plugins.context.schema.avro.AvroSchemaHelperParameters"
2745                     },
2746                     "Java": {
2747                       "parameterClassName": "org.onap.policy.apex.context.impl.schema.java.JavaSchemaHelperParameters",
2748                       "jsonAdapters": {
2749                         "Instant": {
2750                           "adaptedClass": "java.time.Instant",
2751                           "adaptorClass": "org.onap.policy.controlloop.util.Serialization$GsonInstantAdapter"
2752                         }
2753                       }
2754                     }
2755                   }
2756                 },
2757                 "taskParameters": [
2758                   {
2759                     "key": "ParameterKey1",
2760                     "value": "ParameterValue1"
2761                   },
2762                   {
2763                     "taskId": "AAILookupTask:0.0.1",
2764                     "key": "SomeKeyForThisTask",
2765                     "value": "Value"
2766                   }
2767                 ]
2768               }
2769             },
2770             "eventInputParameters": {
2771               "GuardRequestorConsumer": {
2772                 "carrierTechnologyParameters": {
2773                   "carrierTechnology": "RESTREQUESTOR",
2774                   "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters",
2775                   "parameters": {
2776                     "url": "http://111.222.333.444:5555/pdp/api/getDecision",
2777                     "httpMethod": "POST",
2778                     "restRequestTimeout": 2000,
2779                     "httpHeader": "Authorization:aaaaaaaaa== ClientAuth:bbbbbbbbb="
2780                   }
2781                 },
2782                 "eventProtocolParameters": {
2783                   "eventProtocol": "JSON"
2784                 },
2785                 "eventName": "GuardResponseEvent",
2786                 "eventNameFilter": "GuardResponseEvent",
2787                 "requestorMode": true,
2788                 "requestorPeer": "GuardRequestorProducer",
2789                 "requestorTimeout": 500
2790               },
2791               "DCAEConsumer": {
2792                 "carrierTechnologyParameters": {
2793                   "carrierTechnology": "RESTCLIENT",
2794                   "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
2795                   "parameters": {
2796                     "url": "http://message-router:3904/events/unauthenticated.DCAE_CL_OUTPUT/APEX/1?timeout=60000"
2797                   }
2798                 },
2799                 "eventProtocolParameters": {
2800                   "eventProtocol": "JSON",
2801                   "parameters": {
2802                     "nameAlias": "closedLoopControlName",
2803                     "versionAlias": "version",
2804                     "sourceAlias": "from",
2805                     "pojoField": "VirtualControlLoopEvent"
2806                   }
2807                 },
2808                 "eventName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e"
2809               },
2810               "APPCConsumer": {
2811                 "carrierTechnologyParameters": {
2812                   "carrierTechnology": "RESTCLIENT",
2813                   "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
2814                   "parameters": {
2815                     "url": "http://message-router:3904/events/APPC-LCM-WRITE/APEX/1?timeout=60000"
2816                   }
2817                 },
2818                 "eventProtocolParameters": {
2819                   "eventProtocol": "JSON",
2820                   "parameters": {
2821                     "versionAlias": "version",
2822                     "pojoField": "APPCLCMResponseEvent"
2823                   }
2824                 },
2825                 "eventName": "APPCRestartVNFResponseEvent",
2826                 "eventNameFilter": "APPCRestartVNFResponseEvent"
2827               }
2828             },
2829             "eventOutputParameters": {
2830               "logProducer": {
2831                 "carrierTechnologyParameters": {
2832                   "carrierTechnology": "FILE",
2833                   "parameters": {
2834                     "fileName": "/tmp/VCPEEventsOut.json"
2835                   }
2836                 },
2837                 "eventProtocolParameters": {
2838                   "eventProtocol": "JSON"
2839                 }
2840               },
2841               "GuardRequestorProducer": {
2842                 "carrierTechnologyParameters": {
2843                   "carrierTechnology": "RESTREQUESTOR",
2844                   "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restrequestor.RestRequestorCarrierTechnologyParameters"
2845                 },
2846                 "eventProtocolParameters": {
2847                   "eventProtocol": "JSON"
2848                 },
2849                 "eventNameFilter": "GuardRequestEvent",
2850                 "requestorMode": true,
2851                 "requestorPeer": "GuardRequestorConsumer",
2852                 "requestorTimeout": 500
2853               },
2854               "APPCProducer": {
2855                 "carrierTechnologyParameters": {
2856                   "carrierTechnology": "RESTCLIENT",
2857                   "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
2858                   "parameters": {
2859                     "url": "http://message-router:3904/events/APPC-LCM-READ"
2860                   }
2861                 },
2862                 "eventProtocolParameters": {
2863                   "eventProtocol": "JSON",
2864                   "parameters": {
2865                     "versionAlias": "version",
2866                     "sourceAlias": "from",
2867                     "pojoField": "APPCLCMRequestEvent"
2868                   }
2869                 },
2870                 "eventNameFilter": "APPCRestartVNFRequestEvent"
2871               },
2872               "PolicyLogProducer": {
2873                 "carrierTechnologyParameters": {
2874                   "carrierTechnology": "RESTCLIENT",
2875                   "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
2876                   "parameters": {
2877                     "url": "http://message-router:3904/events/POLICY-CL-MGT"
2878                   }
2879                 },
2880                 "eventProtocolParameters": {
2881                   "eventProtocol": "JSON",
2882                   "parameters": {
2883                     "versionAlias": "version",
2884                     "sourceAlias": "from",
2885                     "pojoField": "VirtualControlLoopNotification"
2886                   }
2887                 },
2888                 "eventNameFilter": "ControlLoopLogEvent"
2889               }
2890             }
2891           }
2892         }
2893       }
2894     ]
2895   }
2896 }