Automic Workload Automation

  • 1.  Using ACTIVATE_UC_OBJECT with 'PASS_VALUES' parameter

    Posted Aug 11, 2017 04:36 AM

    This question has come up quite often, and people got confused because variables were not being passed as expected while usingACTIVATE_UC_OBJECTwith 'PASS_VALUES' parameter.

    The bottom line is that 'PASS_VALUES' parameter will only work if :

    • variables also appear in the 'Variables & Prompts' tab of the calling object
    • or if they were defined using:PSET


    Here is a short example with 2 scripts :

    • SCRI.STARTERstartsSCRI.ACTIVATEDand passes&MYVARIABLE#.
    • SCRI.ACTIVATEDthen displays this variable.


    SCRI.STARTER

    a) With a Promptset

    :SET &START# = ACTIVATE_UC_OBJECT(SCRI.ACTIVATED,,,,,PASS_VALUES)
    jvsej92qov6u.png


    b) With :PSET

    :PSET &MYVARIABLE# = '12345'
    :SET &START# = ACTIVATE_UC_OBJECT(SCRI.ACTIVATED,,,,,PASS_VALUES)


    SCRI.ACTIVATED

    :P My variable is &MYVARIABLE#

    Result:
    tvrr9hbwdpev.pnghttps://us.v-cdn.net/5019921/uploads/editor/bd/tvrr9hbwdpev.png" width="716">

    Best regards,
    Antoine



  • 2.  Using ACTIVATE_UC_OBJECT with 'PASS_VALUES' parameter

    Posted Aug 11, 2017 04:43 AM
    It will also work I believe if the variable is defined in the script as a PSET VARA

    e.g. :PSET &MYVARIABLE# = '12345'



  • 3.  Using ACTIVATE_UC_OBJECT with 'PASS_VALUES' parameter

    Posted Aug 11, 2017 05:13 AM
    That's right, JohnO'Mullane !
    I'm adding this to the original post:)

    Thanks
    Antoine