Adapt NA task status using command script exit code

Hi all,


I'm running a task that use a command script and I would like to be able to set the status of the task to Warning in some cases.

Actualy when I use the exit code in the script I'm only able to set the status to Failed or Succeeded.

Is there a way to set the task status to Warning when our script encounter some designed behaviours ?


Thanks in advance.



3 Replies
Cadet 2nd Class Cadet 2nd Class
Cadet 2nd Class


In in linux, try to

- add this rcx option in adjustable_options.rcx

          <option name="run_external_app/warn_on_negative_resultcode">true</option>

- reload server options from NA CLI/proxy

- Use exit(-1) for warning in your perl scripts


It's been some time since i used this so not sure if it's still working.

Best regards,

Marius Herculea
HP SW Technical Consultant

Cloud and Automation Professional Services


Hi Marius,

thanks for your reply.

I tried it but could not made it work.

I forgot to say that I'm running a 9.00.04 version and that my command script is made whith Expect.

I'm still looking for a solution on my own but as I didn't knew about the rcx file I think I still will need help.


Best regards,


Absent Member.
Absent Member.

Try "exit -101"

We're running HPNA 10.10 and that works for us. Might work for yours. It took us a while to find it.

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.