Automic Workload Automation

 View Only
  • 1.  Variable filled at activation with unexpected value

    Posted Jul 10, 2019 11:41 AM
    Edited by Carsten Schmitz Jul 10, 2019 11:58 AM
    ​Hi.

    One of our users escalated an issue to me and I am lost.

    He has a SCRI with loads of code and a bunch of includes in it. In the "Variables and Prompts" tab of that SCRI, he has defined a variable:

    &DST_FOLDER#, and it contains a certain value (let's say it contains the text "/files/uk/").

    He runs the SCRI as part of a JOBP (it does not run stand-alone, if I try to run it stand-alone, it is stuck in "generating" forever). Then he looks at the activation report of that SCRI, and it lists all the values any variables were activated with. And it reads something different, like:

    2019-07-08 16:09:46 - U00020206 Variable '&DST_FOLDER#' was stored with value '/files/us/'.

    I'm no expert on AutomicScript or the way it handles variables. Isn't the "Variables & Prompt" tab the thing with the highest precedence, can this unexpected value be inherited from somewhere else? And even if it is, I looked through the JOBP and all objects and couldn't find the string "/files/us/", and neither could he. Any pointers on how to go about debugging this oddity?

    Thanks!​


    additional findings: the reason it's stuck in "generating" is that it's waiting for an ACTIVATE_UC_OBJECT with "wait" parameter, that he calls inside the SCRI, and the actual object he calls is taken from a variable as well. That resolves to a different JOBP (but only when propagated down from the parent JOBP - if run stand-alone, the value is empty and it freezes). That different JOBP, I looked through it, it doesn't contain the searched-for string either, but it does contain a :READ script command which fills this variable in question from somewhere. If I read this correctly, :READ transfers variables through the Automic DB that got stored to it by :PUT_READ_BUFFER in some sort of stack.

    Just a hunch: Is it possible that the explaination is that various people use the same variable name, putting the values on a sort of stack in the db with :READ, which is not in the scope of any active object but sort of global, then read unexpected values back into their running objects with :PUT_READ_BUFFER and propagate them into other parent/child objects?

    If so, omg.


  • 2.  RE: Variable filled at activation with unexpected value

    Posted Jul 12, 2019 08:34 AM
    This has been resolved.

    The user had also defined the variable in the ""Properties -> Variables" panel that pops out from the bottom, and seemingly overrides even the "variables & promps" panel for the individual JOBS.

    Proving once more that AE is like Perl. There's more than one way to do it, and one can easily be puzzled by one's own creation.