Absent Member.. Absent Member..
Absent Member..

'Command Line' operation issue

I noticed that this operation provided by HP OO does not seem to trigger a failure in an OO flow even when the Windows command being issued fails.

/Base [1.4.3]/Library/Operations/Operating Systems/Cross Platform/Command Line

This happens in both HP OO Studio and HP OO Central.

P.S. See result examples below that still go to the ‘success’ path in a flow. Based on the Responses code in the operation it only seems to be basing success on “Code=0” and does not seem to be concerned with a value in the “Error String” or “exitStatus” field.

(Output String=), (FailureMessage=), (response=success), (returnResult=0), (Result=0), (TimedOut=false), (Error String=The system cannot find the path specified.), (exitStatus=0), (Code=0)

{response=success;FailureMessage=;Output String=;Error String='echox' is not recognized as an internal or external command,operable program or batch file.;TimedOut=false;Result=0;returnResult=0;exitStatus=9009;Code=0;}

I'm in the process of setting up my own operation to check ErrorString and exitStatus along with Code to determine if it is a success, but wanted to check with others to see if there is another solution out there.



2 Replies
Absent Member.
Absent Member.


You might want to look at feeding the success path of the command line operation into a String Comparator operation, and checking there whether the Error String is empty (for example by doing a RegEx comparison to ^(?![\s\S]) .

Setting up your own operation will work too, but you asked for an alternative - which I think is more flexible.


Absent Member.
Absent Member.

Hi Gary,

My sugestion is to try with /Library/Operations/Remote Command Execution/Remote Command

from latest Base CP version (eg. 1.8.0) before implementing your own logic.



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.