Possible to Get "Process Variable Name" of caller in external javascript?

Hi,

I have a Camunda 7 BPMN flow running in Camunda Modeler 5.19, that is calling 20+ different external javascript files. I find it hard to manage all files separately and would like to use one single file and then use logic to know which code to run depending of from where it is called.

As I can easily get the name of the flow with environment.options.name and the name of the task with content.name I can get it to work as long as there are not several calls from within the same task. For that I need to know the “Process Variable Name” of the caller.

Here is a simplified example:

I have tried extensively to find out this with no luck. Is it even possible (within an external javascript file like in the example)?

Kind Regards