partNumber Element

This topic describes the <partNumber> XML element.

General syntax
<partNumber [value="regexp" regexpid="id_name" invert="false"] />
DescriptionTests the existence of the part number (if it is not null). If the part number is null (not set), always returning false. If the optional value defined matches returning true. This test is an alias instruction for the test Element.
AttributesNameUseAnnotation
valueoptionalDefines the value of the part number

The value can be either a string or any Regular Expression reference. If the optional attribute value is omitted, then the test will basically just execute an existence check. If the value attribute is defined, then the test is successful if the value matches the pattern.

regexpidoptionalDefines the unique id within the namespace to reference the test using regular expressions.

Allowed character set: [p{Alnum}\_\-] = [a-z A-Z 0-9 _ -]

When regexpid is used outside the tag and the value is not match, an illegal state exception is thrown. (See correct example)

invertoptionalThe Boolean value “true” inverts the behavior of the instruction. If the attribute is not configured, the default value “false” is used and the behavior of the instruction is not inverted. If the value is set to true and the criteria do not match, the child instructions will be executed.
Examples
<!-- tests if the part number is starting with CAP- regular expression and if its value starts with CAP
     exists --> 
< partNumber value="CAP-(.*)" invert="false" /> 

<!-- If the partNumber value starts with "Test" a regexpid --> 
<partNumber value="Test-(.*)" regexpid="PART_NUMBER_WITH_PREFIX"> 

     <!—Set part number value from regexpid exclude "Test-"--> 
     <setPartNumber value="${PART_NUMBER_WITH_PREFIX.value[1]}"/>

</partNumber>