Once a script has been evaluated, you can use the following ALH API to trace from where the script was called and access the Caller.
NamedElement getCaller()
It will return the Caller element of the script. For example, if a Behavior that runs a script is called from a callBehavior, you will get a callBehavior action as the Caller.
The following code fragment shows how to trace from where the script was called, e.g., from State1, through ALH API.
ALH.getCaller().getName(); // Trace from State1.