Update snapshot and/or references of policy/models to latest snapshots
[policy/models.git] / models-examples / src / main / resources / nodetemplates / nodetemplates.metadatasets.input.tosca.json
1 {
2   "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
3   "node_types": {
4     "org.onap.nodetypes.policy.MetadataSet": {
5       "derived_from": "tosca.nodetypes.Root",
6       "version": "1.0.0"
7     }
8   },
9
10   "topology_template": {
11     "node_templates": {
12       "apexMetadata_grpc": {
13         "version": "1.2.1",
14         "type": "org.onap.nodetypes.policy.MetadataSet",
15         "type_version": "1.0.0",
16         "description": "Metadata set for GRPC",
17         "metadata": {
18           "policyModel": {
19             "key": {
20               "name": "GrpcPolicyModel",
21               "version": "1.0.1"
22             }
23           },
24           "threshold": 3.14,
25           "state": "active"
26         }
27       },
28       "apexMetadata_adaptive": {
29         "version": "2.3.1",
30         "type": "org.onap.nodetypes.policy.MetadataSet",
31         "type_version": "1.0.0",
32         "description": "Metadata set for an Adaptive Policy",
33         "metadata": {
34           "policyModel": {
35             "key": {
36               "name": "AdaptivePolicyModel",
37               "version": "1.2.1"
38             }
39           },
40           "radius": 1.23,
41           "height": 2.13,
42           "length": 45
43         }
44       },
45       "apexMetadata_decisionMaker": {
46         "version": "1.0.0",
47         "type": "org.onap.nodetypes.policy.MetadataSet",
48         "type_version": "1.0.0",
49         "description": "Metadata set for an Adaptive Policy",
50         "metadata": {
51           "policyModel": {
52             "key": {
53               "name": "DecisionMakerPolicyModel",
54               "version": "1.0.0"
55             },
56             "keyInformation": {
57               "key": {
58                 "name": "DecisionMakerPolicyModel_KeyInfo",
59                 "version": "0.0.1"
60               },
61               "keyInfoMap": {
62                 "entry": [
63                   {
64                     "key": {
65                       "name": "AnswerAlbum",
66                       "version": "0.0.1"
67                     },
68                     "value": {
69                       "key": {
70                         "name": "AnswerAlbum",
71                         "version": "0.0.1"
72                       },
73                       "UUID": "4ea21a2c-5dc7-337f-ba13-f427a4ae79a1",
74                       "description": "Generated description for concept referred to by key \"AnswerAlbum:0.0.1\""
75                     }
76                   },
77                   {
78                     "key": {
79                       "name": "AnswerEvent",
80                       "version": "0.0.1"
81                     },
82                     "value": {
83                       "key": {
84                         "name": "AnswerEvent",
85                         "version": "0.0.1"
86                       },
87                       "UUID": "ce2233b8-bb89-3c5e-a18f-1d13089d2bb6",
88                       "description": "Generated description for concept referred to by key \"AnswerEvent:0.0.1\""
89                     }
90                   },
91                   {
92                     "key": {
93                       "name": "AnswerInitPolicy",
94                       "version": "0.0.1"
95                     },
96                     "value": {
97                       "key": {
98                         "name": "AnswerInitPolicy",
99                         "version": "0.0.1"
100                       },
101                       "UUID": "c8254064-b171-3ccb-85c0-29b5719ee8fc",
102                       "description": "Generated description for concept referred to by key \"AnswerInitPolicy:0.0.1\""
103                     }
104                   },
105                   {
106                     "key": {
107                       "name": "AnswerInitTask",
108                       "version": "0.0.1"
109                     },
110                     "value": {
111                       "key": {
112                         "name": "AnswerInitTask",
113                         "version": "0.0.1"
114                       },
115                       "UUID": "28fb33d2-a4e0-3046-8302-7baf9a2056d1",
116                       "description": "Generated description for concept referred to by key \"AnswerInitTask:0.0.1\""
117                     }
118                   },
119                   {
120                     "key": {
121                       "name": "DecisionEvent",
122                       "version": "0.0.1"
123                     },
124                     "value": {
125                       "key": {
126                         "name": "DecisionEvent",
127                         "version": "0.0.1"
128                       },
129                       "UUID": "487acc75-b5a1-3285-90cf-98ecd6fb3500",
130                       "description": "Generated description for concept referred to by key \"DecisionEvent:0.0.1\""
131                     }
132                   },
133                   {
134                     "key": {
135                       "name": "DecisionMakerPolicy",
136                       "version": "0.0.1"
137                     },
138                     "value": {
139                       "key": {
140                         "name": "DecisionMakerPolicy",
141                         "version": "0.0.1"
142                       },
143                       "UUID": "9e8dda9a-6f85-311d-842b-00b5b5578edd",
144                       "description": "Generated description for concept referred to by key \"DecisionMakerPolicy:0.0.1\""
145                     }
146                   },
147                   {
148                     "key": {
149                       "name": "DecisionMakerPolicyModel",
150                       "version": "0.0.1"
151                     },
152                     "value": {
153                       "key": {
154                         "name": "DecisionMakerPolicyModel",
155                         "version": "0.0.1"
156                       },
157                       "UUID": "d7789464-e4d1-382e-8481-fba53fa7b9a9",
158                       "description": "Generated description for concept referred to by key \"DecisionMakerPolicyModel:0.0.1\""
159                     }
160                   },
161                   {
162                     "key": {
163                       "name": "DecisionMakerPolicyModel_Albums",
164                       "version": "0.0.1"
165                     },
166                     "value": {
167                       "key": {
168                         "name": "DecisionMakerPolicyModel_Albums",
169                         "version": "0.0.1"
170                       },
171                       "UUID": "e5dfbadd-5229-3ad9-996c-eda030ef5dc1",
172                       "description": "Generated description for concept referred to by key \"DecisionMakerPolicyModel_Albums:0.0.1\""
173                     }
174                   },
175                   {
176                     "key": {
177                       "name": "DecisionMakerPolicyModel_Events",
178                       "version": "0.0.1"
179                     },
180                     "value": {
181                       "key": {
182                         "name": "DecisionMakerPolicyModel_Events",
183                         "version": "0.0.1"
184                       },
185                       "UUID": "b4248202-ff8e-3d45-8b3d-0ed0fd2eaed4",
186                       "description": "Generated description for concept referred to by key \"DecisionMakerPolicyModel_Events:0.0.1\""
187                     }
188                   },
189                   {
190                     "key": {
191                       "name": "DecisionMakerPolicyModel_KeyInfo",
192                       "version": "0.0.1"
193                     },
194                     "value": {
195                       "key": {
196                         "name": "DecisionMakerPolicyModel_KeyInfo",
197                         "version": "0.0.1"
198                       },
199                       "UUID": "693b1b29-c4c6-34ba-98e1-bc1a7576f0f8",
200                       "description": "Generated description for concept referred to by key \"DecisionMakerPolicyModel_KeyInfo:0.0.1\""
201                     }
202                   },
203                   {
204                     "key": {
205                       "name": "DecisionMakerPolicyModel_Policies",
206                       "version": "0.0.1"
207                     },
208                     "value": {
209                       "key": {
210                         "name": "DecisionMakerPolicyModel_Policies",
211                         "version": "0.0.1"
212                       },
213                       "UUID": "2dee1e42-9caa-32b1-9298-784dcdcb9cae",
214                       "description": "Generated description for concept referred to by key \"DecisionMakerPolicyModel_Policies:0.0.1\""
215                     }
216                   },
217                   {
218                     "key": {
219                       "name": "DecisionMakerPolicyModel_Schemas",
220                       "version": "0.0.1"
221                     },
222                     "value": {
223                       "key": {
224                         "name": "DecisionMakerPolicyModel_Schemas",
225                         "version": "0.0.1"
226                       },
227                       "UUID": "c256f102-2681-3f35-bbbd-1f4948587e15",
228                       "description": "Generated description for concept referred to by key \"DecisionMakerPolicyModel_Schemas:0.0.1\""
229                     }
230                   },
231                   {
232                     "key": {
233                       "name": "DecisionMakerPolicyModel_Tasks",
234                       "version": "0.0.1"
235                     },
236                     "value": {
237                       "key": {
238                         "name": "DecisionMakerPolicyModel_Tasks",
239                         "version": "0.0.1"
240                       },
241                       "UUID": "660cbdba-687d-3a05-ba26-69daf93a8158",
242                       "description": "Generated description for concept referred to by key \"DecisionMakerPolicyModel_Tasks:0.0.1\""
243                     }
244                   },
245                   {
246                     "key": {
247                       "name": "DitheringAnswerTask",
248                       "version": "0.0.1"
249                     },
250                     "value": {
251                       "key": {
252                         "name": "DitheringAnswerTask",
253                         "version": "0.0.1"
254                       },
255                       "UUID": "da31cee8-2e84-39d2-9337-9ee3bf347c98",
256                       "description": "Generated description for concept referred to by key \"DitheringAnswerTask:0.0.1\""
257                     }
258                   },
259                   {
260                     "key": {
261                       "name": "LastAnswerAlbum",
262                       "version": "0.0.1"
263                     },
264                     "value": {
265                       "key": {
266                         "name": "LastAnswerAlbum",
267                         "version": "0.0.1"
268                       },
269                       "UUID": "21399145-3fbe-39a5-b863-8a59a8add4a8",
270                       "description": "Generated description for concept referred to by key \"LastAnswerAlbum:0.0.1\""
271                     }
272                   },
273                   {
274                     "key": {
275                       "name": "MakeDecisionEvent",
276                       "version": "0.0.1"
277                     },
278                     "value": {
279                       "key": {
280                         "name": "MakeDecisionEvent",
281                         "version": "0.0.1"
282                       },
283                       "UUID": "02ec632a-aeae-31fe-8f6d-656e1875749f",
284                       "description": "Generated description for concept referred to by key \"MakeDecisionEvent:0.0.1\""
285                     }
286                   },
287                   {
288                     "key": {
289                       "name": "OptimisticAnswerTask",
290                       "version": "0.0.1"
291                     },
292                     "value": {
293                       "key": {
294                         "name": "OptimisticAnswerTask",
295                         "version": "0.0.1"
296                       },
297                       "UUID": "818e6b9e-0109-31f5-a95c-17f6fb016027",
298                       "description": "Generated description for concept referred to by key \"OptimisticAnswerTask:0.0.1\""
299                     }
300                   },
301                   {
302                     "key": {
303                       "name": "PessimisticAnswerTask",
304                       "version": "0.0.1"
305                     },
306                     "value": {
307                       "key": {
308                         "name": "PessimisticAnswerTask",
309                         "version": "0.0.1"
310                       },
311                       "UUID": "8f4a707e-0d8b-3e09-b921-332f6f81f302",
312                       "description": "Generated description for concept referred to by key \"PessimisticAnswerTask:0.0.1\""
313                     }
314                   },
315                   {
316                     "key": {
317                       "name": "RandomAnswerTask",
318                       "version": "0.0.1"
319                     },
320                     "value": {
321                       "key": {
322                         "name": "RandomAnswerTask",
323                         "version": "0.0.1"
324                       },
325                       "UUID": "bfb0af88-b454-3b08-911f-7ff2475350bf",
326                       "description": "Generated description for concept referred to by key \"RandomAnswerTask:0.0.1\""
327                     }
328                   },
329                   {
330                     "key": {
331                       "name": "RoundRobinAnswerTask",
332                       "version": "0.0.1"
333                     },
334                     "value": {
335                       "key": {
336                         "name": "RoundRobinAnswerTask",
337                         "version": "0.0.1"
338                       },
339                       "UUID": "eac6fb59-8aca-3011-b7ba-69875f1db4b6",
340                       "description": "Generated description for concept referred to by key \"RoundRobinAnswerTask:0.0.1\""
341                     }
342                   },
343                   {
344                     "key": {
345                       "name": "SimpleIntegerType",
346                       "version": "0.0.1"
347                     },
348                     "value": {
349                       "key": {
350                         "name": "SimpleIntegerType",
351                         "version": "0.0.1"
352                       },
353                       "UUID": "ab00a5b8-7edd-340f-8140-4d14f571edfb",
354                       "description": "Generated description for concept referred to by key \"SimpleIntegerType:0.0.1\""
355                     }
356                   },
357                   {
358                     "key": {
359                       "name": "SimpleStringType",
360                       "version": "0.0.1"
361                     },
362                     "value": {
363                       "key": {
364                         "name": "SimpleStringType",
365                         "version": "0.0.1"
366                       },
367                       "UUID": "8a4957cf-9493-3a76-8c22-a208e23259af",
368                       "description": "Generated description for concept referred to by key \"SimpleStringType:0.0.1\""
369                     }
370                   }
371                 ]
372               }
373             },
374             "policies": {
375               "key": {
376                 "name": "DecisionMakerPolicyModel_Policies",
377                 "version": "0.0.1"
378               },
379               "policyMap": {
380                 "entry": [
381                   {
382                     "key": {
383                       "name": "AnswerInitPolicy",
384                       "version": "0.0.1"
385                     },
386                     "value": {
387                       "policyKey": {
388                         "name": "AnswerInitPolicy",
389                         "version": "0.0.1"
390                       },
391                       "template": "freestyle",
392                       "state": {
393                         "entry": [
394                           {
395                             "key": "AnswerInitState",
396                             "value": {
397                               "stateKey": {
398                                 "parentKeyName": "AnswerInitPolicy",
399                                 "parentKeyVersion": "0.0.1",
400                                 "parentLocalName": "NULL",
401                                 "localName": "AnswerInitState"
402                               },
403                               "trigger": {
404                                 "name": "AnswerEvent",
405                                 "version": "0.0.1"
406                               },
407                               "stateOutputs": {
408                                 "entry": [
409                                   {
410                                     "key": "AnswerInitOutput",
411                                     "value": {
412                                       "key": {
413                                         "parentKeyName": "AnswerInitPolicy",
414                                         "parentKeyVersion": "0.0.1",
415                                         "parentLocalName": "AnswerInitState",
416                                         "localName": "AnswerInitOutput"
417                                       },
418                                       "outgoingEvent": {
419                                         "name": "AnswerEvent",
420                                         "version": "0.0.1"
421                                       },
422                                       "outgoingEventReference": [
423                                         {
424                                           "name": "AnswerEvent",
425                                           "version": "0.0.1"
426                                         }
427                                       ],
428                                       "nextState": {
429                                         "parentKeyName": "NULL",
430                                         "parentKeyVersion": "0.0.0",
431                                         "parentLocalName": "NULL",
432                                         "localName": "NULL"
433                                       }
434                                     }
435                                   }
436                                 ]
437                               },
438                               "contextAlbumReference": [],
439                               "taskSelectionLogic": {
440                                 "key": "NULL",
441                                 "logicFlavour": "UNDEFINED",
442                                 "logic": ""
443                               },
444                               "stateFinalizerLogicMap": {
445                                 "entry": []
446                               },
447                               "defaultTask": {
448                                 "name": "AnswerInitTask",
449                                 "version": "0.0.1"
450                               },
451                               "taskReferences": {
452                                 "entry": [
453                                   {
454                                     "key": {
455                                       "name": "AnswerInitTask",
456                                       "version": "0.0.1"
457                                     },
458                                     "value": {
459                                       "key": {
460                                         "parentKeyName": "AnswerInitPolicy",
461                                         "parentKeyVersion": "0.0.1",
462                                         "parentLocalName": "AnswerInitState",
463                                         "localName": "AnswerInitPolicy"
464                                       },
465                                       "outputType": "DIRECT",
466                                       "output": {
467                                         "parentKeyName": "AnswerInitPolicy",
468                                         "parentKeyVersion": "0.0.1",
469                                         "parentLocalName": "AnswerInitState",
470                                         "localName": "AnswerInitOutput"
471                                       }
472                                     }
473                                   }
474                                 ]
475                               }
476                             }
477                           }
478                         ]
479                       },
480                       "firstState": "AnswerInitState"
481                     }
482                   },
483                   {
484                     "key": {
485                       "name": "DecisionMakerPolicy",
486                       "version": "0.0.1"
487                     },
488                     "value": {
489                       "policyKey": {
490                         "name": "DecisionMakerPolicy",
491                         "version": "0.0.1"
492                       },
493                       "template": "freestyle",
494                       "state": {
495                         "entry": [
496                           {
497                             "key": "MakeDecisionState",
498                             "value": {
499                               "stateKey": {
500                                 "parentKeyName": "DecisionMakerPolicy",
501                                 "parentKeyVersion": "0.0.1",
502                                 "parentLocalName": "NULL",
503                                 "localName": "MakeDecisionState"
504                               },
505                               "trigger": {
506                                 "name": "MakeDecisionEvent",
507                                 "version": "0.0.1"
508                               },
509                               "stateOutputs": {
510                                 "entry": [
511                                   {
512                                     "key": "DecisionFinalOutput",
513                                     "value": {
514                                       "key": {
515                                         "parentKeyName": "DecisionMakerPolicy",
516                                         "parentKeyVersion": "0.0.1",
517                                         "parentLocalName": "MakeDecisionState",
518                                         "localName": "DecisionFinalOutput"
519                                       },
520                                       "outgoingEvent": {
521                                         "name": "DecisionEvent",
522                                         "version": "0.0.1"
523                                       },
524                                       "outgoingEventReference": [
525                                         {
526                                           "name": "DecisionEvent",
527                                           "version": "0.0.1"
528                                         }
529                                       ],
530                                       "nextState": {
531                                         "parentKeyName": "NULL",
532                                         "parentKeyVersion": "0.0.0",
533                                         "parentLocalName": "NULL",
534                                         "localName": "NULL"
535                                       }
536                                     }
537                                   }
538                                 ]
539                               },
540                               "contextAlbumReference": [],
541                               "taskSelectionLogic": {
542                                 "key": "TaskSelectionLogic",
543                                 "logicFlavour": "JAVASCRIPT",
544                                 "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\nif (executor.inFields.get(\"mode\").equals(\"random\")) {\n    executor.subject.getTaskKey(\"RandomAnswerTask\").copyTo(executor.selectedTask);\n}\nelse if (executor.inFields.get(\"mode\").equals(\"pessimistic\")) {\n    executor.subject.getTaskKey(\"PessimisticAnswerTask\").copyTo(executor.selectedTask);\n}\nelse if (executor.inFields.get(\"mode\").equals(\"optimistic\")) {\n    executor.subject.getTaskKey(\"OptimisticAnswerTask\").copyTo(executor.selectedTask);\n}\nelse if (executor.inFields.get(\"mode\").equals(\"dithering\")) {\n    executor.subject.getTaskKey(\"DitheringAnswerTask\").copyTo(executor.selectedTask);\n}\nelse if (executor.inFields.get(\"mode\").equals(\"roundrobin\")) {\n    executor.subject.getTaskKey(\"RoundRobinAnswerTask\").copyTo(executor.selectedTask);\n}\n\nexecutor.logger.info(\"Answer Selected Task:\" + executor.selectedTask);\n\ntrue;"
545                               },
546                               "stateFinalizerLogicMap": {
547                                 "entry": []
548                               },
549                               "defaultTask": {
550                                 "name": "RandomAnswerTask",
551                                 "version": "0.0.1"
552                               },
553                               "taskReferences": {
554                                 "entry": [
555                                   {
556                                     "key": {
557                                       "name": "DitheringAnswerTask",
558                                       "version": "0.0.1"
559                                     },
560                                     "value": {
561                                       "key": {
562                                         "parentKeyName": "DecisionMakerPolicy",
563                                         "parentKeyVersion": "0.0.1",
564                                         "parentLocalName": "MakeDecisionState",
565                                         "localName": "DecisionMakerPolicy"
566                                       },
567                                       "outputType": "DIRECT",
568                                       "output": {
569                                         "parentKeyName": "DecisionMakerPolicy",
570                                         "parentKeyVersion": "0.0.1",
571                                         "parentLocalName": "MakeDecisionState",
572                                         "localName": "DecisionFinalOutput"
573                                       }
574                                     }
575                                   },
576                                   {
577                                     "key": {
578                                       "name": "OptimisticAnswerTask",
579                                       "version": "0.0.1"
580                                     },
581                                     "value": {
582                                       "key": {
583                                         "parentKeyName": "DecisionMakerPolicy",
584                                         "parentKeyVersion": "0.0.1",
585                                         "parentLocalName": "MakeDecisionState",
586                                         "localName": "DecisionMakerPolicy"
587                                       },
588                                       "outputType": "DIRECT",
589                                       "output": {
590                                         "parentKeyName": "DecisionMakerPolicy",
591                                         "parentKeyVersion": "0.0.1",
592                                         "parentLocalName": "MakeDecisionState",
593                                         "localName": "DecisionFinalOutput"
594                                       }
595                                     }
596                                   },
597                                   {
598                                     "key": {
599                                       "name": "PessimisticAnswerTask",
600                                       "version": "0.0.1"
601                                     },
602                                     "value": {
603                                       "key": {
604                                         "parentKeyName": "DecisionMakerPolicy",
605                                         "parentKeyVersion": "0.0.1",
606                                         "parentLocalName": "MakeDecisionState",
607                                         "localName": "DecisionMakerPolicy"
608                                       },
609                                       "outputType": "DIRECT",
610                                       "output": {
611                                         "parentKeyName": "DecisionMakerPolicy",
612                                         "parentKeyVersion": "0.0.1",
613                                         "parentLocalName": "MakeDecisionState",
614                                         "localName": "DecisionFinalOutput"
615                                       }
616                                     }
617                                   },
618                                   {
619                                     "key": {
620                                       "name": "RandomAnswerTask",
621                                       "version": "0.0.1"
622                                     },
623                                     "value": {
624                                       "key": {
625                                         "parentKeyName": "DecisionMakerPolicy",
626                                         "parentKeyVersion": "0.0.1",
627                                         "parentLocalName": "MakeDecisionState",
628                                         "localName": "DecisionMakerPolicy"
629                                       },
630                                       "outputType": "DIRECT",
631                                       "output": {
632                                         "parentKeyName": "DecisionMakerPolicy",
633                                         "parentKeyVersion": "0.0.1",
634                                         "parentLocalName": "MakeDecisionState",
635                                         "localName": "DecisionFinalOutput"
636                                       }
637                                     }
638                                   },
639                                   {
640                                     "key": {
641                                       "name": "RoundRobinAnswerTask",
642                                       "version": "0.0.1"
643                                     },
644                                     "value": {
645                                       "key": {
646                                         "parentKeyName": "DecisionMakerPolicy",
647                                         "parentKeyVersion": "0.0.1",
648                                         "parentLocalName": "MakeDecisionState",
649                                         "localName": "DecisionMakerPolicy"
650                                       },
651                                       "outputType": "DIRECT",
652                                       "output": {
653                                         "parentKeyName": "DecisionMakerPolicy",
654                                         "parentKeyVersion": "0.0.1",
655                                         "parentLocalName": "MakeDecisionState",
656                                         "localName": "DecisionFinalOutput"
657                                       }
658                                     }
659                                   }
660                                 ]
661                               }
662                             }
663                           }
664                         ]
665                       },
666                       "firstState": "MakeDecisionState"
667                     }
668                   }
669                 ]
670               }
671             },
672             "tasks": {
673               "key": {
674                 "name": "DecisionMakerPolicyModel_Tasks",
675                 "version": "0.0.1"
676               },
677               "taskMap": {
678                 "entry": [
679                   {
680                     "key": {
681                       "name": "AnswerInitTask",
682                       "version": "0.0.1"
683                     },
684                     "value": {
685                       "key": {
686                         "name": "AnswerInitTask",
687                         "version": "0.0.1"
688                       },
689                       "inputEvent": {
690                         "key": {
691                           "name": "AnswerEvent",
692                           "version": "0.0.1"
693                         },
694                         "nameSpace": "org.onap.policy.apex.domains.decisionmaker",
695                         "source": "DCAE",
696                         "target": "apex",
697                         "parameter": {
698                           "entry": [
699                             {
700                               "key": "a0",
701                               "value": {
702                                 "key": "a0",
703                                 "fieldSchemaKey": {
704                                   "name": "SimpleStringType",
705                                   "version": "0.0.1"
706                                 },
707                                 "optional": false
708                               }
709                             },
710                             {
711                               "key": "a1",
712                               "value": {
713                                 "key": "a1",
714                                 "fieldSchemaKey": {
715                                   "name": "SimpleStringType",
716                                   "version": "0.0.1"
717                                 },
718                                 "optional": false
719                               }
720                             },
721                             {
722                               "key": "a2",
723                               "value": {
724                                 "key": "a2",
725                                 "fieldSchemaKey": {
726                                   "name": "SimpleStringType",
727                                   "version": "0.0.1"
728                                 },
729                                 "optional": false
730                               }
731                             },
732                             {
733                               "key": "a3",
734                               "value": {
735                                 "key": "a3",
736                                 "fieldSchemaKey": {
737                                   "name": "SimpleStringType",
738                                   "version": "0.0.1"
739                                 },
740                                 "optional": false
741                               }
742                             },
743                             {
744                               "key": "a4",
745                               "value": {
746                                 "key": "a4",
747                                 "fieldSchemaKey": {
748                                   "name": "SimpleStringType",
749                                   "version": "0.0.1"
750                                 },
751                                 "optional": false
752                               }
753                             },
754                             {
755                               "key": "a5",
756                               "value": {
757                                 "key": "a5",
758                                 "fieldSchemaKey": {
759                                   "name": "SimpleStringType",
760                                   "version": "0.0.1"
761                                 },
762                                 "optional": false
763                               }
764                             },
765                             {
766                               "key": "a6",
767                               "value": {
768                                 "key": "a6",
769                                 "fieldSchemaKey": {
770                                   "name": "SimpleStringType",
771                                   "version": "0.0.1"
772                                 },
773                                 "optional": false
774                               }
775                             }
776                           ]
777                         },
778                         "toscaPolicyState": ""
779                       },
780                       "outputEvents": {
781                         "entry": [
782                           {
783                             "key": "AnswerEvent",
784                             "value": {
785                               "key": {
786                                 "name": "AnswerEvent",
787                                 "version": "0.0.1"
788                               },
789                               "nameSpace": "org.onap.policy.apex.domains.decisionmaker",
790                               "source": "DCAE",
791                               "target": "apex",
792                               "parameter": {
793                                 "entry": [
794                                   {
795                                     "key": "a0",
796                                     "value": {
797                                       "key": "a0",
798                                       "fieldSchemaKey": {
799                                         "name": "SimpleStringType",
800                                         "version": "0.0.1"
801                                       },
802                                       "optional": false
803                                     }
804                                   },
805                                   {
806                                     "key": "a1",
807                                     "value": {
808                                       "key": "a1",
809                                       "fieldSchemaKey": {
810                                         "name": "SimpleStringType",
811                                         "version": "0.0.1"
812                                       },
813                                       "optional": false
814                                     }
815                                   },
816                                   {
817                                     "key": "a2",
818                                     "value": {
819                                       "key": "a2",
820                                       "fieldSchemaKey": {
821                                         "name": "SimpleStringType",
822                                         "version": "0.0.1"
823                                       },
824                                       "optional": false
825                                     }
826                                   },
827                                   {
828                                     "key": "a3",
829                                     "value": {
830                                       "key": "a3",
831                                       "fieldSchemaKey": {
832                                         "name": "SimpleStringType",
833                                         "version": "0.0.1"
834                                       },
835                                       "optional": false
836                                     }
837                                   },
838                                   {
839                                     "key": "a4",
840                                     "value": {
841                                       "key": "a4",
842                                       "fieldSchemaKey": {
843                                         "name": "SimpleStringType",
844                                         "version": "0.0.1"
845                                       },
846                                       "optional": false
847                                     }
848                                   },
849                                   {
850                                     "key": "a5",
851                                     "value": {
852                                       "key": "a5",
853                                       "fieldSchemaKey": {
854                                         "name": "SimpleStringType",
855                                         "version": "0.0.1"
856                                       },
857                                       "optional": false
858                                     }
859                                   },
860                                   {
861                                     "key": "a6",
862                                     "value": {
863                                       "key": "a6",
864                                       "fieldSchemaKey": {
865                                         "name": "SimpleStringType",
866                                         "version": "0.0.1"
867                                       },
868                                       "optional": false
869                                     }
870                                   }
871                                 ]
872                               },
873                               "toscaPolicyState": ""
874                             }
875                           }
876                         ]
877                       },
878                       "taskParameters": {
879                         "entry": []
880                       },
881                       "contextAlbumReference": [
882                         {
883                           "name": "AnswerAlbum",
884                           "version": "0.0.1"
885                         },
886                         {
887                           "name": "LastAnswerAlbum",
888                           "version": "0.0.1"
889                         }
890                       ],
891                       "taskLogic": {
892                         "key": "TaskLogic",
893                         "logicFlavour": "JAVASCRIPT",
894                         "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 answerAlbum = executor.getContextAlbum(\"AnswerAlbum\");\n\nanswerAlbum.put(\"a0\", executor.inFields.get(\"a0\"));\nanswerAlbum.put(\"a1\", executor.inFields.get(\"a1\"));\nanswerAlbum.put(\"a2\", executor.inFields.get(\"a2\"));\nanswerAlbum.put(\"a3\", executor.inFields.get(\"a3\"));\nanswerAlbum.put(\"a4\", executor.inFields.get(\"a4\"));\nanswerAlbum.put(\"a5\", executor.inFields.get(\"a5\"));\nanswerAlbum.put(\"a6\", executor.inFields.get(\"a6\"));\n\nvar lastAnswerAlbum = executor.getContextAlbum(\"LastAnswerAlbum\");\nlastAnswerAlbum.put(\"lastAnswer\", answerAlbum.size() - 1);\n\nexecutor.outFields.put(\"a0\", answerAlbum.get(\"a0\"));\nexecutor.outFields.put(\"a1\", answerAlbum.get(\"a1\"));\nexecutor.outFields.put(\"a2\", answerAlbum.get(\"a2\"));\nexecutor.outFields.put(\"a3\", answerAlbum.get(\"a3\"));\nexecutor.outFields.put(\"a4\", answerAlbum.get(\"a4\"));\nexecutor.outFields.put(\"a5\", answerAlbum.get(\"a5\"));\nexecutor.outFields.put(\"a6\", answerAlbum.get(\"a6\"));\n\nexecutor.logger.info(executor.outFields);\n\ntrue;"
895                       }
896                     }
897                   },
898                   {
899                     "key": {
900                       "name": "DitheringAnswerTask",
901                       "version": "0.0.1"
902                     },
903                     "value": {
904                       "key": {
905                         "name": "DitheringAnswerTask",
906                         "version": "0.0.1"
907                       },
908                       "inputEvent": {
909                         "key": {
910                           "name": "MakeDecisionEvent",
911                           "version": "0.0.1"
912                         },
913                         "nameSpace": "org.onap.policy.apex.domains.decisionmaker",
914                         "source": "DCAE",
915                         "target": "apex",
916                         "parameter": {
917                           "entry": [
918                             {
919                               "key": "mode",
920                               "value": {
921                                 "key": "mode",
922                                 "fieldSchemaKey": {
923                                   "name": "SimpleStringType",
924                                   "version": "0.0.1"
925                                 },
926                                 "optional": false
927                               }
928                             }
929                           ]
930                         },
931                         "toscaPolicyState": ""
932                       },
933                       "outputEvents": {
934                         "entry": [
935                           {
936                             "key": "DecisionEvent",
937                             "value": {
938                               "key": {
939                                 "name": "DecisionEvent",
940                                 "version": "0.0.1"
941                               },
942                               "nameSpace": "org.onap.policy.apex.domains.decisionmaker",
943                               "source": "DCAE",
944                               "target": "apex",
945                               "parameter": {
946                                 "entry": [
947                                   {
948                                     "key": "decision",
949                                     "value": {
950                                       "key": "decision",
951                                       "fieldSchemaKey": {
952                                         "name": "SimpleStringType",
953                                         "version": "0.0.1"
954                                       },
955                                       "optional": false
956                                     }
957                                   }
958                                 ]
959                               },
960                               "toscaPolicyState": ""
961                             }
962                           }
963                         ]
964                       },
965                       "taskParameters": {
966                         "entry": []
967                       },
968                       "contextAlbumReference": [
969                         {
970                           "name": "AnswerAlbum",
971                           "version": "0.0.1"
972                         }
973                       ],
974                       "taskLogic": {
975                         "key": "TaskLogic",
976                         "logicFlavour": "JAVASCRIPT",
977                         "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 size = executor.getContextAlbum(\"AnswerAlbum\").size();\n\nvar selection = 2 + Math.floor(Math.random() * 3);\n\nvar selectionA = \"a\" + selection;\n\nexecutor.logger.info(size);\nexecutor.logger.info(selectionA);\n\nexecutor.outFields.put(\"decision\", executor.getContextAlbum(\"AnswerAlbum\").get(selectionA));\n\nexecutor.logger.info(executor.outFields);\n\ntrue;"
978                       }
979                     }
980                   },
981                   {
982                     "key": {
983                       "name": "OptimisticAnswerTask",
984                       "version": "0.0.1"
985                     },
986                     "value": {
987                       "key": {
988                         "name": "OptimisticAnswerTask",
989                         "version": "0.0.1"
990                       },
991                       "inputEvent": {
992                         "key": {
993                           "name": "MakeDecisionEvent",
994                           "version": "0.0.1"
995                         },
996                         "nameSpace": "org.onap.policy.apex.domains.decisionmaker",
997                         "source": "DCAE",
998                         "target": "apex",
999                         "parameter": {
1000                           "entry": [
1001                             {
1002                               "key": "mode",
1003                               "value": {
1004                                 "key": "mode",
1005                                 "fieldSchemaKey": {
1006                                   "name": "SimpleStringType",
1007                                   "version": "0.0.1"
1008                                 },
1009                                 "optional": false
1010                               }
1011                             }
1012                           ]
1013                         },
1014                         "toscaPolicyState": ""
1015                       },
1016                       "outputEvents": {
1017                         "entry": [
1018                           {
1019                             "key": "DecisionEvent",
1020                             "value": {
1021                               "key": {
1022                                 "name": "DecisionEvent",
1023                                 "version": "0.0.1"
1024                               },
1025                               "nameSpace": "org.onap.policy.apex.domains.decisionmaker",
1026                               "source": "DCAE",
1027                               "target": "apex",
1028                               "parameter": {
1029                                 "entry": [
1030                                   {
1031                                     "key": "decision",
1032                                     "value": {
1033                                       "key": "decision",
1034                                       "fieldSchemaKey": {
1035                                         "name": "SimpleStringType",
1036                                         "version": "0.0.1"
1037                                       },
1038                                       "optional": false
1039                                     }
1040                                   }
1041                                 ]
1042                               },
1043                               "toscaPolicyState": ""
1044                             }
1045                           }
1046                         ]
1047                       },
1048                       "taskParameters": {
1049                         "entry": []
1050                       },
1051                       "contextAlbumReference": [
1052                         {
1053                           "name": "AnswerAlbum",
1054                           "version": "0.0.1"
1055                         }
1056                       ],
1057                       "taskLogic": {
1058                         "key": "TaskLogic",
1059                         "logicFlavour": "JAVASCRIPT",
1060                         "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 size = executor.getContextAlbum(\"AnswerAlbum\").size();\n\nvar selection = size - Math.floor(Math.random() * size / 2) - 1;\n\nvar selectionA = \"a\" + selection;\n\nexecutor.logger.info(size);\nexecutor.logger.info(selectionA);\n\nexecutor.outFields.put(\"decision\", executor.getContextAlbum(\"AnswerAlbum\").get(selectionA));\n\nexecutor.logger.info(executor.outFields);\n\ntrue;"
1061                       }
1062                     }
1063                   },
1064                   {
1065                     "key": {
1066                       "name": "PessimisticAnswerTask",
1067                       "version": "0.0.1"
1068                     },
1069                     "value": {
1070                       "key": {
1071                         "name": "PessimisticAnswerTask",
1072                         "version": "0.0.1"
1073                       },
1074                       "inputEvent": {
1075                         "key": {
1076                           "name": "MakeDecisionEvent",
1077                           "version": "0.0.1"
1078                         },
1079                         "nameSpace": "org.onap.policy.apex.domains.decisionmaker",
1080                         "source": "DCAE",
1081                         "target": "apex",
1082                         "parameter": {
1083                           "entry": [
1084                             {
1085                               "key": "mode",
1086                               "value": {
1087                                 "key": "mode",
1088                                 "fieldSchemaKey": {
1089                                   "name": "SimpleStringType",
1090                                   "version": "0.0.1"
1091                                 },
1092                                 "optional": false
1093                               }
1094                             }
1095                           ]
1096                         },
1097                         "toscaPolicyState": ""
1098                       },
1099                       "outputEvents": {
1100                         "entry": [
1101                           {
1102                             "key": "DecisionEvent",
1103                             "value": {
1104                               "key": {
1105                                 "name": "DecisionEvent",
1106                                 "version": "0.0.1"
1107                               },
1108                               "nameSpace": "org.onap.policy.apex.domains.decisionmaker",
1109                               "source": "DCAE",
1110                               "target": "apex",
1111                               "parameter": {
1112                                 "entry": [
1113                                   {
1114                                     "key": "decision",
1115                                     "value": {
1116                                       "key": "decision",
1117                                       "fieldSchemaKey": {
1118                                         "name": "SimpleStringType",
1119                                         "version": "0.0.1"
1120                                       },
1121                                       "optional": false
1122                                     }
1123                                   }
1124                                 ]
1125                               },
1126                               "toscaPolicyState": ""
1127                             }
1128                           }
1129                         ]
1130                       },
1131                       "taskParameters": {
1132                         "entry": []
1133                       },
1134                       "contextAlbumReference": [
1135                         {
1136                           "name": "AnswerAlbum",
1137                           "version": "0.0.1"
1138                         }
1139                       ],
1140                       "taskLogic": {
1141                         "key": "TaskLogic",
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 size = executor.getContextAlbum(\"AnswerAlbum\").size();\n\nvar selection = Math.floor(Math.random() * size / 2);\n\nvar selectionA = \"a\" + selection;\n\nexecutor.logger.info(size);\nexecutor.logger.info(selectionA);\n\nexecutor.outFields.put(\"decision\", executor.getContextAlbum(\"AnswerAlbum\").get(selectionA));\n\nexecutor.logger.info(executor.outFields);\n\ntrue;"
1144                       }
1145                     }
1146                   },
1147                   {
1148                     "key": {
1149                       "name": "RandomAnswerTask",
1150                       "version": "0.0.1"
1151                     },
1152                     "value": {
1153                       "key": {
1154                         "name": "RandomAnswerTask",
1155                         "version": "0.0.1"
1156                       },
1157                       "inputEvent": {
1158                         "key": {
1159                           "name": "MakeDecisionEvent",
1160                           "version": "0.0.1"
1161                         },
1162                         "nameSpace": "org.onap.policy.apex.domains.decisionmaker",
1163                         "source": "DCAE",
1164                         "target": "apex",
1165                         "parameter": {
1166                           "entry": [
1167                             {
1168                               "key": "mode",
1169                               "value": {
1170                                 "key": "mode",
1171                                 "fieldSchemaKey": {
1172                                   "name": "SimpleStringType",
1173                                   "version": "0.0.1"
1174                                 },
1175                                 "optional": false
1176                               }
1177                             }
1178                           ]
1179                         },
1180                         "toscaPolicyState": ""
1181                       },
1182                       "outputEvents": {
1183                         "entry": [
1184                           {
1185                             "key": "DecisionEvent",
1186                             "value": {
1187                               "key": {
1188                                 "name": "DecisionEvent",
1189                                 "version": "0.0.1"
1190                               },
1191                               "nameSpace": "org.onap.policy.apex.domains.decisionmaker",
1192                               "source": "DCAE",
1193                               "target": "apex",
1194                               "parameter": {
1195                                 "entry": [
1196                                   {
1197                                     "key": "decision",
1198                                     "value": {
1199                                       "key": "decision",
1200                                       "fieldSchemaKey": {
1201                                         "name": "SimpleStringType",
1202                                         "version": "0.0.1"
1203                                       },
1204                                       "optional": false
1205                                     }
1206                                   }
1207                                 ]
1208                               },
1209                               "toscaPolicyState": ""
1210                             }
1211                           }
1212                         ]
1213                       },
1214                       "taskParameters": {
1215                         "entry": []
1216                       },
1217                       "contextAlbumReference": [
1218                         {
1219                           "name": "AnswerAlbum",
1220                           "version": "0.0.1"
1221                         }
1222                       ],
1223                       "taskLogic": {
1224                         "key": "TaskLogic",
1225                         "logicFlavour": "JAVASCRIPT",
1226                         "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 size = executor.getContextAlbum(\"AnswerAlbum\").size();\n\nvar selection = Math.floor(Math.random() * size);\n\nvar selectionA = \"a\" + selection;\n\nexecutor.logger.info(size);\nexecutor.logger.info(selectionA);\n\nexecutor.outFields.put(\"decision\", executor.getContextAlbum(\"AnswerAlbum\").get(selectionA));\n\nexecutor.logger.info(executor.outFields);\n\ntrue;"
1227                       }
1228                     }
1229                   },
1230                   {
1231                     "key": {
1232                       "name": "RoundRobinAnswerTask",
1233                       "version": "0.0.1"
1234                     },
1235                     "value": {
1236                       "key": {
1237                         "name": "RoundRobinAnswerTask",
1238                         "version": "0.0.1"
1239                       },
1240                       "inputEvent": {
1241                         "key": {
1242                           "name": "MakeDecisionEvent",
1243                           "version": "0.0.1"
1244                         },
1245                         "nameSpace": "org.onap.policy.apex.domains.decisionmaker",
1246                         "source": "DCAE",
1247                         "target": "apex",
1248                         "parameter": {
1249                           "entry": [
1250                             {
1251                               "key": "mode",
1252                               "value": {
1253                                 "key": "mode",
1254                                 "fieldSchemaKey": {
1255                                   "name": "SimpleStringType",
1256                                   "version": "0.0.1"
1257                                 },
1258                                 "optional": false
1259                               }
1260                             }
1261                           ]
1262                         },
1263                         "toscaPolicyState": ""
1264                       },
1265                       "outputEvents": {
1266                         "entry": [
1267                           {
1268                             "key": "DecisionEvent",
1269                             "value": {
1270                               "key": {
1271                                 "name": "DecisionEvent",
1272                                 "version": "0.0.1"
1273                               },
1274                               "nameSpace": "org.onap.policy.apex.domains.decisionmaker",
1275                               "source": "DCAE",
1276                               "target": "apex",
1277                               "parameter": {
1278                                 "entry": [
1279                                   {
1280                                     "key": "decision",
1281                                     "value": {
1282                                       "key": "decision",
1283                                       "fieldSchemaKey": {
1284                                         "name": "SimpleStringType",
1285                                         "version": "0.0.1"
1286                                       },
1287                                       "optional": false
1288                                     }
1289                                   }
1290                                 ]
1291                               },
1292                               "toscaPolicyState": ""
1293                             }
1294                           }
1295                         ]
1296                       },
1297                       "taskParameters": {
1298                         "entry": []
1299                       },
1300                       "contextAlbumReference": [
1301                         {
1302                           "name": "AnswerAlbum",
1303                           "version": "0.0.1"
1304                         },
1305                         {
1306                           "name": "LastAnswerAlbum",
1307                           "version": "0.0.1"
1308                         }
1309                       ],
1310                       "taskLogic": {
1311                         "key": "TaskLogic",
1312                         "logicFlavour": "JAVASCRIPT",
1313                         "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 size = executor.getContextAlbum(\"AnswerAlbum\").size();\nvar lastAnswer = executor.getContextAlbum(\"LastAnswerAlbum\").get(\"lastAnswer\");\n\nexecutor.logger.info(size);\nexecutor.logger.info(lastAnswer);\n\nvar answer = ++lastAnswer;\nif (answer >= size) {\n    answer = 0;\n}\n\nexecutor.getContextAlbum(\"LastAnswerAlbum\").put(\"lastAnswer\", answer)\n\nvar selectionA = \"a\" + answer;\n\nexecutor.logger.info(selectionA);\n\nexecutor.outFields.put(\"decision\", executor.getContextAlbum(\"AnswerAlbum\").get(selectionA));\n\nexecutor.logger.info(executor.outFields);\n\ntrue;"
1314                       }
1315                     }
1316                   }
1317                 ]
1318               }
1319             },
1320             "events": {
1321               "key": {
1322                 "name": "DecisionMakerPolicyModel_Events",
1323                 "version": "0.0.1"
1324               },
1325               "eventMap": {
1326                 "entry": [
1327                   {
1328                     "key": {
1329                       "name": "AnswerEvent",
1330                       "version": "0.0.1"
1331                     },
1332                     "value": {
1333                       "key": {
1334                         "name": "AnswerEvent",
1335                         "version": "0.0.1"
1336                       },
1337                       "nameSpace": "org.onap.policy.apex.domains.decisionmaker",
1338                       "source": "DCAE",
1339                       "target": "apex",
1340                       "parameter": {
1341                         "entry": [
1342                           {
1343                             "key": "a0",
1344                             "value": {
1345                               "key": "a0",
1346                               "fieldSchemaKey": {
1347                                 "name": "SimpleStringType",
1348                                 "version": "0.0.1"
1349                               },
1350                               "optional": false
1351                             }
1352                           },
1353                           {
1354                             "key": "a1",
1355                             "value": {
1356                               "key": "a1",
1357                               "fieldSchemaKey": {
1358                                 "name": "SimpleStringType",
1359                                 "version": "0.0.1"
1360                               },
1361                               "optional": false
1362                             }
1363                           },
1364                           {
1365                             "key": "a2",
1366                             "value": {
1367                               "key": "a2",
1368                               "fieldSchemaKey": {
1369                                 "name": "SimpleStringType",
1370                                 "version": "0.0.1"
1371                               },
1372                               "optional": false
1373                             }
1374                           },
1375                           {
1376                             "key": "a3",
1377                             "value": {
1378                               "key": "a3",
1379                               "fieldSchemaKey": {
1380                                 "name": "SimpleStringType",
1381                                 "version": "0.0.1"
1382                               },
1383                               "optional": false
1384                             }
1385                           },
1386                           {
1387                             "key": "a4",
1388                             "value": {
1389                               "key": "a4",
1390                               "fieldSchemaKey": {
1391                                 "name": "SimpleStringType",
1392                                 "version": "0.0.1"
1393                               },
1394                               "optional": false
1395                             }
1396                           },
1397                           {
1398                             "key": "a5",
1399                             "value": {
1400                               "key": "a5",
1401                               "fieldSchemaKey": {
1402                                 "name": "SimpleStringType",
1403                                 "version": "0.0.1"
1404                               },
1405                               "optional": false
1406                             }
1407                           },
1408                           {
1409                             "key": "a6",
1410                             "value": {
1411                               "key": "a6",
1412                               "fieldSchemaKey": {
1413                                 "name": "SimpleStringType",
1414                                 "version": "0.0.1"
1415                               },
1416                               "optional": false
1417                             }
1418                           }
1419                         ]
1420                       },
1421                       "toscaPolicyState": ""
1422                     }
1423                   },
1424                   {
1425                     "key": {
1426                       "name": "DecisionEvent",
1427                       "version": "0.0.1"
1428                     },
1429                     "value": {
1430                       "key": {
1431                         "name": "DecisionEvent",
1432                         "version": "0.0.1"
1433                       },
1434                       "nameSpace": "org.onap.policy.apex.domains.decisionmaker",
1435                       "source": "DCAE",
1436                       "target": "apex",
1437                       "parameter": {
1438                         "entry": [
1439                           {
1440                             "key": "decision",
1441                             "value": {
1442                               "key": "decision",
1443                               "fieldSchemaKey": {
1444                                 "name": "SimpleStringType",
1445                                 "version": "0.0.1"
1446                               },
1447                               "optional": false
1448                             }
1449                           }
1450                         ]
1451                       },
1452                       "toscaPolicyState": ""
1453                     }
1454                   },
1455                   {
1456                     "key": {
1457                       "name": "MakeDecisionEvent",
1458                       "version": "0.0.1"
1459                     },
1460                     "value": {
1461                       "key": {
1462                         "name": "MakeDecisionEvent",
1463                         "version": "0.0.1"
1464                       },
1465                       "nameSpace": "org.onap.policy.apex.domains.decisionmaker",
1466                       "source": "DCAE",
1467                       "target": "apex",
1468                       "parameter": {
1469                         "entry": [
1470                           {
1471                             "key": "mode",
1472                             "value": {
1473                               "key": "mode",
1474                               "fieldSchemaKey": {
1475                                 "name": "SimpleStringType",
1476                                 "version": "0.0.1"
1477                               },
1478                               "optional": false
1479                             }
1480                           }
1481                         ]
1482                       },
1483                       "toscaPolicyState": ""
1484                     }
1485                   }
1486                 ]
1487               }
1488             },
1489             "albums": {
1490               "key": {
1491                 "name": "DecisionMakerPolicyModel_Albums",
1492                 "version": "0.0.1"
1493               },
1494               "albums": {
1495                 "entry": [
1496                   {
1497                     "key": {
1498                       "name": "AnswerAlbum",
1499                       "version": "0.0.1"
1500                     },
1501                     "value": {
1502                       "key": {
1503                         "name": "AnswerAlbum",
1504                         "version": "0.0.1"
1505                       },
1506                       "scope": "policy",
1507                       "isWritable": true,
1508                       "itemSchema": {
1509                         "name": "SimpleStringType",
1510                         "version": "0.0.1"
1511                       }
1512                     }
1513                   },
1514                   {
1515                     "key": {
1516                       "name": "LastAnswerAlbum",
1517                       "version": "0.0.1"
1518                     },
1519                     "value": {
1520                       "key": {
1521                         "name": "LastAnswerAlbum",
1522                         "version": "0.0.1"
1523                       },
1524                       "scope": "policy",
1525                       "isWritable": true,
1526                       "itemSchema": {
1527                         "name": "SimpleIntegerType",
1528                         "version": "0.0.1"
1529                       }
1530                     }
1531                   }
1532                 ]
1533               }
1534             },
1535             "schemas": {
1536               "key": {
1537                 "name": "DecisionMakerPolicyModel_Schemas",
1538                 "version": "0.0.1"
1539               },
1540               "schemas": {
1541                 "entry": [
1542                   {
1543                     "key": {
1544                       "name": "SimpleIntegerType",
1545                       "version": "0.0.1"
1546                     },
1547                     "value": {
1548                       "key": {
1549                         "name": "SimpleIntegerType",
1550                         "version": "0.0.1"
1551                       },
1552                       "schemaFlavour": "Java",
1553                       "schemaDefinition": "java.lang.Integer"
1554                     }
1555                   },
1556                   {
1557                     "key": {
1558                       "name": "SimpleStringType",
1559                       "version": "0.0.1"
1560                     },
1561                     "value": {
1562                       "key": {
1563                         "name": "SimpleStringType",
1564                         "version": "0.0.1"
1565                       },
1566                       "schemaFlavour": "Java",
1567                       "schemaDefinition": "java.lang.String"
1568                     }
1569                   }
1570                 ]
1571               }
1572             }
1573           }
1574         }
1575       }
1576     }
1577   }
1578 }