Requirement Definition
The requirement definition contains the XML configuration needed to process a single requirement. A user can configure the rule to generate workflows for Policy and Policy-Client level requirements.
Note: A requirement definition can be configured partially or entirely through CopyBooks.
Note: PreviousStatusCode will get updated only when the parent activity that created the requirement is reversed. even when the requirement status is updated.
So CopytoRequirementFields rule has to configure PreviousStatusCode to update PreviousStatusCode.
The context information for definition of Requirement are available in Available Prefix and fields for Requirement Definition. It includes:
- Activity and Transaction information, if the requirement is generated by an activity.
- Policy information, if the requirement is generated for a policy.
- Client information, if the requirement is generated for a client.
- Use of the copybook in the three sections of Requirement rule.
The context can be used for field population, or execution of logic in ScreenMath or Action of the Requirement Rule. Requirement Rule has following three parts:
- Requirement Source
- Requirement Definition
- Requirement Result
| Element/Tag | Parent Element | Attribute | Definition | Element/Attribute Value and Description |
|---|---|---|---|---|
| <Requirement> |
Required element: The opening and closing tags for the requirement. |
|||
| <CopyBook> | <Requirement> | See CopyBook Elements | ||
| <States> | <Requirement> |
Optional element: The container element for state configuration. |
||
| <State> | <States> |
Optional: Defines the state by assigning it a requirement status |
Optional Value should be a code from AsCodeRequirementStatus. |
|
| STATUS |
Optional element: Defines how the system should process the requirement when in a given status. |
|||
| SCHEDULE | Optional:
While in a state, a requirement can undergo multiple rounds of processing. This attribute specifies the amount of time, in minutes, that should be dedicated to each round of processing. |
|||
| EXPIRE |
Optional Specifies an amount of time, in minutes, after which the requirement will expire. |
Optional:
Value should be an integer. |
||
| <WorkflowTask> | <States> | Optional: Identifies the workflow task definition to be generated. This element is ignored if the workflow feature is "turned off" (system property). | Values: Workflow task name | |
| <Math> | <State> |
Optional: See the Math Element page for information on configuring this element. Math configuration for a requirement definition can access all critical requirement- and application-specific fields, define conditions and initiate external calls. |
||
| <MathVariable> | <Math> | TYPE | FUNCTIONCALL | <Parameters> tag that contain <Parameter> tags defining the parameters to the function. Parameters must be math variables. |
| FUNCTIONNAME | Name of the FUNCTION you are calling. | |||
| <Parameters> | <Math> | |||
| <Parameter> | <Parameters> | NAME | The parameter name from the FUNCTION. | The MathVariable that holds the value to pass to or from the function’s parameter. |
| <Rules> | <States> | Optional:
The container element for rules configuration. |
||
| <Rule> | <Rules> | Optional, Repeatable:
Identifies attached rules that are to be processed in the state. |
The name of an attached rule that is to be processed in the state. | |
| <Transitions> | <State> | Optional:
The container element for transition configuration. |
||
| <Transition> | <Transitions> | Optional, Repeatable:
Defines the conditions for transitioning a requirement to another state. |
||
| IF | Optional:
Specifies the status to which the requirement should move if the IF condition is satisfied. |
Optional:
Value should be a code from AsCodeRequirementStatus. |
||
| TO | Optional:
Defines a condition that, if satisfied, will cause the requirement to move to the state specified in the TO attribute. |
Optional:
Value should be an expression that resolves to a Boolean value. |
||
| <WorkflowTask> | <State> |
Optional: Identifies the workflow task definition to be generated. This element is ignored if the workflow feature is "turned off" (system property). |
Values: Workflow task name | |
| <WorkflowTask> | WORKFLOWTASKSTATUS | Optional: When the transition's condition is true and the requirement is updated to the new requirement status, the associated workflow task is updated to the attribute's status value. This attribute is required when the requirement is associated to generates a workflow task. It would be used to close the workflow task when the associated requirement is considered closed, waived or fulfilled. |
Values: Workflow task status - AsCodeWorkflowTaskStatus |
|
| <WorkflowTask> | CREATEONUSEREXECUTION |
The attribute indicates when the Workflow Task is generated. By default, Workflow Tasks are generated by cycle, DI and AsFile post insert processes and not by user initiated activity execution. |
Values: Yes - workflow task is generated by all execution methods including user initiated activity execution. No - workflow task is generated only by cycle, DI and AsFile post insert processes. This is the default.
|
XML Schema
<Requirement>
<CopyBook>CopyBook-Requirements</CopyBook>
<States>
<State STATUS="[code value]" SCHEDULE="[integer]" EXPIRE="[integer]">
<Math>. . .</Math>
<Rules>
<Rule>[rule name]</Rule>
<Rule>. . .</Rule>
</Rules>
<Transitions>
<Transition IF="[conditional statement]" TO="[code value]" WORKFLOWTASKSTATUS="[code value]"/>
<Transition>. . .</Transition>
</Transitions>
<WorkflowTask CREATEONUSEREXECUTION="[Yes|No]>[workflow task name]</WorkflowTask>
</State>
<State>. . .</State>
</States>
</Requirement>
XML Example
<Requirement>
<CopyBook>CopyBook-Requirements</CopyBook>
<States>
<State STATUS="00" SCHEDULE="5">
<Transitions>
<Transition IF="1=1" TO="02"/>
</Transitions>
</State>
<State STATUS="02" SCHEDULE="5" EXPIRE="1440">
<Math>
<MathVariables>
<MathVariable VARIABLENAME="ResultsReceivedIndicator" TYPE="VALUE" DATATYPE="INTEGER">0</MathVariable>
<MathVariable VARIABLENAME="RequirementResultGuidMV" TYPE="VALUE" DATATYPE="TEXT">E72BE25B-7AA0-4B89-AA40-03944F1913FD</MathVariable>
<MathVariable VARIABLENAME="MatchedCount" TYPE="SQL" DATATYPE="INTEGER">SELECT COUNT(*) FROM ASMATCHEDREQUIREMENTRESULT WHERE RequirementResultGuid=[RequirementResultGuidMV]</MathVariable>
</MathVariables>
</Math>
<Rules>
<Rule>MatchRequirementResult</Rule>
</Rules>
<Transitions>
<Transition IF="MatchedCount > 0" TO="03"/>
</Transitions>
</State>
<State STATUS="03"/>
<State STATUS="99"/>
</States>
</Requirement>