AddRequirements (For Transactions)

This business rule is attached to a transaction in order to add requirements based on the configured requirement criteria. AddRequirements will automatically set the OptionText of combo box or radio button fields.

This rule provides flexibility to its elements and attributes so they can be configured with literal values or math variables or fields. The elements and attributes of AddRequirements will be able to resolved to values contained by Math Variables and Fields of the activity to which it is attached. A different AddRequirements rule can be attached to a RequirementDefinition.

The rule allows the activity's math to decide and generate the requirements along with the status at which it is generated (as any other APE rule with the ability to resolve Math Variables).

Note: AddRequirements can be configured partially or entirely through CopyBooks.

AddRequirements Elements and Attributes
Element/Tag Parent Element Attribute Definition Element/Attribute Value and Description
<AddRequirements>    

Required element:

The opening and closing tags of the business rule.

 
<Requirement> <AddRequirements>  

Required, repeatable element:

The container element for the requirement configuration.

 

  <Requirement> ALLOW_DUPLICATES

Optional attribute:

This attribute defines whether duplicate requirements are allowed.

math variable, field name, literal

Math variable or activity field must resolve to or the literal must be one of the values listed below.

Yes: Duplicate requirements are allowed. This is the default behavior.

No: Duplicate requirements are not allowed.

<Tests> <Requirement>  

Optional element:

The container element for the test expression configuration.

 
<Test> Tests>  

Required, repeatable element:

This element defines an expression that, if it resolves to true, will invoke the remainder of the rule's configuration.

Note: This element is required if the <Tests> element is present.

An expression that, if it resolves to true, will invoke the remainder of the rule's configuration.

<RequirementName> <Requirement>  

Required element:

This element specifies the requirement to be added to the transaction.

math variable, field name, literal

The math variable or activity field must resolve to or the literal must be a name of a requirement, exactly as it appears in AsRequirementDefinition, that will be added to the transaction.

<StatusCode> <Requirement>  

Optional element:

This element defines the status that the requirement should be in if it's added to the transaction.

math variable, field name, literal

The math variable or activity field must resolve to or the literal must be a code value from AsCodeRequirementStatus.

<ClientGUID>    

Optional element:

This element defines the client that should be added to the requirement. The default is policy.

math variable, field name

A client GUID for the client that should be added to the requirement.

<Criteria> <Requirement>   Optional, Repeatable: Provides a filtering mechanism to include or exclude the requirement from generation.

math variable, field name, literal

A value that will be compared to the requirements' criteria of the same name that is provided by the NAME attribute.

  <Criteria> NAME Required: The attribute provides the name of the criteria to be tested.

literal

A literal name of the requirement's criteria.

  <Criteria> OPERATOR Required: The attribute provides the operator for the condition that is being build. The condition is expressed as [criteria's defined value] [operator] [<Criteria> value]. Equal, GreaterThan, GreaterThanOrEqual, LessThan, LessThanOrEqual
  <Criteria> DATATYPE Required: Data type refines the execution of the filter being built with the criteria configuration.

TEXT, DATE, INTEGER, DECIMAL

<Fields> <Requirement>  

Optional element:

This element contains configuration specifying the fields to be copied to the newly created requirement.

 
<Field> <Fields>  

Required, Repeatable:

This element specifies the field to be copied to the newly created requirement and the field to which it should be copied.

 
<From> <Field>  

Required:

This element specifies the field whose value should be copied to the new requirement.

math variable, field name

The name of the field or MathVariable from which value should be copied.

<To> <Field>  

Required:

This element specifies the field to which the value should be copied.

literal

The name of the requirement field that should be given as the value.

XML Schema

<AddRequirements>
<Requirement ALLOW_DUPLICATES="[math variable | field | Yes | No]">
<Tests>
<Test>[condition]</Test>
<Test>. . .</Test>
</Tests>
<RequirementName>[math variable | field | requirement name]</RequirementName>
<StatusCode>[math variable | field | code value]</StatusCode>
<ClientGUID>[math variable | field]</ClientGUID>
<Criteria NAME="[criteria name]" OPERATOR="[Equal | GreaterThan 
| GreaterThanOrEqual | LessThan | LessThanOrEqual]" 
DATATYPE="[TEXT | DATE | INTEGER | DECIMAL]">[math variable | field 
| literal]</Criteria>
<Criteria>. . .</Criteria>
<Fields>
<Field>
<From>[variable | field]</From>
<To>[field]</To>
</Field>
<Field>. . .</Field>
</Fields>
</Requirement>
<Requirement>. . .</Requirement>
</AddRequirements>

XML Example

<AddRequirements>
<Requirement ALLOW_DUPLICATES="NO">
<Tests>
<Test> ClientSSN= '01'</Test>
</Tests>
<RequirementName>Missing TaxID</RequirementName>
<StatusCode>00</StatusCode>
<ClientGUID>ClientGuidMV</ClientGUID>
<Criteria NAME="Criteria1" OPERATOR="GreaterThan" DATATYPE="DATE">DateMV</Criteria>
<Criteria NAME="Criteria2" DATATYPE="TEXT">TextMV</Criteria>
<Fields>
<Field>
<From>MV</From>
<To>FieldName</To>
</Field>
</Fields>
</Requirement>
<Requirement ALLOW_DUPLICATES="NO">
<Tests>
<Test> Replacement = '01'</Test>
</Tests>
<RequirementName>Replacement Form Missing</RequirementName>
<StatusCode>00</StatusCode>
</Requirement>
</AddRequirements>