DeleteRequirements (for Transactions and Requirements)
-
The DeleteRequirements business rule manages Requirements generated by Activities or other Requirements when the parent Activity or Requirement is reversed or recycled.
-
By default, when a parent Activity or Requirement is reversed or recycled, all Requirements generated by that parent (including child Requirements and all generated Requirements in the hierarchy) are automatically updated to DELETED. status. In some cases, this cascading behavior can cause unintended status changes deep in the Requirement hierarchy.
-
To prevent this cascading status update, you can configure the DeleteRequirements business rule. Configuration is optional, and the rule can be attached to either an Activity or a Requirement.
-
When configured, the rule manages status updates only for the direct Requirements generated by an Activity or Requirement. It does not manage Requirements generated by child Requirements. To control status updates for lower levels in the hierarchy, each child Requirement must also be configured with the DeleteRequirements business rule to manage its own generated Requirements, and so on.
Use case Example
For example DeleteRequirements Business requirement is attached to Requirement Child-C and configured to not update its children requirements as shown:
Activity
-
Requirement generated by Activity Requirement P.
-
Child Requirement of Requirement P: Child-A
-
Requirement generated by Child-A: Child-A1
-
Requirement generated by Child-A: Child-A2
-
-
Child Requirement generated by Requirement P: Child-C
-
Requirement generated by Child-C: Child-C1
-
Requirement generated by Child-C: Child-C2
-
-
When you reverse or recycle Child-C:
-
Child-C status is set to "DELETED".
-
Child-C1 and Child-C2 (Requirements generated by Child-C) are not updated; their status remains unchanged from before the reversal/recycle.
|
Action |
Status of Direct Children |
Status of Grandchildren (and deeper) |
|---|---|---|
|
Reverse/Recycle Activity/Requirement (Default) |
“DELETED” (direct children) |
Unchanged (unless otherwise configured) |
|
Cascade to further generations |
Only if DeleteRequirements is configured on those children |
Only if configured; otherwise, unchanged |
DeleteRequirements: Elements and Attributes
|
Element |
Parent Element |
Description |
Element/Attribute Values |
|---|---|---|---|
|
<DeleteRequirements> |
|
Parent tag for this BR |
|
|
<DeleteRequirement> |
<DeleteRequirements> |
Optional element: Parent element for Delete requirements and test conditions. |
|
|
<Tests> |
<DeleteRequirement> |
Optional element: Defines the section holding the tests to determine if the Requirement record should be Deleted |
Standard <Tests> element configuration All Activity Fields and logged Activity Math variables can be used in Expressions under this Tests element |
|
<Test> |
<Tests> |
Required element: Defines a single test condition |
|
|
<DeleteAll> |
<DeleteRequirement> |
Optional element: All child requirements should get Deleted |
Values are Yes|No Yes: Updates the status of all the child requirements to'DELETED' No: Does not updates the status of all the child requirements to 'DELETED' |
|
<DeleteRequirement> |
<DeleteRequirements> |
Optional element: Parent element for Delete requirements and test conditions. |
|
|
<Tests> |
<DeleteRequirement> |
Optional element: Defines the section holding the tests to determine if the Requirement record should be Deleted |
Standard <Tests> element configuration All Activity Fields and logged Activity Math variables can be used in Expressions under this Tests element |
|
<Test> |
<Tests> |
Required element: Defines a single test condition |
|
|
<Delete> |
Optional element: Specify the requirement names whose status needs to get updated |
XML Schema
Delete Requirements using Test Conditions
<DeleteRequirements>
<DeleteRequirement>
<Tests>
<Test Condition""></Test>
</Tests>
<DeleteAll>Yes|No</DeleteAll>
</DeleteRequirement>
<DeleteRequirement>
<Tests>
<Test Condition""></Test>
</Tests>
<Delete>reqnames</Delete>
</DeleteRequirement>
</DeleteRequirements>
Delete All Child Requirements when Test Condition is Met
<DeleteRequirements>
<DeleteRequirement>
<Tests>
<Test Condition 1=True></Test>
</Tests>
<DeleteAll>Yes</DeleteAll>
</<DeleteRequirement>>
</DeleteRequirements>
Delete Specific Requirements by Name
<DeleteRequirements>
<DeleteRequirement>
<Tests>
<Test Condition 1=True></Test>
</Tests>
<DeleteAll>Yes</DeleteAll>
</<DeleteRequirement>>
</DeleteRequirements>
XML Example
Requirement Definition Example with Deleted Status
"<Requirement>
<States>
<State STATUS="00" SCHEDULE="1">
<!-- NEW -->
<Transitions>
<Transition IF="1=1" TO="01"/>
</Transitions>
</State>
<State STATUS="01" SCHEDULE="1">
<Transitions>
<Transition IF="1=1" TO="02"/>
</Transitions>
</State>
<State STATUS="02" SCHEDULE="5">
<Math>
<MathVariables>
<MathVariable VARIABLENAME="Matched" TYPE="VALUE" DATATYPE="INTEGER">0</MathVariable>
<MathVariable VARIABLENAME="ReadyToClear" TYPE="VALUE" DATATYPE="TEXT">Yes</MathVariable>
<MathVariable VARIABLENAME="ClientGuidMV" TYPE="FIELD" DATATYPE="TEXT">Client:ClientGUID</MathVariable>
<MathVariable VARIABLENAME="InsuredDL" TYPE="SQL" DATATYPE="TEXT">SELECT TextValue FROM AsClientField WHERE ClientGUID='[ClientGuidMV]' AND FieldName='Driverlicensenumber'</MathVariable>
<MathVariable VARIABLENAME="InsuredDLState" TYPE="SQL" DATATYPE="TEXT">SELECT OptionText FROM AsClientField WHERE ClientGUID='[ClientGuidMV]' AND FieldName='DriverlicenseState'</MathVariable>
<MathIF IF="IsEmpty(InsuredDL)">
<MathVariable VARIABLENAME="ReadyToClear" TYPE="VALUE" DATATYPE="TEXT">No</MathVariable>
</MathIF>
<MathIF IF="IsEmpty(InsuredDLState)">
<MathVariable VARIABLENAME="ReadyToClear" TYPE="VALUE" DATATYPE="TEXT">No</MathVariable>
</MathIF>
</MathVariables>
</Math>
<Rules>
<Rule>AddRequirements</Rule>
</Rules>
<Transitions>
<Transition IF="ReadyToClear='Yes'" TO="03"/>
</Transitions>
</State>
<State STATUS="03"/>
<State STATUS="99"/>
<State STATUS="DELETED" SCHEDULE="1">
<Math>
<MathVariables>
<MathVariable VARIABLENAME="Matched" TYPE="VALUE" DATATYPE="INTEGER">0</MathVariable>
<MathVariable VARIABLENAME="ReadyToClear" TYPE="VALUE" DATATYPE="TEXT">Yes</MathVariable>
<MathVariable VARIABLENAME="ClientGuidMV" TYPE="FIELD" DATATYPE="TEXT">Client:ClientGUID</MathVariable>
<MathVariable VARIABLENAME="InsuredDL" TYPE="SQL" DATATYPE="TEXT">SELECT TextValue FROM AsClientField WHERE ClientGUID='[ClientGuidMV]' AND FieldName='Driverlicensenumber'</MathVariable>
<MathVariable VARIABLENAME="InsuredDLState" TYPE="SQL" DATATYPE="TEXT">SELECT OptionText FROM AsClientField WHERE ClientGUID='[ClientGuidMV]' AND FieldName='DriverlicenseState'</MathVariable>
<MathIF IF="IsEmpty(InsuredDL)">
<MathVariable VARIABLENAME="ReadyToClear" TYPE="VALUE" DATATYPE="TEXT">No</MathVariable>
</MathIF>
<MathIF IF="IsEmpty(InsuredDLState)">
<MathVariable VARIABLENAME="ReadyToClear" TYPE="VALUE" DATATYPE="TEXT">No</MathVariable>
</MathIF>
</MathVariables>
</Math>
<Rules>
<Rule>DeleteRequirements</Rule>
</Rules>
</State>
</States>
</Requirement>"