ESP dSeries Workload Automation

 View Only
  • 1.  How to set variable

    Posted Jul 14, 2020 11:07 AM
    My problem: On file server there may be a file called "abc.txt" if that file is present then i want to set a variable FileFoun = 'True' or else set it to 'False'.

    After that workflow will resume. I will use variable is next steps.



  • 2.  RE: How to set variable

    Broadcom Employee
    Posted Jul 15, 2020 12:02 PM
    Hi,
    You can use setvar cli command to pass the value of some variable to DE side global variable.
    See this link.

    HTH,
    Nitin Pande

    ------------------------------
    Support
    Broadcom
    Toronto
    ------------------------------



  • 3.  RE: How to set variable

    Posted Jul 22, 2020 04:35 PM
    You can use javascript to update the variables.

    Create two alerts: one for file found, one for file not found. In file found set the variable to true, in file not found set the variable to false.
    Create a job that looks for the file to exist; it should fail if the file is not there
    In the job, specify a notification alert such that if the job fails it raises alert for fail; if it is successful (complete) then raise the found alert
    If you need to, set the failed alert to also auto-mark the job complete so that it doesn't create false "failed jobs" in the system using the below

    if (WOB._cmpc != null && WOB._subcount > WOB._retrycount)
    {
    execCommand('%(WOB._fullname)','%(APPL._name).%APPL._gen', 'ACTION COMPLETE');
    }