Automic Workload Automation

  • 1.  Using EXEC VARAs as custom AE scripting functions

    Posted Jul 18, 2018 10:27 AM

    This morning, I submitted two new ideas:

     

    If both of these enhancements are delivered, this will make it possible to use EXEC VARA objects as custom AE scripting functions. Here is how it would work:

    1. The EXEC VARA is accessed using GET_VAR(VARA,KEY,COLUMN) or a {VARA,KEY,COLUMN} reference. Here, KEY and COLUMN are the arguments to the function.
    2. The EXEC VARA runs a SCRI.
    3. The SCRI reads the new predefined read buffers &UC_CAUSE_VARA_KEY and &UC_CAUSE_VARA_COLUMN from the read buffer.
    4. Based on the KEY and COLUMN used to access the EXEC VARA, the SCRI performs different actions.
    5. The SCRI assembles and returns a single-result data sequence to the calling EXEC VARA. This is the output of the function.

     

    If you like the ideas, please vote for them.



  • 2.  Re: Using EXEC VARAs as custom AE scripting functions

    Posted Jul 18, 2018 10:36 AM

    This approach could be further generalized too. The SCRI could be designed in such a way that it could be used in many different EXEC VARA objects, and so that these EXEC VARAs could be used in many different places. The SCRI would perform different actions depending on the execution context (which EXEC VARA, which PRPT, etc.).

     

    Already today, I occasionally use EXEC VARAs as pseudo-functions in AE scripting and in prompt sets. However, the called task has no way of determining all the details of the context within which it was called.

     

    Because of this, depending on where the EXEC VARA is used, setting it up may be less than elegant:

    • If the EXEC VARA is used in AE scripting, arguments can be passed via script variables in VARA parameters. This actually works quite well.
    • If the EXEC VARA is used in {VARA,KEY,COLUMN} references however (e.g., in prompt sets), then either:
      • The EXEC VARA must fetch all of the data that might be needed, and the pertinent datum must be referenced by KEY and COLUMN, or
      • A separate EXEC VARA must be created for each possible set of arguments.