I recently came up with a way to determine from an AE scripting JOBI or SCRI, whether the scripting statements are being run in the pre-process or process, or the post-process.
:SET &DebugMode# = &DebugMode#:SET &Task_Status# = GET_UC_OBJECT_STATUS():IF &Task_Status# < 1573: SET &Active_Tab# = "pre-process or process":ELSE: SET &Active_Tab# = "post-process":ENDIF:IF &DebugMode# = "YES": PRINT "Active tab : &Active_Tab#":ENDIF
I have started to think of other areas where it could be useful to determine the context within which a script is running.
Predefined read buffer variables, e.g,
UC_CAUSE_NAME & UC_CAUSE_NR
Can anyone think of ways to obtain this information?
4. If the task was started by an EXEC VARA, which one?
What about &$ACTIVATOR# and &$ACTIVATOR_TYPE# ?
I think that will just return the run ID and type of the task in which the EXEC VARA was used. EXEC VARAs are not executable objects, so they do not get their own run IDs or show up in the activity list.
**** you 're absolutely right...
I digged a bit in my AE DB, the only connection I was able to find was table OVD
Field ovd_source = 'EXEC'
in field OVD_Execute is the name of the object to be executed.
**** = D A M N
It might be possible to design an SQLI to look up the relationship between a called task and the EXEC VARA (and possibly PRPT) responsible for its execution.
I also created a new idea for several new Predefined read buffer variables for EXEC VARA tasks. If this idea were delivered, it would make EXEC VARAs much more versatile & powerful.
I can find the relationship between an EXEC VARA and the executable object it calls, but only in the object tables, and only from VARA-to-object, not the other way around. So far, I have not found anything useful in the tables associated with active tasks.
I inserted a :WAIT 3600 command into the executable object called by an EXEC VARA. I then clicked the Preview button to trigger the task, and did some digging in the DB to see if I could find out where the relationship between the called task and the EXEC VARA might be stored.
The only thing in the EH row that I cannot identify is EH_QuAcv. I thought it might be a reference to something in ACV, but I wasn't able to find anything.
If anyone with deep knowledge of the AE database would care to provide insight that could help establish the relationships between a running task and the EXEC VARA (and possibly PRPT) that executed it, I would appreciate it. Thanks in advance.
I'm not aware of any way to connect a running task to its source VARA.EXEC - there might not be one