Highlighted
Frequent Contributor.
Frequent Contributor.
380 views

Get bad validation message for background update

Jump to solution

I have written a script to update probsummary ticket by a background process

I am able to catch the exit code "bad.val" when a valiation failed on an update by formatctrl or RuleSet

But, does anyone know how to catch the error message generated for the failed validation ??

Is there any HPSM global variable that store the validation message ??

thanks

0 Likes
1 Solution

Accepted Solutions
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: Get bad validation message for background update

Jump to solution

Hi,

if your script is written in JS, you can use the Method getMessages() to receive all generated messages.
And you if're using doAction(), you will get also an valid return code... e.g. 71 for validation failed.

Please find below the documentation for the both methods:

https://docs.software.hpe.com/SM/9.52/Codeless/Content/programming/javascript/reference/javascript_method_scfile_getmessages.htm?Highlight=getMessage

https://docs.software.hpe.com/SM/9.52/Codeless/Content/programming/javascript/reference/javascript_method_scfile_doaction.htm

Hope that helps 🙂

 

View solution in original post

0 Likes
2 Replies
Highlighted
Honored Contributor.. Honored Contributor..
Honored Contributor..

Re: Get bad validation message for background update

Jump to solution

Hi,

if your script is written in JS, you can use the Method getMessages() to receive all generated messages.
And you if're using doAction(), you will get also an valid return code... e.g. 71 for validation failed.

Please find below the documentation for the both methods:

https://docs.software.hpe.com/SM/9.52/Codeless/Content/programming/javascript/reference/javascript_method_scfile_getmessages.htm?Highlight=getMessage

https://docs.software.hpe.com/SM/9.52/Codeless/Content/programming/javascript/reference/javascript_method_scfile_doaction.htm

Hope that helps 🙂

 

View solution in original post

0 Likes
Highlighted
Frequent Contributor.
Frequent Contributor.

Re: Get bad validation message for background update

Jump to solution

thanks for the tips 

It is is working perfectly !

0 Likes
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.