AutoSys Workload Automation

 View Only
  • 1.  Why does the script %WOB._fullname return random job names?

    Posted Jan 04, 2018 12:44 PM

    I'm trying to build custom notifications per job using javascript variables but I'm unable to identify the current job name within the application.  I've attempted to use WOB._name and WOB._fullname but the first one returns the same job name for every job in the application.  The second one returns a seemingly random job name for every job in the application.  This makes it impossible to build email text specific to each job within javascript.

     

    I'm aware that each job notification can be customized but I'm working with over 1,200 jobs.  I need to be able to dump the email body text into a variable and connect it to the appropriate job using the %WOB._fullname method.

     

    For example.

    Using symbolic variables assigned to the application by 'Run Javascript  (At run time (for each job in the Application):'

    if(WOB._fullname.search('Data_Quality') >=0 APPL.Email_Body = 'This is a Data Quality Notification.';

     

    In this situation WOB._fullname returns a random job name from within the application.  So the text being searched has nothing to do with the current job.  Which then causes the wrong text to be returned in the variable %APPL.Email_Body.

     

    Any help?

     

    Thank you,

     

    Scott McKinney



  • 2.  Re: Why does the script %WOB._fullname return random job names?

    Broadcom Employee
    Posted Jan 07, 2018 06:32 PM

    Hi,

    As per DE programming guide, the WOB level variables will return the following value.

    WOB._name

    Specifies the name of the job, excluding the qualifier. The name resolves in uppercase, for example, PAYJOB1.

    WOB._fullname

    Specifies the full name of the job, including the qualifier. The name resolves in uppercase, for example, PAYJOB1.RUN1. If the qualifier is not specified, the %WOB._fullname variable resolves to the job name.

    -----

    Do you have any thing else defined in the 'Qualifier' field of the job?

     

    Thank you,

    Nitin Pande

    CA Technologies

     



  • 3.  Re: Why does the script %WOB._fullname return random job names?

    Posted Jan 08, 2018 09:33 AM

    Good Morning Nitin Pande,

     

    I'm aware of what the documentation says.  The way the software actually works is different, hence my question.  I'm very happy to illustrate the issue.  It is entirely possible that I'm not utilizing the software correctly.  Regardless, I'd like to be able to use the software as it was intended.  I'd also like to understand why I'm seeing this behavior from a fairly simple variable call.

     

    Thank you,


    Scott



  • 4.  Re: Why does the script %WOB._fullname return random job names?

    Broadcom Employee
    Posted Jan 08, 2018 11:08 AM

    Hi Scott,

    I ran a quick test and I could see that the application ran (and simulated) the variables correctly.  Here is an output of simulation, the "Arguments to pass" field had /tmp/%WOB._fullname in the job.  It correctly returned the fullname to DATE.1.

     

    Name: DATE
    Qualifier: 1
    Job Type: UNIX
    Predecessors: LS.1
    Run: DAILY
    Anticipated Start Time: ******************
    Anticipated End Time: xxxxxxxxxxxxxxxx
    Execution time: 0 mins
    Life time: 1 min, 54 secs
    Auto-Resubmit failed job: RetryCount(0) RetryInterval(0)
    Agent name: AGENT
    Execute a command: /bin/touch
    Arguments to pass: /tmp/DATE.1
    User ID: root

     

    I am using R12 Sp2.  Can you tell me what is the version of dSeries you are using?

     

    Thank you,

     

    Nitin Pande

    CA Technologies.



  • 5.  Re: Why does the script %WOB._fullname return random job names?

    Posted Jan 08, 2018 11:37 AM

    We're using WA DE 12.  The specific example involves building a javascript under 'Services' and referencing it in an application.  

     

    Thank you,

    Scott



  • 6.  Re: Why does the script %WOB._fullname return random job names?

    Broadcom Employee
    Posted Jan 11, 2018 04:49 PM

    Hi Scott,

    I wanted to understand how you are using the built-in variables in your JavaScripts.  Are you copying/using the values of the %WOB._name in to another variable?

    I would like to see how you are calling these WOB level variables.

     

    Thank you,

    Nitin Pande

    CA Technologies



  • 7.  Re: Why does the script %WOB._fullname return random job names?
    Best Answer

    Broadcom Employee
    Posted Jan 16, 2018 12:12 AM

    Hi,

     

    If you are using the WOB._fullname in javascript , please use it in job trigger time , it should resolve correctly. 

     

    Thanks and regards,

    Ravi Kiran