Sure. Can't just share a single flow, since this is a situation that occurs in combination of flow + subflow.
Snapshot 1 - steps:
- Create a subflow, add env variables A, B, C
- Use that subflow in a flow, set values to A, B, C
[
{
"id": "760dd5928d0a0761",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": "",
"env": []
},
{
"id": "5233ec6f57c1cbae",
"type": "subflow",
"name": "Subflow 1",
"info": "",
"category": "",
"in": [],
"out": [],
"env": [
{
"name": "A",
"type": "str",
"value": "a"
},
{
"name": "B",
"type": "str",
"value": "b"
},
{
"name": "C",
"type": "str",
"value": "c"
}
],
"meta": {},
"color": "#DDAA99"
},
{
"id": "fb62af5babb05f0b",
"type": "subflow:5233ec6f57c1cbae",
"z": "760dd5928d0a0761",
"name": "",
"env": [
{
"name": "A",
"value": "1",
"type": "str"
},
{
"name": "B",
"value": "2",
"type": "str"
},
{
"name": "C",
"value": "3",
"type": "str"
}
],
"x": 180,
"y": 100,
"wires": []
}
]
Snapshot 2 - steps:
4) Remove env variable C in subflow
5) Add env variable D in subflow
6) Set env variable D in calling flow
Result: Flow using subflow still has C in flows.json, but this isn't visible in editor (or I haven't found anywhere it is shown)
[
{
"id": "760dd5928d0a0761",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": "",
"env": []
},
{
"id": "5233ec6f57c1cbae",
"type": "subflow",
"name": "Subflow 1",
"info": "",
"category": "",
"in": [],
"out": [],
"env": [
{
"name": "A",
"type": "str",
"value": "a"
},
{
"name": "B",
"type": "str",
"value": "b"
},
{
"name": "D",
"type": "str",
"value": "d"
}
],
"meta": {},
"color": "#DDAA99"
},
{
"id": "fb62af5babb05f0b",
"type": "subflow:5233ec6f57c1cbae",
"z": "760dd5928d0a0761",
"name": "",
"env": [
{
"name": "A",
"value": "1",
"type": "str"
},
{
"name": "B",
"value": "2",
"type": "str"
},
{
"name": "D",
"value": "4",
"type": "str"
},
{
"name": "C",
"value": "3",
"type": "str"
}
],
"x": 180,
"y": 100,
"wires": []
}
]
It may be reproducable without all these steps, perhaps just make subflow (with a single env variable), set a value to that variable when using that subflow in a flow, then remove that env variable in the subflow.