aboutsummaryrefslogtreecommitdiffstats
path: root/platform-logic/generic-resource-api/src/main/json/GENERIC-RESOURCE-API_generate-unique-name.json
blob: 546f0ef67416173155ed57276bcafb7483ccf368 (plain)
1
[{"id":"5b6ea5fe.a10cec","type":"comment","name":"Validation of required data","info":"","comments":"","x":1040,"y":442.2946882247925,"z":"f1e12e88.dbd29","wires":[]},{"id":"93fd3d5a.38a48","type":"dgstart","name":"DGSTART","outputs":1,"x":110.75010299682617,"y":47.699371337890625,"z":"f1e12e88.dbd29","wires":[["aac966e5.94dc28"]]},{"id":"dc433da4.fccac","type":"method","name":"method generate-unique-name","xml":"<method rpc='generate-unique-name' mode='sync'>\n","comments":"","outputs":1,"x":243.66683197021484,"y":120.04460334777832,"z":"f1e12e88.dbd29","wires":[["60a7ef67.eff89"]]},{"id":"b889af43.15dcd","type":"comment","name":"generate-unique-name","info":"Input arguments:\ngenerate-unique-name-input.index-table-name - name of INDEX table\ngenerate-unique-name-input.index-table-prefix-column - name of prefix column in above table\ngenerate-unique-name-input.name-table-name - name of table holding all generated names\ngenerate-unique-name-input.index-length - non-null digit if index should be fixed length\n\nOutput arguments:\ngenerate-unique-name-output.generated-name - generated name (null if error)\ngenerate-unique-name-output.error-message - error message (non-null if error)\n","comments":"","x":798.3092651367188,"y":41.000000953674316,"z":"f1e12e88.dbd29","wires":[]},{"id":"a425a788.03f3d8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":527.7739067077637,"y":1433.4405617032733,"z":"f1e12e88.dbd29","wires":[["2a6cb077.ef737","f0dd32ba.66fbf","a9866d98.169d3","eed1508e.a01b2","5e02ffba.3acbd","84b01c6c.b12d8","ef001b85.7a6e68","6e4c2e50.7dca3","39fa9d31.ea2ad2","beeebf14.93926","7217aa55.91f204","706a513d.637ee"]]},{"id":"2a6cb077.ef737","type":"switchNode","name":"switch generate-unique-name-input.index-table-name","xml":"<switch test='`$generate-unique-name-input.index-table-name`'>\n","comments":"","outputs":1,"x":976.5833892822266,"y":487.9048261642456,"z":"f1e12e88.dbd29","wires":[["421c8ec.5e66a7"]]},{"id":"421c8ec.5e66a7","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1306.583309173584,"y":487.9048156738281,"z":"f1e12e88.dbd29","wires":[["92b6be8f.41af"]]},{"id":"92b6be8f.41af","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='generate-unique-name-output.error-message' value='generate-unique-name-input.index-table-name not supplied' />\n","comments":"","x":1479.9166297912598,"y":487.9048070907593,"z":"f1e12e88.dbd29","wires":[]},{"id":"f0dd32ba.66fbf","type":"switchNode","name":"switch generate-unique-name-input.index-table-prefix-column","xml":"<switch test='`$generate-unique-name-input.index-table-prefix-column`'>\n","comments":"","outputs":1,"x":1001.5833587646484,"y":531.2381620407104,"z":"f1e12e88.dbd29","wires":[["666567a9.3407d8"]]},{"id":"666567a9.3407d8","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1304.9166221618652,"y":531.2381410598755,"z":"f1e12e88.dbd29","wires":[["43b6f623.865d98"]]},{"id":"43b6f623.865d98","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='generate-unique-name-output.error-message' value='generate-unique-name-input.index-table-prefix-column not supplied' />\n","comments":"","x":1478.2499389648438,"y":531.5714845657349,"z":"f1e12e88.dbd29","wires":[]},{"id":"a9866d98.169d3","type":"switchNode","name":"switch generate-unique-name-input.name-table-type","xml":"<switch test='`$generate-unique-name-input.name-table-type`'>\n","comments":"","outputs":1,"x":972.583366394043,"y":576.2381544113159,"z":"f1e12e88.dbd29","wires":[["2ae7c50f.d2fd9a"]]},{"id":"2ae7c50f.d2fd9a","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1304.9165630340576,"y":576.2381639480591,"z":"f1e12e88.dbd29","wires":[["591f7d2b.9bf0f4"]]},{"id":"591f7d2b.9bf0f4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='generate-unique-name-output.error-message' value='generate-unique-name-input.name-table-type not supplied' />\n","comments":"","x":1476.583339691162,"y":576.5714673995972,"z":"f1e12e88.dbd29","wires":[]},{"id":"ef001b85.7a6e68","type":"get-resource","name":"get-resource current name index","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n  key=\"`$tmp.gun.sql`\" pfx='tmp.gun.prefixdb'>\n\n","comments":"","outputs":1,"x":894.6072196960449,"y":1135.0355415344238,"z":"f1e12e88.dbd29","wires":[["4eecf394.fb658c","f0e796cc.5e5b28","5ca0dae8.3c52d4"]]},{"id":"4eecf394.fb658c","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1122.2976512908936,"y":1221.0594511032104,"z":"f1e12e88.dbd29","wires":[["6d1e421b.6740ec"]]},{"id":"6d1e421b.6740ec","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n    <parameter name=\"generate-unique-name-output.error-message\" value=\"`'Error reading the ' + $generate-unique-name-input.index-table-name + ' table'`\" />\n","comments":"","x":1284.9167728424072,"y":1222.4881792068481,"z":"f1e12e88.dbd29","wires":[]},{"id":"957cb7c6.3113b8","type":"for","name":"for idx from current index to list-end","xml":"<for index='tmp.gun.idx' start='`$tmp.gun.index-number`' end='`$tmp.gun.list-end`' >\n","comments":"","outputs":1,"x":1049.4405784606934,"y":1463.8571519851685,"z":"f1e12e88.dbd29","wires":[["4f159cba.6ab794"]]},{"id":"eed1508e.a01b2","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":812.0595741271973,"y":1463.8571171079363,"z":"f1e12e88.dbd29","wires":[["957cb7c6.3113b8","6ea70a13.c40744","ebfd433a.e0d77"]]},{"id":"6ea70a13.c40744","type":"returnSuccess","name":"CATCH BREAK","xml":"<return status='success'>\n\n","comments":"","x":1005.2500746590749,"y":2488.2858543395996,"z":"f1e12e88.dbd29","wires":[]},{"id":"5e02ffba.3acbd","type":"switchNode","name":"switch generate-unique-name-input.prefix","xml":"<switch test='`$generate-unique-name-input.prefix`'>\n","comments":"","outputs":1,"x":938.2500076293945,"y":621.238133430481,"z":"f1e12e88.dbd29","wires":[["98c00727.25f188"]]},{"id":"98c00727.25f188","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1305.5831966400146,"y":621.2381582260132,"z":"f1e12e88.dbd29","wires":[["f5507926.67dac8"]]},{"id":"f5507926.67dac8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='generate-unique-name-output.error-message' value='generate-unique-name-input.prefix not supplied' />\n","comments":"","x":1478.2499732971191,"y":621.5714616775513,"z":"f1e12e88.dbd29","wires":[]},{"id":"84b01c6c.b12d8","type":"switchNode","name":"switch generate-unique-name-input.index-length","xml":"<switch test='`$generate-unique-name-input.index-length`'>\n","comments":"","outputs":1,"x":961.5833740234375,"y":756.2380752563477,"z":"f1e12e88.dbd29","wires":[["b01197c1.9f5b68","1668f0f4.b7049f","5c4f6407.833d3c","2511d7bc.5d4d38","bbae7527.125758","c6f1af5a.468da","6bb9091e.5be0b8"]]},{"id":"b01197c1.9f5b68","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1304.9166870117188,"y":664.5714616775513,"z":"f1e12e88.dbd29","wires":[["39b018b7.123508"]]},{"id":"bbae7527.125758","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1303.6785926818848,"y":939.8095893859863,"z":"f1e12e88.dbd29","wires":[["d11f9831.a4b3e8"]]},{"id":"1668f0f4.b7049f","type":"outcome","name":"1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1301.8214950561523,"y":755.2858009338379,"z":"f1e12e88.dbd29","wires":[["e8815a38.ebcec8"]]},{"id":"5c4f6407.833d3c","type":"outcome","name":"2","xml":"<outcome value='2'>\n","comments":"","outputs":1,"x":1301.8214797973633,"y":800.2857913970947,"z":"f1e12e88.dbd29","wires":[["b9e1aba2.d09518"]]},{"id":"2511d7bc.5d4d38","type":"outcome","name":"3","xml":"<outcome value='3'>\n","comments":"","outputs":1,"x":1300.1548156738281,"y":843.6191272735596,"z":"f1e12e88.dbd29","wires":[["e264801f.5501d"]]},{"id":"e8815a38.ebcec8","type":"set","name":"set list-end = 10","xml":"<set>\n<parameter name='tmp.gun.list-end' value='10' />\n","comments":"","x":1484.4882316589355,"y":755.2857894897461,"z":"f1e12e88.dbd29","wires":[]},{"id":"b9e1aba2.d09518","type":"set","name":"set list-end = 100","xml":"<set>\n<parameter name='tmp.gun.list-end' value='100' />\n","comments":"","x":1487.821460723877,"y":800.2857913970947,"z":"f1e12e88.dbd29","wires":[]},{"id":"e264801f.5501d","type":"set","name":"set list-end = 1000","xml":"<set>\n<parameter name='tmp.gun.list-end' value='1000' />\n","comments":"","x":1489.821460723877,"y":843.619104385376,"z":"f1e12e88.dbd29","wires":[]},{"id":"d11f9831.a4b3e8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='generate-unique-name-output.error-message' value='generate-unique-name-input.prefix not supplied' />\n","comments":"","x":1474.6785163879395,"y":939.1429595947266,"z":"f1e12e88.dbd29","wires":[]},{"id":"a70d8048.c5db1","type":"set","name":"set new index number to 1","xml":"<set>\n<parameter name='tmp.gun.index-number' value='1' />\n","comments":"","x":1988.7860374450684,"y":1184.428880929947,"z":"f1e12e88.dbd29","wires":[]},{"id":"39b018b7.123508","type":"set","name":"set list-end = 100000 (infinity basically)","xml":"<set>\n<parameter name='tmp.gun.list-end' value='100000' />\n","comments":"","x":1553.9166259765625,"y":664.9048051834106,"z":"f1e12e88.dbd29","wires":[]},{"id":"2842a52b.c3092a","type":"switchNode","name":"switch generate-unique-name-input.index-length","xml":"<switch test='`$generate-unique-name-input.index-length`'>\n","comments":"","outputs":1,"x":1611.1071586608887,"y":1390.5237907682147,"z":"f1e12e88.dbd29","wires":[["c819156a.3ce748","6f44c357.91b7ec","c092243f.d97f98","41dfeb65.32e554","f7fa28a8.8b0758"]]},{"id":"c819156a.3ce748","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1895.3929023742676,"y":1241.952398300171,"z":"f1e12e88.dbd29","wires":[["e2fc126.78e32f"]]},{"id":"6f44c357.91b7ec","type":"outcome","name":"1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":1893.7262496948242,"y":1286.9524383544922,"z":"f1e12e88.dbd29","wires":[["e2fc126.78e32f"]]},{"id":"c092243f.d97f98","type":"outcome","name":"2","xml":"<outcome value='2'>\n","comments":"","outputs":1,"x":1893.7262344360352,"y":1336.0000648498535,"z":"f1e12e88.dbd29","wires":[["b78d385e.819818"]]},{"id":"41dfeb65.32e554","type":"outcome","name":"3","xml":"<outcome value='3'>\n","comments":"","outputs":1,"x":1895.1549072265625,"y":1438.3811464309692,"z":"f1e12e88.dbd29","wires":[["864ddb73.e1c088"]]},{"id":"e2fc126.78e32f","type":"set","name":"set index-string to idx","xml":"<set>\n<parameter name='tmp.gun.index-string' value='`$tmp.gun.idx`' />\n","comments":"","x":2080.393051147461,"y":1260.2857418060303,"z":"f1e12e88.dbd29","wires":[]},{"id":"b78d385e.819818","type":"switchNode","name":"switch idx < 10","xml":"<switch test='`$tmp.gun.idx &lt; 10`'>\n","comments":"","outputs":1,"x":2060.392864227295,"y":1335.9999628067017,"z":"f1e12e88.dbd29","wires":[["58eb6760.799338","4c2137d1.5285d8"]]},{"id":"58eb6760.799338","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2222.059497833252,"y":1309.3333358764648,"z":"f1e12e88.dbd29","wires":[["7c64d513.d4933c"]]},{"id":"4c2137d1.5285d8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2222.059455871582,"y":1357.6666717529297,"z":"f1e12e88.dbd29","wires":[["664eaffa.40e23"]]},{"id":"7c64d513.d4933c","type":"set","name":"set index-string to '0' + idx","xml":"<set>\n<parameter name='tmp.gun.index-string' value=\"`'' + '0' + $tmp.gun.idx`\" />\n","comments":"","x":2413.7262573242188,"y":1308.6665630340576,"z":"f1e12e88.dbd29","wires":[]},{"id":"664eaffa.40e23","type":"set","name":"set index-string to idx","xml":"<set>\n<parameter name='tmp.gun.index-string' value='`$tmp.gun.idx`' />\n","comments":"","x":2397.0595092773438,"y":1357.3332786560059,"z":"f1e12e88.dbd29","wires":[]},{"id":"864ddb73.e1c088","type":"switchNode","name":"switch idx < 10","xml":"<switch test='`$tmp.gun.idx &lt; 10`'>\n","comments":"","outputs":1,"x":2063.4882431030273,"y":1436.714274406433,"z":"f1e12e88.dbd29","wires":[["9dacf730.7b2f88","52fac67f.9cafa8"]]},{"id":"9dacf730.7b2f88","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2223.4882202148438,"y":1410.0476522445679,"z":"f1e12e88.dbd29","wires":[["57d20365.2c02cc"]]},{"id":"52fac67f.9cafa8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2228.0118408203125,"y":1486.4762344360352,"z":"f1e12e88.dbd29","wires":[["c6f950ba.72e2f"]]},{"id":"57d20365.2c02cc","type":"set","name":"set index-string to '00' + idx","xml":"<set>\n<parameter name='tmp.gun.index-string' value=\"`'' + '00' + $tmp.gun.idx`\" />\n","comments":"","x":2418.488311767578,"y":1410.0475431169782,"z":"f1e12e88.dbd29","wires":[]},{"id":"c6f950ba.72e2f","type":"switchNode","name":"switch idx < 100","xml":"<switch test='`$tmp.gun.idx &lt; 100`'>\n","comments":"","outputs":1,"x":2384.3452224731445,"y":1484.8095951080322,"z":"f1e12e88.dbd29","wires":[["768ee20e.0df19c","ee684381.ae72b"]]},{"id":"768ee20e.0df19c","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2541.345199584961,"y":1458.142972946167,"z":"f1e12e88.dbd29","wires":[["dd903531.c82708"]]},{"id":"ee684381.ae72b","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2541.345157623291,"y":1506.4763088226318,"z":"f1e12e88.dbd29","wires":[["738812f4.25f07c"]]},{"id":"dd903531.c82708","type":"set","name":"set index-string to '0' + idx","xml":"<set>\n<parameter name='tmp.gun.index-string' value=\"`'' + '0' + $tmp.gun.idx`\" />\n","comments":"","x":2734.0119857788086,"y":1457.809627532959,"z":"f1e12e88.dbd29","wires":[]},{"id":"738812f4.25f07c","type":"set","name":"set index-string to idx","xml":"<set>\n<parameter name='tmp.gun.index-string' value='`$tmp.gun.idx`' />\n","comments":"","x":2718.0119705200195,"y":1506.142930984497,"z":"f1e12e88.dbd29","wires":[]},{"id":"e0bb12a5.d5624","type":"set","name":"set generated-name to prefix + index-string","xml":"<set>\n<parameter name='tmp.gun.generated-name' value='`$generate-unique-name-input.prefix + $tmp.gun.index-string`' />\n","comments":"","x":1595.107250213623,"y":1667.1904396329608,"z":"f1e12e88.dbd29","wires":[]},{"id":"9d1b9e26.d3c45","type":"comment","name":"First check from the current index to the max index","info":"","comments":"","x":1012.7739219665527,"y":1402.1905206952777,"z":"f1e12e88.dbd29","wires":[]},{"id":"bbf1440c.7b6b08","type":"comment","name":"check if we've used this name before","info":"","comments":"","x":1591.8217735290527,"y":1751.4765853881836,"z":"f1e12e88.dbd29","wires":[]},{"id":"b6303af3.dbe008","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1699.440574645996,"y":1828.8573679242816,"z":"f1e12e88.dbd29","wires":[["9e644b97.adba68"]]},{"id":"f763d5fa.3726b8","type":"set","name":"set generate-unique-name-output.error-message","xml":"<set>\n<parameter name='generate-unique-name-output.error-message' value=\"`'Error reading the GENERIC_RESOURCE_NAME table'`\" />\n","comments":"","x":2145.3928260803223,"y":1802.4287008558001,"z":"f1e12e88.dbd29","wires":[]},{"id":"ac21b4cf.7fce08","type":"returnFailure","name":"BREAK","xml":"<return status='failure'>\n","comments":"","x":2010.6310729980469,"y":1847.4287885938372,"z":"f1e12e88.dbd29","wires":[]},{"id":"d6d443c8.ce2b6","type":"returnFailure","name":"BREAK","xml":"<return status='failure'>\n","comments":"","x":2013.488094329834,"y":1942.33347933633,"z":"f1e12e88.dbd29","wires":[]},{"id":"2c035417.669d2c","type":"comment","name":"found one we can use","info":"","comments":"","x":1831.3455505371094,"y":1873.3814014707293,"z":"f1e12e88.dbd29","wires":[]},{"id":"6e4c2e50.7dca3","type":"switchNode","name":"switch generate-unique-name-output.error-message","xml":"<switch test='`$generate-unique-name-output.error-message`'>\n","comments":"","outputs":1,"x":887.3215468270437,"y":2700.2858333587646,"z":"f1e12e88.dbd29","wires":[["6d67de69.d407b","640c5685.806a28"]]},{"id":"6d67de69.d407b","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1160.6549551827566,"y":2673.6190853118896,"z":"f1e12e88.dbd29","wires":[["1274de2b.bc9e42"]]},{"id":"1274de2b.bc9e42","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1295.6549551827566,"y":2673.6190853118896,"z":"f1e12e88.dbd29","wires":[[]]},{"id":"640c5685.806a28","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1160.6549208504812,"y":2723.6191062927246,"z":"f1e12e88.dbd29","wires":[["39b9ac92.ad6b44"]]},{"id":"39b9ac92.ad6b44","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n","comments":"","x":1310.6549208504812,"y":2723.6191062927246,"z":"f1e12e88.dbd29","wires":[]},{"id":"39fa9d31.ea2ad2","type":"switchNode","name":"switch found-flag","xml":"<switch test='`$tmp.gun.found-flag`'>\n","comments":"","outputs":1,"x":779.3215926034109,"y":3054.5714559555054,"z":"f1e12e88.dbd29","wires":[["f6bec616.a81998","e00e3d85.de173"]]},{"id":"f6bec616.a81998","type":"outcome","name":"true","xml":"<outcome value='true'>","comments":"","outputs":1,"x":953.654932294573,"y":3054.5714569091797,"z":"f1e12e88.dbd29","wires":[["9254d2ea.79ae4"]]},{"id":"29e6035d.31b61c","type":"set","name":"set generate-unique-name-output.generated-name","xml":"<set>\n<parameter name='generate-unique-name-output.generated-name' value='`$tmp.gun.generated-name`' />\n","comments":"","x":1424.3215468270437,"y":2899.5717430114746,"z":"f1e12e88.dbd29","wires":[]},{"id":"33cdeff6.998bf","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n","comments":"","x":1306.369116101946,"y":3236.952537536621,"z":"f1e12e88.dbd29","wires":[]},{"id":"9254d2ea.79ae4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1105.3215620858327,"y":3053.9048709869385,"z":"f1e12e88.dbd29","wires":[["29e6035d.31b61c","f475b8d6.5aa468","9dac70dd.b9c4","33cdeff6.998bf","14acf8c4.4ea607"]]},{"id":"f1c7051f.090048","type":"set","name":"set index-exists flag to false","xml":"<set>\n<parameter name='tmp.gun.index-exists' value='false' />\n","comments":"","x":1456.5834312438965,"y":1101.8929462432861,"z":"f1e12e88.dbd29","wires":[]},{"id":"ac64bfb2.ceaee","type":"set","name":"set index-exists flag to true","xml":"<set>\n<parameter name='tmp.gun.index-exists' value='true' />\n","comments":"","x":1455.226375579834,"y":1005.8214721679688,"z":"f1e12e88.dbd29","wires":[]},{"id":"31a7d4ee.e0d5ec","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1261.9406471252441,"y":1027.250078201294,"z":"f1e12e88.dbd29","wires":[["ac64bfb2.ceaee","57b67a51.276aa4"]]},{"id":"f475b8d6.5aa468","type":"switchNode","name":"switch index-exists","xml":"<switch test='`$tmp.gun.index-exists`'>\n","comments":"","outputs":1,"x":1320.0835554940359,"y":3031.714744567871,"z":"f1e12e88.dbd29","wires":[["30ff52d9.46315e","803c3e83.57863"]]},{"id":"30ff52d9.46315e","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":1498.6549208504812,"y":3007.429012298584,"z":"f1e12e88.dbd29","wires":[["2442b85b.370aa8"]]},{"id":"803c3e83.57863","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":1498.6549361092702,"y":3054.571937561035,"z":"f1e12e88.dbd29","wires":[["6736e8b8.35f518"]]},{"id":"c73c710f.201a4","type":"save","name":"save (update) name index","xml":"<save plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n  key=\"`$tmp.gun.sql`\" pfx='pfx'>\n","comments":"","outputs":1,"x":1894.369245801653,"y":3008.85742855072,"z":"f1e12e88.dbd29","wires":[["ef34220f.bc074"]]},{"id":"c9a768e8.3720e8","type":"save","name":"save (insert) name index","xml":"<save plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n  key=\"`$tmp.gun.sql`\" pfx='pfx'>\n","comments":"","outputs":1,"x":1887.2262251717702,"y":3103.1428966522217,"z":"f1e12e88.dbd29","wires":[["176ae97.d993b17"]]},{"id":"ef34220f.bc074","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2087.2264464242116,"y":3008.8574476242065,"z":"f1e12e88.dbd29","wires":[["1b9917f.36c93e8"]]},{"id":"176ae97.d993b17","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2084.369016919817,"y":3101.714412689209,"z":"f1e12e88.dbd29","wires":[["24410c66.8ac314"]]},{"id":"9dac70dd.b9c4","type":"save","name":"save (insert) generated name","xml":"<save plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n  key=\"`$tmp.gun.sql`\" pfx='pfx'>\n","comments":"","outputs":1,"x":1354.512151990618,"y":3190.2857189178467,"z":"f1e12e88.dbd29","wires":[["c5598bb0.7e6e78"]]},{"id":"c5598bb0.7e6e78","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1564.512083326067,"y":3190.2857704162598,"z":"f1e12e88.dbd29","wires":[["dd091dc.0be3be"]]},{"id":"dd091dc.0be3be","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n    <parameter name=\"generate-unique-name-output.error-message\" value=\"Failed insert into GENERIC_RESOURCE_NAME table\" />\n","comments":"","x":1718.797899518694,"y":3190.285789489746,"z":"f1e12e88.dbd29","wires":[]},{"id":"beeebf14.93926","type":"set","name":"set sql statement","xml":"<set>\n<parameter name='tmp.gun.sql' value=\"`'SELECT * from ' + $generate-unique-name-input.index-table-name\n+ ' WHERE ' + $generate-unique-name-input.index-table-prefix-column + ' = '\n+ '$generate-unique-name-input.prefix'`\" />\n","comments":"","x":850.5120506286621,"y":985.8215715885162,"z":"f1e12e88.dbd29","wires":[]},{"id":"4f159cba.6ab794","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1291.583438873291,"y":1463.428631237575,"z":"f1e12e88.dbd29","wires":[["2842a52b.c3092a","e0bb12a5.d5624","d9d55bdd.8116a8","8992b5cf.163d88"]]},{"id":"9e644b97.adba68","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1851.8215713500977,"y":1828.3812870298113,"z":"f1e12e88.dbd29","wires":[["f763d5fa.3726b8","ac21b4cf.7fce08"]]},{"id":"2442b85b.370aa8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1675.9407332284109,"y":2984.5715408325195,"z":"f1e12e88.dbd29","wires":[["fcf6ad85.d78d3","c73c710f.201a4"]]},{"id":"6736e8b8.35f518","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1673.083586011614,"y":3080.285859107971,"z":"f1e12e88.dbd29","wires":[["c9a768e8.3720e8","eeade568.838b38"]]},{"id":"fcf6ad85.d78d3","type":"set","name":"set sql statement","xml":"<set>\n<parameter name='tmp.gun.sql' value=\"`'update ' + $generate-unique-name-input.index-table-name\n+ ' set index_number = ' + $tmp.gun.index-string + ' where '\n+ $generate-unique-name-input.index-table-prefix-column\n+ ' = $generate-unique-name-input.prefix'`\" />\n","comments":"","x":1864.5120146615163,"y":2960.285512447357,"z":"f1e12e88.dbd29","wires":[]},{"id":"eeade568.838b38","type":"set","name":"set sql statement","xml":"<set>\n<parameter name='tmp.gun.sql' value=\"`'insert into ' + $generate-unique-name-input.index-table-name\n+ '(' + $generate-unique-name-input.index-table-prefix-column + ', index_number) values ('\n+ ' $generate-unique-name-input.prefix , ' + $tmp.gun.index-string + ')'`\" />\n\n","comments":"","x":1863.0835631234304,"y":3054.5713291168213,"z":"f1e12e88.dbd29","wires":[]},{"id":"ddebf1f4.503c3","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1706.1073112487793,"y":1919.8097633634295,"z":"f1e12e88.dbd29","wires":[["aa402dd4.177b"]]},{"id":"b1f05088.d4abe","type":"for","name":"for idx from 1 to current index","xml":"<for index='tmp.gun.idx' start='1' end='`$tmp.gun.index-number`' >\n","comments":"","outputs":1,"x":1505.8931334359304,"y":3726.523895263672,"z":"f1e12e88.dbd29","wires":[["3bf64b64.93b004"]]},{"id":"a42cc5a7.7e7d28","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1292.2263799394877,"y":3726.523873874119,"z":"f1e12e88.dbd29","wires":[["b1f05088.d4abe","2e340f8e.08d25"]]},{"id":"2e340f8e.08d25","type":"returnSuccess","name":"CATCH BREAK","xml":"<return status='success'>\n\n","comments":"","x":1456.8455260140554,"y":4301.524025917053,"z":"f1e12e88.dbd29","wires":[]},{"id":"ea903bbb.dad038","type":"switchNode","name":"switch generate-unique-name-input.index-length","xml":"<switch test='`$generate-unique-name-input.index-length`'>\n","comments":"","outputs":1,"x":2053.559706006731,"y":3681.1906394958496,"z":"f1e12e88.dbd29","wires":[["d39dfe33.e52ee","15377217.566a0e","6fb57a2b.791e34","88754865.1e3488"]]},{"id":"d39dfe33.e52ee","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":2333.559706006731,"y":3611.190700531006,"z":"f1e12e88.dbd29","wires":[["e0fc2653.b5a9d8"]]},{"id":"15377217.566a0e","type":"outcome","name":"1","xml":"<outcome value='1'>\n","comments":"","outputs":1,"x":2331.893053327288,"y":3656.190740585327,"z":"f1e12e88.dbd29","wires":[["e0fc2653.b5a9d8"]]},{"id":"6fb57a2b.791e34","type":"outcome","name":"2","xml":"<outcome value='2'>\n","comments":"","outputs":1,"x":2331.893141065325,"y":3709.524087905884,"z":"f1e12e88.dbd29","wires":[["22683870.b1ed58"]]},{"id":"88754865.1e3488","type":"outcome","name":"3","xml":"<outcome value='3'>\n","comments":"","outputs":1,"x":2331.8930189950124,"y":3806.1908206939697,"z":"f1e12e88.dbd29","wires":[["9964319c.015b6"]]},{"id":"e0fc2653.b5a9d8","type":"set","name":"set index-string to idx","xml":"<set>\n<parameter name='tmp.gun.index-string' value='`$tmp.gun.idx`' />\n","comments":"","x":2518.5598547799245,"y":3629.5240440368652,"z":"f1e12e88.dbd29","wires":[]},{"id":"22683870.b1ed58","type":"switchNode","name":"switch idx < 10","xml":"<switch test='`$tmp.gun.idx &lt; 10`'>\n","comments":"","outputs":1,"x":2498.5597708565847,"y":3709.523985862732,"z":"f1e12e88.dbd29","wires":[["fd63838f.e7e9c","949bf879.77d3c8"]]},{"id":"fd63838f.e7e9c","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2660.2264044625417,"y":3682.857358932495,"z":"f1e12e88.dbd29","wires":[["be0b2546.58c728"]]},{"id":"949bf879.77d3c8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2660.226362500872,"y":3731.19069480896,"z":"f1e12e88.dbd29","wires":[["a160f12b.73d5"]]},{"id":"be0b2546.58c728","type":"set","name":"set index-string to '0' + idx","xml":"<set>\n<parameter name='tmp.gun.index-string' value=\"`'' + '0' + $tmp.gun.idx`\" />\n","comments":"","x":2851.8931639535085,"y":3682.190586090088,"z":"f1e12e88.dbd29","wires":[]},{"id":"a160f12b.73d5","type":"set","name":"set index-string to idx","xml":"<set>\n<parameter name='tmp.gun.index-string' value='`$tmp.gun.idx`' />\n","comments":"","x":2835.2264159066335,"y":3730.857301712036,"z":"f1e12e88.dbd29","wires":[]},{"id":"9964319c.015b6","type":"switchNode","name":"switch idx < 10","xml":"<switch test='`$tmp.gun.idx &lt; 10`'>\n","comments":"","outputs":1,"x":2500.2263548714773,"y":3804.5239486694336,"z":"f1e12e88.dbd29","wires":[["4c2de49a.6d4a3c","3d1cf51.768400a"]]},{"id":"4c2de49a.6d4a3c","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2660.2263319832937,"y":3777.8573265075684,"z":"f1e12e88.dbd29","wires":[["605de097.16c15"]]},{"id":"3d1cf51.768400a","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2661.8929884774343,"y":3852.8572845458984,"z":"f1e12e88.dbd29","wires":[["338224b6.d4dd2c"]]},{"id":"605de097.16c15","type":"set","name":"set index-string to '00' + idx","xml":"<set>\n<parameter name='tmp.gun.index-string' value=\"`'' + '00' + $tmp.gun.idx`\" />\n","comments":"","x":2855.2264159066335,"y":3777.857301712036,"z":"f1e12e88.dbd29","wires":[]},{"id":"338224b6.d4dd2c","type":"switchNode","name":"switch idx < 100","xml":"<switch test='`$tmp.gun.idx &lt; 100`'>\n","comments":"","outputs":1,"x":2818.2263701302663,"y":3851.1906452178955,"z":"f1e12e88.dbd29","wires":[["71f60fbd.93b51","8bf344e.ac152b8"]]},{"id":"71f60fbd.93b51","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2975.2263472420827,"y":3824.5240230560303,"z":"f1e12e88.dbd29","wires":[["2681091f.7b64f6"]]},{"id":"8bf344e.ac152b8","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2975.226305280413,"y":3872.857358932495,"z":"f1e12e88.dbd29","wires":[["ab9cdd55.a692d"]]},{"id":"2681091f.7b64f6","type":"set","name":"set index-string to '0' + idx","xml":"<set>\n<parameter name='tmp.gun.index-string' value=\"`'' + '0' + $tmp.gun.idx`\" />\n","comments":"","x":3167.8931334359304,"y":3824.1906776428223,"z":"f1e12e88.dbd29","wires":[]},{"id":"ab9cdd55.a692d","type":"set","name":"set index-string to idx","xml":"<set>\n<parameter name='tmp.gun.index-string' value='`$tmp.gun.idx`' />\n","comments":"","x":3151.8931181771413,"y":3872.5239810943604,"z":"f1e12e88.dbd29","wires":[]},{"id":"865573f6.c807c","type":"set","name":"set generated-name to prefix + index-string","xml":"<set>\n<parameter name='tmp.gun.generated-name' value='`$generate-unique-name-input.prefix + $tmp.gun.index-string`' />\n","comments":"","x":2051.559789930071,"y":3929.8572177886963,"z":"f1e12e88.dbd29","wires":[]},{"id":"e52e080b.7ba108","type":"comment","name":"Wrapping around - now check from 1 to the original index","info":"","comments":"","x":1483.2264540536062,"y":3656.0002098083496,"z":"f1e12e88.dbd29","wires":[]},{"id":"6fdc8a5e.f15724","type":"comment","name":"check if we've used this name before","info":"","comments":"","x":2038.2742369515554,"y":4044.857491493225,"z":"f1e12e88.dbd29","wires":[]},{"id":"443092d4.e835dc","type":"get-resource","name":"get-resource name","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n  key=\"`$tmp.gun.sql`\" pfx='tmp.gun.namedb'>\n\n","comments":"","outputs":1,"x":1975.8930533272878,"y":4185.571561404637,"z":"f1e12e88.dbd29","wires":[["16301a88.7ccc65","83a2d6cc.4538d8"]]},{"id":"16301a88.7ccc65","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2154.2264464242116,"y":4139.857398033142,"z":"f1e12e88.dbd29","wires":[["4bb524f1.7a834c"]]},{"id":"a294c827.4f7908","type":"set","name":"set generate-unique-name-output.error-message","xml":"<set>\n<parameter name='generate-unique-name-output.error-message' value=\"Error reading the GENERIC_RESOURCE_NAME table\" />\n","comments":"","x":2600.178697858538,"y":4113.428730964661,"z":"f1e12e88.dbd29","wires":[]},{"id":"8324bda6.96f7f","type":"returnFailure","name":"BREAK","xml":"<return status='failure'>\n","comments":"","x":2465.4169447762624,"y":4158.428818702698,"z":"f1e12e88.dbd29","wires":[]},{"id":"9d5efe94.83a7e","type":"switchNode","name":"switch generate-unique-name-output.error-message","xml":"<switch test='`$generate-unique-name-output.error-message`'>\n","comments":"","outputs":1,"x":1438.2740233285085,"y":4409.381101608276,"z":"f1e12e88.dbd29","wires":[["735742ed.b743cc","c5f4c315.ae27c"]]},{"id":"735742ed.b743cc","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1711.6074316842214,"y":4382.714353561401,"z":"f1e12e88.dbd29","wires":[["c08d106b.f3041"]]},{"id":"c08d106b.f3041","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1846.6074316842214,"y":4382.714353561401,"z":"f1e12e88.dbd29","wires":[[]]},{"id":"c5f4c315.ae27c","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1711.607397351946,"y":4432.714374542236,"z":"f1e12e88.dbd29","wires":[["784fd2e4.d424fc"]]},{"id":"784fd2e4.d424fc","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n","comments":"","x":1861.607397351946,"y":4432.714374542236,"z":"f1e12e88.dbd29","wires":[]},{"id":"22053b23.007ca4","type":"switchNode","name":"switch found-flag","xml":"<switch test='`$tmp.gun.found-flag`'>\n","comments":"","outputs":1,"x":1319.9883025033132,"y":4588.905010223389,"z":"f1e12e88.dbd29","wires":[["64dd1e57.0cf4b"]]},{"id":"58ee3c1e.25b284","type":"comment","name":"if db name is null we found an index we can use","info":"","comments":"","x":1486.7026427132741,"y":4538.428785324097,"z":"f1e12e88.dbd29","wires":[]},{"id":"64dd1e57.0cf4b","type":"outcome","name":"true","xml":"<outcome value='true'>","comments":"","outputs":1,"x":1479.321623120989,"y":4588.904967308044,"z":"f1e12e88.dbd29","wires":[["1e08c131.416c3f"]]},{"id":"e19c0e72.390b3","type":"set","name":"set generate-unique-name-output.generated-name","xml":"<set>\n<parameter name='generate-unique-name-output.generated-name' value='`$tmp.gun.generated-name`' />\n","comments":"","x":1954.9882872445241,"y":4537.238508224487,"z":"f1e12e88.dbd29","wires":[]},{"id":"da7a4cc6.7a4b7","type":"returnSuccess","name":"return success","xml":"<return status='success'>\n\n","comments":"","x":1838.4643385750906,"y":4876.047979354858,"z":"f1e12e88.dbd29","wires":[]},{"id":"1e08c131.416c3f","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1645.9883177621023,"y":4587.238185882568,"z":"f1e12e88.dbd29","wires":[["e19c0e72.390b3","530f53e4.b4631c","4a33679f.e661d8","da7a4cc6.7a4b7","ac52d5a5.4eeac8"]]},{"id":"530f53e4.b4631c","type":"switchNode","name":"switch index-exists","xml":"<switch test='`$tmp.gun.index-exists`'>\n","comments":"","outputs":1,"x":1850.7502959115163,"y":4669.381509780884,"z":"f1e12e88.dbd29","wires":[["894e0555.9183d8","f6d39e88.57e67"]]},{"id":"894e0555.9183d8","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2029.3216612679616,"y":4645.095777511597,"z":"f1e12e88.dbd29","wires":[["84dd83e3.603cb"]]},{"id":"f6d39e88.57e67","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2029.3216765267507,"y":4692.238702774048,"z":"f1e12e88.dbd29","wires":[["1881d83b.6c3b98"]]},{"id":"2701fa7a.652186","type":"save","name":"save (update) name index","xml":"<save plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n  key=\"`$tmp.gun.sql`\" pfx='pfx'>\n","comments":"","outputs":1,"x":2425.0359862191335,"y":4646.524193763733,"z":"f1e12e88.dbd29","wires":[["1772ebad.0bb7b4"]]},{"id":"25fb41f1.5f6a4e","type":"save","name":"save (insert) name index","xml":"<save plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n  key=\"`$tmp.gun.sql`\" pfx='pfx'>\n","comments":"","outputs":1,"x":2417.8929655892507,"y":4740.809661865234,"z":"f1e12e88.dbd29","wires":[["a9beb64.74fc348"]]},{"id":"1772ebad.0bb7b4","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2617.893186841692,"y":4646.524212837219,"z":"f1e12e88.dbd29","wires":[["73a12b01.342b54"]]},{"id":"73a12b01.342b54","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n    <parameter name=\"generate-unique-name-output.error-message\" value=\"`'Failed to update ' + $generate-unique-name-input.index-table-name + ' table'`\" />\n","comments":"","x":2772.179003034319,"y":4646.524231910706,"z":"f1e12e88.dbd29","wires":[]},{"id":"a9beb64.74fc348","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2615.0357573372976,"y":4739.381177902222,"z":"f1e12e88.dbd29","wires":[["e117c34b.1acb3"]]},{"id":"e117c34b.1acb3","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n    <parameter name=\"generate-unique-name-output.error-message\" value=\"`'Failed to insert record into ' + $generate-unique-name-input.index-table-name + ' table'`\" />\n","comments":"","x":2769.3215735299245,"y":4739.381196975708,"z":"f1e12e88.dbd29","wires":[]},{"id":"4a33679f.e661d8","type":"save","name":"save (insert) generated name","xml":"<save plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n  key=\"`$tmp.gun.sql`\" pfx='pfx'>\n","comments":"","outputs":1,"x":1885.1788924080984,"y":4827.952484130859,"z":"f1e12e88.dbd29","wires":[["e9db4101.94534"]]},{"id":"e9db4101.94534","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":2095.1788237435476,"y":4827.9525356292725,"z":"f1e12e88.dbd29","wires":[["6bf99d85.c468e4"]]},{"id":"6bf99d85.c468e4","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n    <parameter name=\"generate-unique-name-output.error-message\" value=\"Failed insert into GENERIC_RESOURCE_NAME table\" />\n","comments":"","x":2249.4646399361745,"y":4827.952554702759,"z":"f1e12e88.dbd29","wires":[]},{"id":"3bf64b64.93b004","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1748.035978589739,"y":3725.0954093933105,"z":"f1e12e88.dbd29","wires":[["ea903bbb.dad038","865573f6.c807c","443092d4.e835dc","1ee0add9.d02322","f046eae1.13e1a8"]]},{"id":"4bb524f1.7a834c","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2306.607443128313,"y":4139.381317138672,"z":"f1e12e88.dbd29","wires":[["a294c827.4f7908","8324bda6.96f7f"]]},{"id":"84dd83e3.603cb","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2206.6074736458913,"y":4622.238306045532,"z":"f1e12e88.dbd29","wires":[["a04f698c.bf35d8","2701fa7a.652186"]]},{"id":"1881d83b.6c3b98","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2203.7503264290945,"y":4717.952624320984,"z":"f1e12e88.dbd29","wires":[["25fb41f1.5f6a4e","7a06259f.cb1dac"]]},{"id":"a04f698c.bf35d8","type":"set","name":"set sql statement","xml":"<set>\n<parameter name='tmp.gun.sql' value=\"`'update ' + $generate-unique-name-input.index-table-name\n+ ' set index_number = ' + $tmp.gun.index-string + ' where '\n+ $generate-unique-name-input.index-table-prefix-column\n+ ' = $generate-unique-name-input.prefix'`\" />\n","comments":"","x":2395.178755078997,"y":4597.95227766037,"z":"f1e12e88.dbd29","wires":[]},{"id":"7a06259f.cb1dac","type":"set","name":"set sql statement","xml":"<set>\n<parameter name='tmp.gun.sql' value=\"`'insert into ' + $generate-unique-name-input.index-table-name\n+ '(' + $generate-unique-name-input.index-table-prefix-column + ', index_number) values ('\n+ ' $generate-unique-name-input.prefix , ' + $tmp.gun.index-string + ')'`\" />\n\n","comments":"","x":2393.750303540911,"y":4692.238094329834,"z":"f1e12e88.dbd29","wires":[]},{"id":"83a2d6cc.4538d8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":2160.893183026995,"y":4230.80979347229,"z":"f1e12e88.dbd29","wires":[["9212938c.255c4"]]},{"id":"1ee0add9.d02322","type":"set","name":"clear namedb.name","xml":"<set>\n<parameter name='tmp.gun.namedb.name' value='' />\n","comments":"","x":1976.607366834368,"y":3980.809726715088,"z":"f1e12e88.dbd29","wires":[]},{"id":"832af1c7.3004c","type":"switchNode","name":"switch generate-unique-name-input.index-length","xml":"<switch test='`$generate-unique-name-input.index-length`'>\n","comments":"","outputs":1,"x":1420.8930800301687,"y":3559.1906394958496,"z":"f1e12e88.dbd29","wires":[["c7e25132.ae6"]]},{"id":"c7e25132.ae6","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1676.607412610735,"y":3560.0955486297607,"z":"f1e12e88.dbd29","wires":[["203d7826.0538c8"]]},{"id":"203d7826.0538c8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n    <parameter name=\"generate-unique-name-output.error-message\" value=\"We have exhausted the naming index count\" />\n","comments":"","x":1833.7502959115163,"y":3560.0955486297607,"z":"f1e12e88.dbd29","wires":[]},{"id":"9ed8f268.5a5d6","type":"comment","name":"if we get here when there is no index length, then we have used up all 1000","info":"","comments":"","x":1552.3216765267507,"y":3515.809863090515,"z":"f1e12e88.dbd29","wires":[]},{"id":"41c5c579.61921c","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n    <parameter name=\"generate-unique-name-output.error-message\" value=\"We have exhausted the naming index count\" />\n","comments":"","x":1314.321710859026,"y":4989.095460891724,"z":"f1e12e88.dbd29","wires":[]},{"id":"7217aa55.91f204","type":"set","name":"set found-flag=false","xml":"<set>\n<parameter name='tmp.gun.found-flag' value='false' />\n","comments":"","x":856.2262992858887,"y":1279.0357704162598,"z":"f1e12e88.dbd29","wires":[]},{"id":"29714e04.6f3a92","type":"set","name":"set found-flag=true","xml":"<set>\n<parameter name='tmp.gun.found-flag' value='true' />\n","comments":"","x":2050.3930130004883,"y":1894.0953316007342,"z":"f1e12e88.dbd29","wires":[]},{"id":"aa402dd4.177b","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1857.5358352661133,"y":1920.2382759366717,"z":"f1e12e88.dbd29","wires":[["29714e04.6f3a92","d6d443c8.ce2b6"]]},{"id":"8d8bde9e.c8652","type":"returnFailure","name":"BREAK","xml":"<return status='failure'>\n","comments":"","x":2465.750162397112,"y":4251.952508926392,"z":"f1e12e88.dbd29","wires":[]},{"id":"ccf0e3fc.549a1","type":"comment","name":"found one we can use","info":"","comments":"","x":2283.6076186043874,"y":4183.000431060791,"z":"f1e12e88.dbd29","wires":[]},{"id":"970b46d4.d93098","type":"set","name":"set found-flag=true","xml":"<set>\n<parameter name='tmp.gun.found-flag' value='true' />\n","comments":"","x":2502.6550810677663,"y":4203.714361190796,"z":"f1e12e88.dbd29","wires":[]},{"id":"9212938c.255c4","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2309.7979033333913,"y":4229.857305526733,"z":"f1e12e88.dbd29","wires":[["970b46d4.d93098","8d8bde9e.c8652"]]},{"id":"f61bdd4.52b982","type":"switchNode","name":"switch generate-unique-name-input.supplied-name","xml":"<switch test='`$generate-unique-name-input.supplied-name`'>\n","comments":"","outputs":1,"x":410.5119285583496,"y":311.7143215451922,"z":"f1e12e88.dbd29","wires":[["c49ad7b9.5d3278","1aeafc45.343a74"]]},{"id":"c49ad7b9.5d3278","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":669.0834274291992,"y":338.85711710793635,"z":"f1e12e88.dbd29","wires":[["a425a788.03f3d8"]]},{"id":"1aeafc45.343a74","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":669.0834045410156,"y":280.7142872129168,"z":"f1e12e88.dbd29","wires":[["8624fc7e.b9621"]]},{"id":"9759df7c.13a96","type":"switchNode","name":"switch generate-unique-name-input.name-table-type","xml":"<switch test='`$generate-unique-name-input.name-table-type`'>\n","comments":"","outputs":1,"x":1138.3690757751465,"y":217.42856829507014,"z":"f1e12e88.dbd29","wires":[["23752f6f.cacc9"]]},{"id":"23752f6f.cacc9","type":"outcome","name":"NULL","xml":"<outcome value=''>","comments":"","outputs":1,"x":1471.7022724151611,"y":217.4285778318133,"z":"f1e12e88.dbd29","wires":[["2eec993e.ef0966"]]},{"id":"2eec993e.ef0966","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='generate-unique-name-output.error-message' value='generate-unique-name-input.name-table-type not supplied' />\n","comments":"","x":1643.3690490722656,"y":217.76188128335139,"z":"f1e12e88.dbd29","wires":[]},{"id":"8624fc7e.b9621","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":823.3691291809082,"y":280.28571741921564,"z":"f1e12e88.dbd29","wires":[["9759df7c.13a96","b91aa1fb.934b4","8acc2f04.bfefa"]]},{"id":"8acc2f04.bfefa","type":"get-resource","name":"get-resource name","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n  key=\"`$tmp.gun.sql`\" pfx='tmp.gun.namedb'>\n\n","comments":"","outputs":1,"x":1031.9405403137207,"y":310.2857326780047,"z":"f1e12e88.dbd29","wires":[["43898a84.7f7954","a18341a.51fc7c","ccbd4481.14d7b8"]]},{"id":"43898a84.7f7954","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1214.5595893859863,"y":297.42862837655207,"z":"f1e12e88.dbd29","wires":[["96fb3176.fb5ed"]]},{"id":"b91aa1fb.934b4","type":"set","name":"set sql statement","xml":"<set>\n<parameter name='tmp.gun.sql' value=\"`'SELECT * from GENERIC_RESOURCE_NAME WHERE type = $generate-unique-name-input.name-table-type'\n+ ' AND name = $generate-unique-name-input.supplied-name'`\" />\n","comments":"","x":1025.512092590332,"y":262.66675036294123,"z":"f1e12e88.dbd29","wires":[]},{"id":"a18341a.51fc7c","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1222.6549453735352,"y":342.66673891884943,"z":"f1e12e88.dbd29","wires":[["be7be542.3e0818"]]},{"id":"96fb3176.fb5ed","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='generate-unique-name-output.error-message' value=\"`'Error reading the ' + $generate-unique-name-input.name-table-index + ' table'`\" />\n\n","comments":"","x":1370.5120124816895,"y":297.00003378731867,"z":"f1e12e88.dbd29","wires":[]},{"id":"ccbd4481.14d7b8","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1214.7977142333984,"y":384.57143252236506,"z":"f1e12e88.dbd29","wires":[["e95ba061.e1905"]]},{"id":"e95ba061.e1905","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name='generate-unique-name-output.error-message' value=\"`'The name ' + $generate-unique-name-input.supplied-name + ' has already been used'`\" />\n\n","comments":"","x":1370.5119514465332,"y":383.99999659402033,"z":"f1e12e88.dbd29","wires":[]},{"id":"86bd22cb.352e7","type":"comment","name":"Caller supplied name - make sure it's not already used","info":"","comments":"","x":1065.5477447509766,"y":175.14285850524902,"z":"f1e12e88.dbd29","wires":[]},{"id":"be7be542.3e0818","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1371.9406394958496,"y":343.1428455625262,"z":"f1e12e88.dbd29","wires":[["d1938292.094a8","4ad7b9e3.bb3628"]]},{"id":"4ad7b9e3.bb3628","type":"save","name":"save (insert) generated name","xml":"<save plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n  key=\"`$tmp.gun.sql`\" pfx='pfx'>\n","comments":"","outputs":1,"x":1611.9406394958496,"y":367.42858164651057,"z":"f1e12e88.dbd29","wires":[["d2df8a47.916c58"]]},{"id":"d2df8a47.916c58","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1821.9405708312988,"y":367.42863314492365,"z":"f1e12e88.dbd29","wires":[["590cc59c.108cec"]]},{"id":"590cc59c.108cec","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n<parameter name=\"generate-unique-name-output.error-message\" value=\"Failed insert into GENERIC_RESOURCE_NAME table\" />\n","comments":"","x":1976.2263870239258,"y":367.42865221841,"z":"f1e12e88.dbd29","wires":[]},{"id":"d1938292.094a8","type":"set","name":"set sql statement","xml":"<set>\n<parameter name='tmp.gun.sql' value=\"`'insert into GENERIC_RESOURCE_NAME values ( '\n+ ' $generate-unique-name-input.name-table-type , $generate-unique-name-input.supplied-name , null , null, null )'`\" />\n\n","comments":"","x":1571.9405708312988,"y":317.4287590299334,"z":"f1e12e88.dbd29","wires":[]},{"id":"14acf8c4.4ea607","type":"set","name":"set sql statement","xml":"<set>\n<parameter name='tmp.gun.sql' \n\tvalue=\"`'insert into GENERIC_RESOURCE_NAME values ( $generate-unique-name-input.name-table-type , $tmp.gun.generated-name , $generate-unique-name-input.prefix , ' + $tmp.gun.index-string + ' , $tmp.gun.transient )'`\" />\n\n","comments":"","x":1315.9406111580984,"y":3143.8570795059204,"z":"f1e12e88.dbd29","wires":[]},{"id":"f046eae1.13e1a8","type":"set","name":"set sql statement","xml":"<set>\n<parameter name='tmp.gun.sql' value=\"`'SELECT * from GENERIC_RESOURCE_NAME WHERE type = $generate-unique-name-input.name-table-type'\n+ ' AND name = $tmp.gun.generated-name'`\" />\n","comments":"","x":1970.0359404427663,"y":4096.238283157349,"z":"f1e12e88.dbd29","wires":[]},{"id":"ac52d5a5.4eeac8","type":"set","name":"set sql statement","xml":"<set>\n<parameter name='tmp.gun.sql' \n\tvalue=\"`'insert into GENERIC_RESOURCE_NAME values ( $generate-unique-name-input.name-table-type , $tmp.gun.generated-name , $generate-unique-name-input.prefix , ' + $tmp.gun.index-string + ' , $tmp.gun.transient )'`\" />\n\n","comments":"","x":1845.7501356942312,"y":4780.523811340332,"z":"f1e12e88.dbd29","wires":[]},{"id":"1b9917f.36c93e8","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n    <parameter name=\"generate-unique-name-output.error-message\" value=\"`'Failed to update ' + $generate-unique-name-input.index-table-name + ' table'`\" />\n","comments":"","x":2238.797796521868,"y":3008.1427965164185,"z":"f1e12e88.dbd29","wires":[]},{"id":"24410c66.8ac314","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n    <parameter name=\"generate-unique-name-output.error-message\" value=\"`'Failed to insert record into ' + $generate-unique-name-input.index-table-name + ' table'`\" />\n","comments":"","x":2235.9404089791433,"y":3101.4285774230957,"z":"f1e12e88.dbd29","wires":[]},{"id":"e00e3d85.de173","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":957.8929388863698,"y":3418.857152938843,"z":"f1e12e88.dbd29","wires":[["ce5f3d64.bd4d6"]]},{"id":"ce5f3d64.bd4d6","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1108.7263472420827,"y":4030.5236768722534,"z":"f1e12e88.dbd29","wires":[["832af1c7.3004c","a42cc5a7.7e7d28","9d5efe94.83a7e","22053b23.007ca4","41c5c579.61921c","6a9c7774.522518"]]},{"id":"5ca0dae8.3c52d4","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1122.8692016601562,"y":1026.5357439517975,"z":"f1e12e88.dbd29","wires":[["31a7d4ee.e0d5ec"]]},{"id":"f0e796cc.5e5b28","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1129.4407196044922,"y":1133.1785907745361,"z":"f1e12e88.dbd29","wires":[["9bfd8f34.2ebbf"]]},{"id":"9bfd8f34.2ebbf","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1260.869270324707,"y":1132.6071968078613,"z":"f1e12e88.dbd29","wires":[["f1c7051f.090048","9d744b1.e34eeb8"]]},{"id":"8992b5cf.163d88","type":"set","name":"set sql statement","xml":"<set>\n<parameter name='tmp.gun.sql' value=\"`'SELECT * from GENERIC_RESOURCE_NAME WHERE type = $generate-unique-name-input.name-table-type'\n+ ' AND name = $tmp.gun.generated-name'`\" />\n","comments":"","x":1515.7144088745117,"y":1792.4285945892334,"z":"f1e12e88.dbd29","wires":[]},{"id":"d9d55bdd.8116a8","type":"get-resource","name":"get-resource name","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n  key=\"`$tmp.gun.sql`\" pfx='tmp.gun.namedb'>\n\n","comments":"","outputs":1,"x":1517.1430168151855,"y":1879.571517944336,"z":"f1e12e88.dbd29","wires":[["b6303af3.dbe008","ddebf1f4.503c3"]]},{"id":"60a7ef67.eff89","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":109.46438217163086,"y":286.0000047683716,"z":"f1e12e88.dbd29","wires":[["f61bdd4.52b982","b759fda7.dbd08"]]},{"id":"b759fda7.dbd08","type":"set","name":"clear variables","xml":"<set>\n<parameter name='generate-unique-name-output.error-message' value='' />\n<parameter name='generate-unique-name-output.generated-name' value='' />\n","comments":"","x":296.7858123779297,"y":263.8571434020996,"z":"f1e12e88.dbd29","wires":[]},{"id":"c6f1af5a.468da","type":"outcome","name":"0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":1301.8927192687988,"y":711.3571701049805,"z":"f1e12e88.dbd29","wires":[["cfd9fd80.ec344"]]},{"id":"cfd9fd80.ec344","type":"set","name":"set list-end = 0","xml":"<set>\n<parameter name='tmp.gun.list-end' value='0' />\n","comments":"","x":1491.5593643188477,"y":711.3571472167969,"z":"f1e12e88.dbd29","wires":[]},{"id":"ebfd433a.e0d77","type":"switchNode","name":"switch tmp.gun.noindex-flag","xml":"<switch test='`$tmp.gun.noindex-flag`'>\n","comments":"","outputs":1,"x":1066.3928358895437,"y":2075.000087738037,"z":"f1e12e88.dbd29","wires":[["498f27f9.e120c8"]]},{"id":"57b67a51.276aa4","type":"switchNode","name":"switch generate-unique-name-input.index-length","xml":"<switch test='`$generate-unique-name-input.index-length`'>\n","comments":"","outputs":1,"x":1522.6786460876465,"y":1051.4285888671875,"z":"f1e12e88.dbd29","wires":[["2cbac97b.4aa416","80e4c28.5603a4"]]},{"id":"2cbac97b.4aa416","type":"outcome","name":"0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":1788.9286460876465,"y":1079.6785907745361,"z":"f1e12e88.dbd29","wires":[["173615cc.d05fca"]]},{"id":"80e4c28.5603a4","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1790.4286422729492,"y":1019.6785888671875,"z":"f1e12e88.dbd29","wires":[["38120565.948afa"]]},{"id":"38120565.948afa","type":"set","name":"increment index number","xml":"<set>\n<parameter name='tmp.gun.index-number' value='`$tmp.gun.prefixdb.index-number + 1`' />\n","comments":"","x":1982.9286422729492,"y":1019.4285888671875,"z":"f1e12e88.dbd29","wires":[]},{"id":"e01c4063.09502","type":"set","name":"set  index number to 0","xml":"<set>\n<parameter name='tmp.gun.index-number' value='0' />\n","comments":"","x":2126.9288902282715,"y":1081.4285888671875,"z":"f1e12e88.dbd29","wires":[]},{"id":"9d744b1.e34eeb8","type":"switchNode","name":"switch generate-unique-name-input.index-length","xml":"<switch test='`$generate-unique-name-input.index-length`'>\n","comments":"","outputs":1,"x":1520.1786460876465,"y":1162.4285907745361,"z":"f1e12e88.dbd29","wires":[["5d9c7805.26da48","6787684c.f60838"]]},{"id":"6787684c.f60838","type":"other","name":"other","xml":"<outcome value='Other'>\n","comments":"","outputs":1,"x":1790.1786422729492,"y":1184.4285907745361,"z":"f1e12e88.dbd29","wires":[["a70d8048.c5db1"]]},{"id":"5d9c7805.26da48","type":"outcome","name":"0","xml":"<outcome value='0'>\n","comments":"","outputs":1,"x":1790.1786651611328,"y":1128.178546667099,"z":"f1e12e88.dbd29","wires":[["173615cc.d05fca"]]},{"id":"173615cc.d05fca","type":"block","name":"block","xml":"<block>\n","atomic":"false","comments":"","outputs":1,"x":1938.928638458252,"y":1106.9285888671875,"z":"f1e12e88.dbd29","wires":[["e01c4063.09502","5a7b56b9.1a2218"]]},{"id":"5a7b56b9.1a2218","type":"set","name":"set noindex-flag=true","xml":"<set>\n<parameter name='tmp.gun.noindex-flag' value='true' />\n","comments":"","x":2126.428607940674,"y":1130.4285736083984,"z":"f1e12e88.dbd29","wires":[]},{"id":"a6319eb9.a478a","type":"set","name":"set generated-name to prefix","xml":"<set>\n<parameter name='tmp.gun.generated-name' value='`$generate-unique-name-input.prefix`' />\n","comments":"","x":1669.428686414446,"y":2126.4286251068115,"z":"f1e12e88.dbd29","wires":[]},{"id":"498f27f9.e120c8","type":"outcome","name":"true","xml":"<outcome value='true'>","comments":"","outputs":1,"x":1263.714372907366,"y":2075.0000705718994,"z":"f1e12e88.dbd29","wires":[["84f25abb.9b33c8"]]},{"id":"84f25abb.9b33c8","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1415.1427290780202,"y":2075.000192642212,"z":"f1e12e88.dbd29","wires":[["eeece4af.c0a578","46e6bbe6.b96de4","a6319eb9.a478a","895039d.ab466c8"]]},{"id":"46e6bbe6.b96de4","type":"set","name":"set sql statement","xml":"<set>\n<parameter name='tmp.gun.sql' value=\"`'SELECT * from GENERIC_RESOURCE_NAME WHERE type = $generate-unique-name-input.name-table-type'\n+ ' AND name = $tmp.gun.generated-name'`\" />\n","comments":"","x":1636.4167921883718,"y":2169.2860288619995,"z":"f1e12e88.dbd29","wires":[]},{"id":"eeece4af.c0a578","type":"get-resource","name":"get-resource name","xml":"<get-resource plugin='org.onap.ccsdk.sli.adaptors.resource.sql.SqlResource' resource='SQL'\n  key=\"`$tmp.gun.sql`\" pfx='tmp.gun.namedb'>\n\n","comments":"","outputs":1,"x":1643.1311858040945,"y":2213.4287099838257,"z":"f1e12e88.dbd29","wires":[["6b264088.c0c0f","f6389af4.2322a8","d39377b1.8101a8"]]},{"id":"6b264088.c0c0f","type":"failure","name":"failure","xml":"<outcome value='failure'>\n","comments":"","outputs":1,"x":1835.4287970406667,"y":2212.7145666394917,"z":"f1e12e88.dbd29","wires":[["b37543f9.81217"]]},{"id":"f6389af4.2322a8","type":"not-found","name":"not-found","xml":"<outcome value='not-found'>\n","comments":"","outputs":1,"x":1842.09553364345,"y":2303.6669620786397,"z":"f1e12e88.dbd29","wires":[["a344bbb4.7d2768"]]},{"id":"a344bbb4.7d2768","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":2024.9524617876323,"y":2303.095464706421,"z":"f1e12e88.dbd29","wires":[["4df3f5e0.14d1ec","c46e5537.98d148"]]},{"id":"c46e5537.98d148","type":"returnFailure","name":"BREAK","xml":"<return status='failure'>\n","comments":"","x":2180.904720851353,"y":2325.190668106079,"z":"f1e12e88.dbd29","wires":[]},{"id":"4df3f5e0.14d1ec","type":"set","name":"set found-flag=true","xml":"<set>\n<parameter name='tmp.gun.found-flag' value='true' />\n","comments":"","x":2217.8096395220073,"y":2276.9525203704834,"z":"f1e12e88.dbd29","wires":[]},{"id":"df613651.9951c8","type":"returnFailure","name":"BREAK","xml":"<return status='failure'>\n","comments":"","x":2146.6192953927175,"y":2231.2859873090474,"z":"f1e12e88.dbd29","wires":[]},{"id":"98632bf4.b7ffc8","type":"set","name":"set generate-unique-name-output.error-message","xml":"<set>\n<parameter name='generate-unique-name-output.error-message' value=\"`'Error reading the GENERIC_RESOURCE_NAME table'`\" />\n","comments":"","x":2281.381048474993,"y":2186.2858995710103,"z":"f1e12e88.dbd29","wires":[]},{"id":"b37543f9.81217","type":"block","name":"block : atomic","xml":"<block atomic=\"true\">","atomic":"true","outputs":1,"x":1987.8097937447683,"y":2212.2384857450215,"z":"f1e12e88.dbd29","wires":[["98632bf4.b7ffc8","df613651.9951c8"]]},{"id":"e550dd50.78cb9","type":"comment","name":"found one we can use","info":"","comments":"","x":1998.7621770586284,"y":2256.2385902404785,"z":"f1e12e88.dbd29","wires":[]},{"id":"8564972f.d7ac28","type":"comment","name":"NEW","info":"","comments":"","x":1195.7141478402273,"y":718.1428843906947,"z":"f1e12e88.dbd29","wires":[]},{"id":"1e004cfc.176c53","type":"comment","name":"NEW","info":"","comments":"","x":1065.1429557800293,"y":2040.7142515182495,"z":"f1e12e88.dbd29","wires":[]},{"id":"3ee36ab0.29b546","type":"comment","name":"NEW","info":"","comments":"","x":1665.7143363952637,"y":1018.142822265625,"z":"f1e12e88.dbd29","wires":[]},{"id":"d4074d8c.bfb16","type":"comment","name":"NEW","info":"","comments":"","x":1658.5715599060059,"y":1132.4285736083984,"z":"f1e12e88.dbd29","wires":[]},{"id":"895039d.ab466c8","type":"set","name":"set index-string to 0","xml":"<set>\n<parameter name='tmp.gun.index-string' value='0' />\n","comments":"","x":1653.7142393929616,"y":2075.285786628723,"z":"f1e12e88.dbd29","wires":[]},{"id":"6a9c7774.522518","type":"switchNode","name":"switch tmp.gun.noindex-flag","xml":"<switch test='`$tmp.gun.noindex-flag`'>\n","comments":"","outputs":1,"x":1357.1429579598562,"y":3442.2859592437744,"z":"f1e12e88.dbd29","wires":[["11834167.ca210f"]]},{"id":"11834167.ca210f","type":"outcome","name":"true","xml":"<outcome value='true'>","comments":"","outputs":1,"x":1562.8572371346609,"y":3442.2858657836914,"z":"f1e12e88.dbd29","wires":[["d2b73835.0ea468"]]},{"id":"d2b73835.0ea468","type":"returnFailure","name":"return failure","xml":"<return status='failure'>\n    <parameter name=\"generate-unique-name-output.error-message\" value=\"naming exhausted for input with index-length = 0\" />\n","comments":"","x":1727.1430800301687,"y":3440.8571434020996,"z":"f1e12e88.dbd29","wires":[]},{"id":"d39377b1.8101a8","type":"success","name":"success","xml":"<outcome value='success'>\n","comments":"","outputs":1,"x":1837.6072202410014,"y":2359.1427116394043,"z":"f1e12e88.dbd29","wires":[["a344bbb4.7d2768"]]},{"id":"6bb9091e.5be0b8","type":"outcome","name":"4","xml":"<outcome value='4'>\n","comments":"","outputs":1,"x":1301.428611755371,"y":892.4285907745361,"z":"f1e12e88.dbd29","wires":[["17a0d309.719f1d"]]},{"id":"17a0d309.719f1d","type":"set","name":"set list-end = 10000","xml":"<set>\n<parameter name='tmp.gun.list-end' value='10000' />\n","comments":"","x":1491.09525680542,"y":892.4285678863525,"z":"f1e12e88.dbd29","wires":[]},{"id":"f7fa28a8.8b0758","type":"outcome","name":"4","xml":"<outcome value='4'>\n","comments":"","outputs":1,"x":1885.7142295837402,"y":1605.28568649292,"z":"f1e12e88.dbd29","wires":[["d1b531f0.8a652"]]},{"id":"d1b531f0.8a652","type":"switchNode","name":"switch idx < 10","xml":"<switch test='`$tmp.gun.idx &lt; 10`'>\n","comments":"","outputs":1,"x":2054.047565460205,"y":1603.6188144683838,"z":"f1e12e88.dbd29","wires":[["af04c09f.28afb","c2c9d02e.99182"]]},{"id":"af04c09f.28afb","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2222.6188926696777,"y":1556.5236530303955,"z":"f1e12e88.dbd29","wires":[["8bcb9864.611948"]]},{"id":"c2c9d02e.99182","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2235.714199066162,"y":1681.9521503448486,"z":"f1e12e88.dbd29","wires":[["e3787088.01e29"]]},{"id":"706a513d.637ee","type":"set","name":"set noindex-flag=false","xml":"<set>\n<parameter name='tmp.gun.noindex-flag' value='false' />\n","comments":"","x":868.5714378356934,"y":895.2857322692871,"z":"f1e12e88.dbd29","wires":[]},{"id":"5ed13069.e993c","type":"set","name":"set index-string to '00' + idx","xml":"<set>\n<parameter name='tmp.gun.index-string' value=\"`'' + '00' + $tmp.gun.idx`\" />\n","comments":"","x":2778.571449279785,"y":1637.4285531725202,"z":"f1e12e88.dbd29","wires":[]},{"id":"967f183e.788928","type":"switchNode","name":"switch idx < 1000","xml":"<switch test='`$tmp.gun.idx &lt; 1000`'>\n","comments":"","outputs":1,"x":2741.5713958740234,"y":1716.761981010437,"z":"f1e12e88.dbd29","wires":[["655f0a60.0c9ae4","22ea7aed.7a52d6"]]},{"id":"655f0a60.0c9ae4","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2898.57137298584,"y":1690.0953588485718,"z":"f1e12e88.dbd29","wires":[["90b513ea.13f85"]]},{"id":"22ea7aed.7a52d6","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2898.57133102417,"y":1738.4286947250366,"z":"f1e12e88.dbd29","wires":[["549cf9ae.d15f78"]]},{"id":"90b513ea.13f85","type":"set","name":"set index-string to '0' + idx","xml":"<set>\n<parameter name='tmp.gun.index-string' value=\"`'' + '0' + $tmp.gun.idx`\" />\n","comments":"","x":3091.2381591796875,"y":1689.7620134353638,"z":"f1e12e88.dbd29","wires":[]},{"id":"549cf9ae.d15f78","type":"set","name":"set index-string to idx","xml":"<set>\n<parameter name='tmp.gun.index-string' value='`$tmp.gun.idx`' />\n","comments":"","x":3075.2381439208984,"y":1738.0953168869019,"z":"f1e12e88.dbd29","wires":[]},{"id":"8bcb9864.611948","type":"set","name":"set index-string to '000' + idx","xml":"<set>\n<parameter name='tmp.gun.index-string' value=\"`'' + '000' + $tmp.gun.idx`\" />\n","comments":"","x":2429.9999389648438,"y":1556.1429405212402,"z":"f1e12e88.dbd29","wires":[]},{"id":"e3787088.01e29","type":"switchNode","name":"switch idx < 100","xml":"<switch test='`$tmp.gun.idx &lt; 100`'>\n","comments":"","outputs":1,"x":2404.428535461426,"y":1681.90490763528,"z":"f1e12e88.dbd29","wires":[["f37b934d.d7ebd","9d6030ea.5eef2"]]},{"id":"f37b934d.d7ebd","type":"outcomeTrue","name":"true","xml":"<outcome value='true'>\n","comments":"","outputs":1,"x":2561.428512573242,"y":1637.2382854734149,"z":"f1e12e88.dbd29","wires":[["5ed13069.e993c"]]},{"id":"9d6030ea.5eef2","type":"outcomeFalse","name":"false","xml":"<outcome value='false'>\n","comments":"","outputs":1,"x":2561.4284706115723,"y":1717.5716213498797,"z":"f1e12e88.dbd29","wires":[["967f183e.788928"]]},{"id":"f51a568e.900f58","type":"comment","name":"Change History","info":"iTrack 10767\n- insert new column (index, prefix, info)\niTrack 11252\n- use tmp.gun.index-string as opposed to tmp.gun.idx as prefix for GENERIC_RESOURCE_NAME insert","comments":"","x":141.42860412597656,"y":422.42858505249023,"z":"f1e12e88.dbd29","wires":[]},{"id":"a3dd9b78.e64078","type":"comment","name":"iTrack 10767","info":"","comments":"","x":1444.285831451416,"y":3126.7143383026123,"z":"f1e12e88.dbd29","wires":[]},{"id":"54436640.a3b2b8","type":"set","name":"set tmp.gun.transient","xml":"<set>\n<parameter name='tmp.gun.transient' value='TRANSIENT' />\n","comments":"","x":789.9999694824219,"y":2800.9999918937683,"z":"f1e12e88.dbd29","wires":[]},{"id":"aac966e5.94dc28","type":"service-logic","name":"GENERIC-RESOURCE-API ${project.version}","module":"GENERIC-RESOURCE-API","version":"${project.version}","comments":"","xml":"<service-logic xmlns='http://www.onap.org/sdnc/svclogic' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.onap.org/sdnc/svclogic ./svclogic.xsd' module='GENERIC-RESOURCE-API' version='${project.version}'>","outputs":1,"x":398.66668701171875,"y":47.666669845581055,"z":"f1e12e88.dbd29","wires":[["dc433da4.fccac"]]}]