Programmatically obtain system.util.invokeAsynchronous description

Sorry if this has been asked already-- is it possible to obtain the description passed to system.util.invokeAsynchronous programmatically? Will it show up in the thread’s info with system.util.threadDump?

From what context? Are you trying to retrieve the description from inside the thread? The immediate thing that comes to mind is just to pass it in directly…

That said, you could in theory access it from the ScriptContext static method:

From outside the thread. A literal context that is effectively what I’m looking for is a timer script on the gateway that evaluates the state of threads spawned by system.util.invokeAsynchronous based on their given description.

Consider starting from the static com.inductiveautomation.ignition.common.script.ScriptManager.executingScripts() method.