N1 Service Provisioning System 4.1 Reference Guide

The successCriteria Element

The <successCriteria> element is a child element of <execNative>. The <successCriteria> element specifies the criteria to be used to evaluate whether or not an <execNative> step executed successfully. If this element is not specified, the default value is:


<successCriteria status=”0”/> 

The successCriteria is ignored if an empty successCriteria is specified. If you specify the tag:


<successCriteria/> 

The step will always succeed no matter what output or exit code the command generated.

successCriteria Element attributes

Name 

Type 

Required 

Configurable 

Description 

status 

integer 

No (If more than one is specified, then these conditions are AND-ed together.) 

No 

The desired exit status of the command. Should be a positive integer. 

outputMatches 

String 

Yes 

The regular expression to match with the standard output generated by the command. Should be a non-empty string 

errorMatches 

String 

Yes 

The regular expression to match the standard error generated by the command. Should be a non-empty string 

inverse 

Boolean 

No 

No 

If set to true the conditional expressed by echo element of success criteria is negated. The default value is false. That is the step succeeds only if the conditions specified through each attribute of successCriteria are not met 

If the inverse attribute is set to true, it negates each of the conditions specified within <successCriteria>.

For example, an <execNative> step with the following successCriteria


<successCriteria status=”1” outputMatches=”bin” errorMatches=”none” inverse=”true”/> 

will succeed if status is not 1 and output does not match `bin' and error does notmatch `none'.

<successCriteria> element that contains only the inverse attribute will be saved without the inverse attribute. That is if you specify


<successCriteria inverse=”true”/> 

It will be stored as:


<successCriteria/> 

The result will be that <successCriteria> is ignored.