Automic Workload Automation

Expand all | Collapse all

get_login() function in UC4 Automation Engine V9

  • 1.  get_login() function in UC4 Automation Engine V9

    Posted Oct 16, 2014 02:41 PM
    Hi,
      In the process tab of a windows job the below code is being used to extract login id and password and pass it as a parameter to one of the windows script.

    :SET &LOG_IN# = GET_LOGIN("TEST_ADVANTAGE.LOGIN","OR1SRV-QCHKS005.orcclab.com","WINDOWS",LOGIN_INFO)
    echo &LOG_IN#
    :SET &PW# = GET_LOGIN(TEST_ADVANTAGE.LOGIN,"OR1SRV-QCHKS005.orcclab.com","WINDOWS",PASSWORD)
    echo &PW#

    This job is giving run time error:
    6/2014 2:37:54 PM -  U0020536 Runtime error in object 'ADV.WIN.UT_CALL_PS_DIR_TEST.WIN.TEST' line '00010': The provided type 'WINDOWS' is not allowed.
    10/16/2014 2:37:39 PM -  U0020536 Runtime error in object 'ADV.WIN.UT_CALL_PS_DIR_TEST.WIN.TEST' line '00010': The provided type 'WINDOWS' is not allowed.

    We have added the datatype "WINDOWS" to UC_LOGIN_TYPES.
    Inspite of this its still failing.
    Please advise.

    Thank you,
    Pratima


  • 2.  get_login() function in UC4 Automation Engine V9

    Posted Oct 16, 2014 04:19 PM

    There is also an agent type called WINDOWS, so you can't use that name for a custom type.  You'll need to use a unique type.



  • 3.  get_login() function in UC4 Automation Engine V9

    Posted Oct 16, 2014 04:21 PM
    I can confirm Pete's answer, jut create all custom entries with the login info, it leads to some undesired duplication and provides room for error when passwords update etc but it works.


  • 4.  get_login() function in UC4 Automation Engine V9

    Posted Oct 17, 2014 10:39 AM
    Thank you Pete and William.  I don't have much exposure to AE V9. But the login object that I created is for WINDOWS login.I need to select type from drop down.How do we create custom/unique type for login objects? Is this done in client 000 only?


  • 5.  get_login() function in UC4 Automation Engine V9

    Posted Oct 17, 2014 10:49 AM
    Yes, in Client 0000 the UC_LOGIN_TYPES add something custom I will use SQLPLUS for this example\
    Add the custom login type:
    mv4gonr8ybb0.jpghttps://us.v-cdn.net/5019921/uploads/editor/hr/mv4gonr8ybb0.jpg" width="855">
    Create/add the custom login entries in a login object on your Client of choice:
    18oe4bds2099.jpghttps://us.v-cdn.net/5019921/uploads/editor/vu/18oe4bds2099.jpg" width="728">
    Write a script to pull these, assign them to variables and use as desired:
    nutxtgsipn1q.jpghttps://us.v-cdn.net/5019921/uploads/editor/3w/nutxtgsipn1q.jpg" width="833">


  • 6.  get_login() function in UC4 Automation Engine V9

    Posted Oct 17, 2014 10:58 AM
    As I mentioned this will lead to maintaining username and password in at least 2 places, so you may want to make it very obvious to whoever is upkeeping that sort of thing.


  • 7.  get_login() function in UC4 Automation Engine V9

    Posted Oct 17, 2014 11:17 AM
    Oh thank you  so much. I will try this option.I don't have access to client 000. But will request some one to create a type for me. The whole purpose of doing this is basically passing the server,username and password [encrypted] to a batch program .

    I was exploring another option of using promptsets so I can pass the values using get_var().

    But after creating a promptset with login,server and password info, I could not add it to the variable/prompts tab of the actual job since the add option under prompt set is greyed out.


  • 8.  get_login() function in UC4 Automation Engine V9

    Posted Oct 17, 2014 11:18 AM
    So does the GET_LOGIN function only work for custom-defined types that you put into UC_LOGIN_TYPES?

    I didn't see that stated explicitly in the documentation, and it seems rather odd that I shouldn't be able to access this information for standard agent types...


  • 9.  get_login() function in UC4 Automation Engine V9

    Posted Oct 17, 2014 11:19 AM
    Daryl, From my experimentation it seems that is the case.


  • 10.  get_login() function in UC4 Automation Engine V9

    Posted Oct 17, 2014 11:34 AM
    @Pete -- actually, you *can* add "WINDOWS" to UC_LOGIN_TYPES.  You just wind up seeing two "WINDOWS" entries in your picklist when you go to add a new line to a login object.  (Not particularly helpful, obviously...)


  • 11.  get_login() function in UC4 Automation Engine V9

    Posted Oct 17, 2014 11:51 AM
    By creating a custom type  the job worked. Thank you William.


  • 12.  get_login() function in UC4 Automation Engine V9

    Posted Jul 27, 2017 06:09 AM
    There is also another post in the community to this topic.
    https://community.automic.com/discussion/9543
    May be this helps to sort this out..