[
    {
        "id": "eafcb830.49a558",
        "type": "method",
        "name": "method vnf-topology-operation-vpn-site-resource-delete",
        "xml": "<method rpc='vnf-topology-operation-vpn-site-resource-delete' mode='sync'>\n",
        "comments": "",
        "outputs": 1,
        "x": 207,
        "y": 214,
        "z": "db08cdbb.446ef",
        "wires": [
            [
                "d02b15b4.dd4488"
            ]
        ]
    },
    {
        "id": "d0a64a79.788248",
        "type": "dgstart",
        "name": "DGSTART",
        "outputs": 1,
        "x": 151.57138061523438,
        "y": 38,
        "z": "db08cdbb.446ef",
        "wires": [
            [
                "188a7052.71591"
            ]
        ]
    },
    {
        "id": "188a7052.71591",
        "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": 226.85708618164062,
        "y": 78.23811149597168,
        "z": "db08cdbb.446ef",
        "wires": [
            [
                "eafcb830.49a558"
            ]
        ]
    },
    {
        "id": "c2640aa8.7edda8",
        "type": "comment",
        "name": "site-vnf-topology-operation-delete",
        "info": "",
        "comments": "",
        "x": 600.9162979125977,
        "y": 111.58639907836914,
        "z": "db08cdbb.446ef",
        "wires": []
    },
    {
        "id": "d02b15b4.dd4488",
        "type": "block",
        "name": "block : atomic",
        "xml": "<block atomic=\"true\">",
        "atomic": "true",
        "outputs": 1,
        "x": 228.23804473876953,
        "y": 339.6666717529297,
        "z": "db08cdbb.446ef",
        "wires": [
            [
                "ac2e49a1.5e8568",
                "4d83bd7.fa4f844",
                "8cb0635e.d8e2c",
                "faf06bed.cf0a38",
                "c3cf9f4.9560f6",
                "5c51b14f.3f60b",
                "84b98584.0b5d68",
                "64b20017.f4e26",
                "c1ccb47b.c48ef8",
                "dfa19665.762578",
                "f3ab3fd1.f188e"
            ]
        ]
    },
    {
        "id": "faf06bed.cf0a38",
        "type": "switchNode",
        "name": "switch service-data.vnfs.vnf_length",
        "xml": "<switch test='`$service-data.vnfs.vnf_length`'>\n",
        "comments": "",
        "outputs": 1,
        "x": 689.6660842895508,
        "y": 273.26117038726807,
        "z": "db08cdbb.446ef",
        "wires": [
            [
                "7bb61b60.8ccfe4",
                "6a78f7f6.d96ae8"
            ]
        ]
    },
    {
        "id": "7bb61b60.8ccfe4",
        "type": "other",
        "name": "outcome Null",
        "xml": "<outcome value=''>\n",
        "comments": "",
        "outputs": 1,
        "x": 954.3883972167969,
        "y": 255.81679248809814,
        "z": "db08cdbb.446ef",
        "wires": [
            [
                "ded5f144.4823a"
            ]
        ]
    },
    {
        "id": "ded5f144.4823a",
        "type": "returnFailure",
        "name": "return failure",
        "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data\" />\n",
        "comments": "",
        "x": 1135.3882675170898,
        "y": 250.81667041778564,
        "z": "db08cdbb.446ef",
        "wires": []
    },
    {
        "id": "6a78f7f6.d96ae8",
        "type": "other",
        "name": "other",
        "xml": "<outcome value='Other'>\n",
        "comments": "",
        "outputs": 1,
        "x": 939.8883972167969,
        "y": 307.8167552947998,
        "z": "db08cdbb.446ef",
        "wires": [
            [
                "4b9e2f73.508cd"
            ]
        ]
    },
    {
        "id": "4b9e2f73.508cd",
        "type": "block",
        "name": "block : atomic",
        "xml": "<block atomic=\"true\">",
        "atomic": "true",
        "outputs": 1,
        "x": 1111.8881034851074,
        "y": 307.8167533874512,
        "z": "db08cdbb.446ef",
        "wires": [
            [
                "247799a9.6130f6",
                "84b938cb.78bee8"
            ]
        ]
    },
    {
        "id": "84b938cb.78bee8",
        "type": "switchNode",
        "name": "switch tmp.nidx ",
        "xml": "<switch test=\"`$tmp.nidx`\">\n\n",
        "comments": "",
        "outputs": 1,
        "x": 1286.8882751464844,
        "y": 326.8166751861572,
        "z": "db08cdbb.446ef",
        "wires": [
            [
                "7a17688b.c98ab8"
            ]
        ]
    },
    {
        "id": "8cb0635e.d8e2c",
        "type": "switchNode",
        "name": "switch vnf-level-oper-status",
        "xml": "<switch test='`$service-data.vnfs.vnf[$tmp.nidx].vnf-data.vnf-level-oper-status.order-status`'>\n",
        "comments": "",
        "outputs": 1,
        "x": 660.0550842285156,
        "y": 347.70563411712646,
        "z": "db08cdbb.446ef",
        "wires": [
            [
                "6f0effe.88561",
                "4d0008ab.c847c8"
            ]
        ]
    },
    {
        "id": "6f0effe.88561",
        "type": "outcome",
        "name": "outcome PendingDelete",
        "xml": "<outcome value='PendingDelete'>\n",
        "comments": "",
        "outputs": 1,
        "x": 936.888427734375,
        "y": 350.8167338371277,
        "z": "db08cdbb.446ef",
        "wires": [
            [
                "1d4d444b.bf117c"
            ]
        ]
    },
    {
        "id": "4d0008ab.c847c8",
        "type": "other",
        "name": "other",
        "xml": "<outcome value='Other'>\n",
        "comments": "",
        "outputs": 1,
        "x": 897.8884124755859,
        "y": 396.816782951355,
        "z": "db08cdbb.446ef",
        "wires": [
            [
                "640a50b6.3e86d"
            ]
        ]
    },
    {
        "id": "640a50b6.3e86d",
        "type": "returnFailure",
        "name": "return failure",
        "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"`'VNF is not in appropriate state for activate. Current state is ' + $service-data.vnfs.vnf[$tmp.nidx].vnf-data.vnf-level-oper-status.order-status`\" />",
        "comments": "",
        "x": 1046.388126373291,
        "y": 395.81676292419434,
        "z": "db08cdbb.446ef",
        "wires": []
    },
    {
        "id": "c3cf9f4.9560f6",
        "type": "switchNode",
        "name": "switch vnf-id",
        "xml": "<switch test=\"`$vnf-topology-operation-input.vnf-information.vnf-id`\">\n",
        "comments": "",
        "outputs": 1,
        "x": 625.8884010314941,
        "y": 228.81676387786865,
        "z": "db08cdbb.446ef",
        "wires": [
            [
                "6f94c17f.e94a6"
            ]
        ]
    },
    {
        "id": "6f94c17f.e94a6",
        "type": "outcome",
        "name": "NULL",
        "xml": "<outcome value=''>",
        "comments": "",
        "outputs": 1,
        "x": 823.8884658813477,
        "y": 218.81677627563477,
        "z": "db08cdbb.446ef",
        "wires": [
            [
                "723f2fa7.6d1e3"
            ]
        ]
    },
    {
        "id": "723f2fa7.6d1e3",
        "type": "returnFailure",
        "name": "return failure",
        "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"vnf-request-input.vnf-input-parameters.name is a required input\" />\n",
        "comments": "",
        "x": 990.3883514404297,
        "y": 215.81677055358887,
        "z": "db08cdbb.446ef",
        "wires": []
    },
    {
        "id": "5c51b14f.3f60b",
        "type": "execute",
        "name": "execute requiredParameters",
        "xml": "<execute plugin='org.onap.ccsdk.sli.core.slipluginutils.SliPluginUtils' method='requiredParameters' >\n<parameter name=\"vnf-topology-operation-input.vnf-information.vnf-id\" value=\"$vnf-topology-operation-input.vnf-information.vnf-id\"/>\n\n",
        "comments": "",
        "outputs": 1,
        "x": 683.3884582519531,
        "y": 168.81676292419434,
        "z": "db08cdbb.446ef",
        "wires": [
            []
        ]
    },
    {
        "id": "247799a9.6130f6",
        "type": "for",
        "name": "for nidx..service-data.vnfs.vnf[]",
        "xml": "<for index='nidx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
        "comments": "",
        "outputs": 1,
        "x": 1347.3882789611816,
        "y": 262.81667137145996,
        "z": "db08cdbb.446ef",
        "wires": [
            [
                "b01b8e2f.7dbb9"
            ]
        ]
    },
    {
        "id": "b01b8e2f.7dbb9",
        "type": "switchNode",
        "name": "switch vnf-id found",
        "xml": "<switch test=\"`$service-data.vnfs.vnf[$nidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`\">\n\n",
        "comments": "",
        "outputs": 1,
        "x": 1603.388298034668,
        "y": 262.81667137145996,
        "z": "db08cdbb.446ef",
        "wires": [
            [
                "357169.84af7e98"
            ]
        ]
    },
    {
        "id": "357169.84af7e98",
        "type": "outcomeTrue",
        "name": "true",
        "xml": "<outcome value='true'>\n",
        "comments": "",
        "outputs": 1,
        "x": 1779.8883514404297,
        "y": 265.81667137145996,
        "z": "db08cdbb.446ef",
        "wires": [
            [
                "38f16832.2c5d68"
            ]
        ]
    },
    {
        "id": "38f16832.2c5d68",
        "type": "set",
        "name": "set tmp.nidx and ctx.vnf-data",
        "xml": "<set>\n<parameter name='tmp.nidx' value='`$nidx`' />\n<parameter name='ctx.vnf-data.' value='`$service-data.vnfs.vnf[$nidx].vnf-data.`' />\n",
        "comments": "",
        "x": 1946.8883666992188,
        "y": 326.81667137145996,
        "z": "db08cdbb.446ef",
        "wires": []
    },
    {
        "id": "fc674990.6f1398",
        "type": "returnFailure",
        "name": "return failure",
        "xml": "<return status='failure'>\n\t<parameter name='ack-final' value='Y'/>\n\t<parameter name=\"error-code\" value=\"500\" />\n    <parameter name=\"error-message\" value=\"vnf-topology-operation-input.vnf-request-input.vnf-id not found in service-data\" />\n",
        "comments": "",
        "x": 1592.3882904052734,
        "y": 326.8166751861572,
        "z": "db08cdbb.446ef",
        "wires": []
    },
    {
        "id": "7a17688b.c98ab8",
        "type": "outcome",
        "name": "NULL",
        "xml": "<outcome value=''>\n",
        "comments": "",
        "outputs": 1,
        "x": 1454.8882904052734,
        "y": 326.8166751861572,
        "z": "db08cdbb.446ef",
        "wires": [
            [
                "fc674990.6f1398"
            ]
        ]
    },
    {
        "id": "ac2e49a1.5e8568",
        "type": "set",
        "name": "set vnfId and vnf-object-path",
        "xml": "<set>\n<parameter name='vnfId' value='`$vnf-topology-operation-input.vnf-information.vnf-id`' />\n<parameter name='vnf-object-path' value=\"`'restconf/config/GENERIC-RESOURCE-API:services/service/'\n + $vnf-topology-operation-input.service-information.service-instance-id\n + '/service-data/service-topology/'` \" />",
        "comments": "",
        "x": 646.9051055908203,
        "y": 562.333676815033,
        "z": "db08cdbb.446ef",
        "wires": []
    },
    {
        "id": "4d83bd7.fa4f844",
        "type": "returnSuccess",
        "name": "return success",
        "xml": "<return status='success'>\n<parameter name=\"ack-final-indicator\" value=\"Y\" />\n<parameter name=\"error-code\" value=\"200\" />\n<parameter name=\"error-message\" value=\"`$error-message`\" />\n",
        "comments": "",
        "x": 603.0162582397461,
        "y": 639.8892359733582,
        "z": "db08cdbb.446ef",
        "wires": []
    },
    {
        "id": "1d4d444b.bf117c",
        "type": "block",
        "name": "block : atomic",
        "xml": "<block atomic=\"true\">",
        "atomic": "true",
        "outputs": 1,
        "x": 1132.1947860717773,
        "y": 358.141939163208,
        "z": "db08cdbb.446ef",
        "wires": [
            []
        ]
    },
    {
        "id": "84b98584.0b5d68",
        "type": "set",
        "name": "set prop.vnfNewidx",
        "xml": "<set>\n<parameter name='prop.vnfidxLen' value='`0`' />\n",
        "comments": "",
        "x": 629.0000762939453,
        "y": 398.00006914138794,
        "z": "db08cdbb.446ef",
        "wires": []
    },
    {
        "id": "64b20017.f4e26",
        "type": "for",
        "name": "for lidx..service-data.vnfs.vnf[]",
        "xml": "<for index='lidx' start='0' end='`$service-data.vnfs.vnf_length`' >\n",
        "comments": "",
        "outputs": 1,
        "x": 653.0000610351562,
        "y": 440.00006771087646,
        "z": "db08cdbb.446ef",
        "wires": [
            [
                "ac122a7c.345458"
            ]
        ]
    },
    {
        "id": "ac122a7c.345458",
        "type": "block",
        "name": "block : atomic",
        "xml": "<block atomic=\"true\">",
        "atomic": "true",
        "outputs": 1,
        "x": 914.0001373291016,
        "y": 444.000102519989,
        "z": "db08cdbb.446ef",
        "wires": [
            [
                "7381e65e.fc3b68"
            ]
        ]
    },
    {
        "id": "7381e65e.fc3b68",
        "type": "switchNode",
        "name": "switch vnf-id found",
        "xml": "<switch test=\"`$service-data.vnfs.vnf[$lidx].vnf-id == $vnf-topology-operation-input.vnf-information.vnf-id`\">\n\n",
        "comments": "",
        "outputs": 1,
        "x": 1106.0000839233398,
        "y": 453.0001468658447,
        "z": "db08cdbb.446ef",
        "wires": [
            [
                "61719a57.800f34"
            ]
        ]
    },
    {
        "id": "61719a57.800f34",
        "type": "outcomeFalse",
        "name": "false",
        "xml": "<outcome value='false'>\n",
        "comments": "",
        "outputs": 1,
        "x": 1292.000099182129,
        "y": 437.0000333786011,
        "z": "db08cdbb.446ef",
        "wires": [
            [
                "9df0dc24.7346c"
            ]
        ]
    },
    {
        "id": "9df0dc24.7346c",
        "type": "block",
        "name": "block : atomic",
        "xml": "<block atomic=\"true\">",
        "atomic": "true",
        "outputs": 1,
        "x": 1443.0000228881836,
        "y": 438.0000696182251,
        "z": "db08cdbb.446ef",
        "wires": [
            [
                "c661d6a.46dd528",
                "142b6671.1e430a"
            ]
        ]
    },
    {
        "id": "c661d6a.46dd528",
        "type": "set",
        "name": "set  vnf data",
        "xml": "<set>\n<parameter name='service-data.vnfs.vnf[$prop.vnfidxLen].vnf-id' value='`$service-data.vnfs.vnf[$lidx].vnf-id`' />\n<parameter name='service-data.vnfs.vnf[$prop.vnfidxLen].vnf-data.' value='`$service-data.vnfs.vnf[$lidx].vnf-data.`' />\n",
        "comments": "",
        "x": 1610.0001907348633,
        "y": 412.000253200531,
        "z": "db08cdbb.446ef",
        "wires": []
    },
    {
        "id": "142b6671.1e430a",
        "type": "set",
        "name": "set prop.vnfNewidx",
        "xml": "<set>\n<parameter name='prop.vnfidxLen' value='`$prop.vnfidxLen + 1`' />\n",
        "comments": "",
        "x": 1630.0001182556152,
        "y": 469.00018882751465,
        "z": "db08cdbb.446ef",
        "wires": []
    },
    {
        "id": "c1ccb47b.c48ef8",
        "type": "set",
        "name": "set new vnf length",
        "xml": "<set>\n\t<parameter name=\"service-data.vnfs.vnf_length\" value='`$prop.vnfidxLen`'/>\n\n\t\n",
        "comments": "",
        "x": 621.1014747619629,
        "y": 483.80442094802856,
        "z": "db08cdbb.446ef",
        "wires": []
    },
    {
        "id": "dfa19665.762578",
        "type": "set",
        "name": "Remove vnf from ServiceData",
        "xml": "<set>\n\t<parameter name=\"service-data.vnfs.vnf[$prop.vnfidxLen].\" value=\"\"/>\n\n",
        "comments": "",
        "x": 651.000244140625,
        "y": 522.0002040863037,
        "z": "db08cdbb.446ef",
        "wires": []
    },
    {
        "id": "f3ab3fd1.f188e",
        "type": "save",
        "name": "delete AnAI - vnf-instance.orchestration-status",
        "xml": "<delete plugin=\"org.onap.ccsdk.sli.adaptors.aai.AAIService\" \n\tresource=\"generic-vnf\"   \n\t\tkey=\"generic-vnf.vnf-id = $vnfId\" >\n<parameter name=\"orchestration-status\" value=\"PendingDelete\" />\n<parameter name=\"vnf-type\" value=\"some vnf-type\" />\n",
        "comments": "",
        "outputs": 1,
        "x": 708.0066375732422,
        "y": 599.0106163024902,
        "z": "db08cdbb.446ef",
        "wires": [
            []
        ]
    }
]