Requirement Definition

The total configuration of a Requirement includes three XML sections:

  • The user's entry screen named Requirement Details,

    • This presents a screen of fields for user data entry or dynamic creation by an activity or another requirement,

    • Fieldes become part of the data source to perform the Requirement's logic, update entities, conditionally transition to other statuses and spawn activities,

  • The Requirement's engine processing definition name Requirement Definition,

  • The Requirement's Results screen named Requirement Result,

    • Data description that stores external results from a callout to a bureau or service.

This page describes Requirement Definition that includes calculations, entity updating, activity spawning, generate other requirements and conditional transitions from the current status to the next status. Each current status can have a different definition for its processing by the requirement engine.

The requirement engine attempts to process logic defined by the current status value with the goal to move the status from its current value to the next defined value upon evaluating all conditions placed on that transition. Math variables defined in that current status' logic support the conditions, activity spawning and entity updates. Attempts to process from the current status value to another status value can be scheduled in intervals expressed in seconds or minutes and scheduled attempts continue until the requirement status is updated or the requirement is expired after a configured number of minutes following the first attempt to process in the new status. These scheduled attempts are meant to query for updates to related entities (Policy, Client and Requirement Results, Requirement Details, etc.) that may satisfy conditions to transition to other statuses. A schedule is optional. When a schedule is not established, the status can be updated through an engine processing attempt when a Requirement is

  • the Requirement is updated or generated by a user through the OIPA UI

  • the Requirement is updated or generated by an Activity

  • the Requirement's Results are updated

As a requirement initially enters a new status value, it can trigger a workflow task or close all associated workflow tasks.

RequirementDefinition: Elements and Attributes
Element/Tag Attribute Parent Element Definition Element/Attribute Value and Description
<Requirement>    

Required:

This element is the root element of the business rule.

 
<States>   <Requirement>

Required:

The element's structure contains one or more <State> definitions.

 
<State>   <States>

Required, Repeatable:

This element's structure defines the logic and processes that the requirement will perform when it has the defined status value.  This state structure is repeatedly invoked by the Requirement engine until it progresses to a different status value or the Requirement expires. 

 
  STATUS <State>

Required:

This attribute identifies the status value for this particular <State> structure.

  • code value

    • value must be a valid code value from AsCodeRequirementStatus

  SCHEDULE <State>

Optional:

This attribute provides the number of minutes between attempts to process the requirement to the next status value provided by the logic of the <Transitions> element.  The value of this attribute calculates the start time of the next attempt.  The attribute cannot co-exist with the SCHEDULESECONDS attribute in the same <State> structure.

  • literal

    • value must be an integervalue is expressed in minutes

  SCHEDULESECONDS <State>

Optional:

This attribute provides the number of seconds between attempts to process the requirement to the next status value provided by the logic of the <Transitions> element.  The value of this attribute calculates the start time of the next attempt.  The attribute cannot co-exist with the SCHEDULE attribute in the same <State> structure.

  • literal

    • value must be an integervalue is expressed in seconds

  EXPIRE <State>

Optional:

This attribute provides the number of minutes after which the requirement expires.  If a schedule has been established, the schedule ends and the requirement is updated to an expired status ('99').

  • literal

    • value must be an integervalue is expressed in minutes

<Math>   <State>

Optional:

This element provides a math section to calculate values needed to determine transition, or update other entities. The section can access data from fields defined by Available Prefixes and Fields page.

See common Math elements.

 
<Rules>   <State>

Optional:

This element's structure provides a list of one or more attached rules to process in the order in which they are listed.

 
<Rule>   <Rules>

Required, Repeatable:

This element identifies the attached rule to process for this requirement state.

  • AddRequirements

  • CopyToClientFields

  • CopyToImpairmentFields

  • CopyToRequirementFields

  • MatchRequirementResult

  • ProcessActivities

  • SpawnActivities

<WorkflowTask>   <State>

Optional:

This element Identifies the workflow task definition to be generated when the requirement initially reaches this <State>;s status value.  The element is ignored if the workflow feature is "turned off" (system property).  The workflow task will not be duplicated with each attempt to transition to the next status.

  • workflow task name

  CREATEONUSEREXECUTION <WorkflowTask>

Optional:

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.  This attribute can allow the workflow tasks to be generated by user initiated activity execution.

  • No

    • default

    • workflow task is generate only by AsFile post insert processes, cycle and DI.

  • Yes

    • workflow task is generated by all execution methods including user initiated activity execution.

<Transitions>   <State>

Optional:

This element's structure defines one or more updates to a new status value and the conditions required for update.

 
<Transition>   <Transitions>

Required, Repeatable:

This element defines a single new status value and the conditions required to update the requirement to the new status.

 
  IF <Transition>

Optional:

This attribute provides the condition that must be satisfied to update to the associated new status value.  The new status value is provided by the TO attribute.  If this attribute is not configured, there is no condition and the requirement is updated to the new status value (TO).

  • conditional expression

    • the condition must evaluate to a boolean value (true or false)

  TO <Transition>

Required:

This attribute provides the new status value.

  • code value

    • valid value comes from AsCodeRequirementStatus

  WORKFLOWTASKSTATUS <Transition>

Optional:

If the requirement is updated to a new status, all currently open (not closed) workflow tasks are updated to the status value provided by this attribute.

  • code value

    • valid value comes from AsCodeWorkflowTaskStatus

XML Schema

<Requirement>
    <States>
        <State STATUS="[code value]" SCHEDULE="[integer]" EXPIRE="[integer]">
            <Math>...</Math>
            <WorkflowTask CREATEONUSEREXECUTION="[No | Yes]">[workflow task name]</WorkflowTask> 
            <Rules>
                <Rule>[rule name]</Rule>
                <Rule>...</Rule>
            </Rules>
            <Transitions>
                <Transition IF="[conditional expression]" TO="[code value]" WORKFLOWTASKSTATUS="[code value]" />
                <Transition>...</Transition>
            </Transitions>
        </State>
        <State STATUS="[code value]" SCHEDULESECONDS="[integer]" EXPIRE="[integer]">...</State>
        <State>...</State>
    </States>
</Requirement>

XML Example

<Requirement>
    <States>
        <State STATUS="00">
            <Math>
                <MathVariables>
                    <MathVariable VARIABLENAME="Matched" TYPE="VALUE" DATATYPE="INTEGER">0</MathVariable>
                    <MathVariable VARIABLENAME="ReadyToOrder" TYPE="VALUE" DATATYPE="INTEGER">0</MathVariable>
                    <MathVariable VARIABLENAME="ClientGuidMV" TYPE="FIELD" DATATYPE="TEXT">Client:ClientGUID</MathVariable>
                    <MathVariable VARIABLENAME="PolicyGuidMV" TYPE="FIELD" DATATYPE="TEXT">Policy:PolicyGUID</MathVariable>
                    <MathVariable VARIABLENAME="ReacyToClearMV" TYPE="FIELD" DATATYPE="TEXT">Requirement:ReadyToClear</MathVariable>
                    <MathVariable VARIABLENAME="AgentNameMV" TYPE="SQL" DATATYPE="TEXT">SELECT FirstName || ',' || LastName FROM AsClient JOIN AsRole ON Asclient.ClientGUID= AsRole.ClientGUID AND AsRole.RoleCode = '82' AND PolicyGUID='[PolicyGuidMV]'</MathVariable>
                    <MathVariable VARIABLENAME="VerifyMIBAuthorization" TYPE="SQL" DATATYPE="TEXT">SELECT OptionText FROM AsClientField WHERE ClientGUID='[ClientGuidMV]' AND FieldName='MIBAuth'</MathVariable>
                </MathVariables>
            </Math>
            <Rules>
                <Rule>CopyToRequirementFields</Rule>
            </Rules>
            <Transitions>
                <Transition IF="VerifyMIBAuthorization = 'No'" TO="01"/>
                <Transition TO="02"/>
            </Transitions>
        </State>
        <State STATUS="01" SCHEDULE="5" END="1440">
            <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="ReadyToClearMV" TYPE="VALUE" DATATYPE="TEXT">No</MathVariable>
                    </MathIF>
                    <MathIF IF="IsEmpty(InsuredDLState)">
                        <MathVariable VARIABLENAME="ReadyToClearMV" TYPE="VALUE" DATATYPE="TEXT">No</MathVariable>
                    </MathIF>
                </MathVariables>
            </Math>
            <Rules>
                <Rule>CopyToRequirementFields</Rule>
                <Rule>AddRequirements</Rule>
            </Rules>
            <Transitions>
                <Transition IF="ReadyToClear = 'Yes'" TO="02"/>
            </Transitions>
        </State>
        <State STATUS="02" SCHEDULE="5" END="1440">
            <Math>
                <MathVariable VARIABLENAME="InquiryCompleteMV" TYPE="FIELD" DATATYPE="TEXT">RequirementResult:MIBInquiryComplete</MathVariable>
            </Math>
            <WorkflowTask>MIB Inquiry</WorkflowTask>
            <Transitions>
                <Transition IF="InquiryCompleteMV = 'True'" TO="03" WORKFLOWTASKSTATUS="CLOSED" />
            </Transitions>
        </State>
        <State STATUS="03">          
            <Transitions>
                <Transition TO="03" WORKFLOWTASKSTATUS="CLOSED" />
            </Transitions>
        </State>
        <State STATUS="05">          
            <Transitions>
                <Transition TO="05" WORKFLOWTASKSTATUS="CLOSED" />
            </Transitions>
        </State>
        <State STATUS="06">          
            <Transitions>
                <Transition TO="06" WORKFLOWTASKSTATUS="CLOSED" />
            </Transitions>
        </State>
        <State STATUS="98">          
            <Transitions>
                <Transition TO="98" WORKFLOWTASKSTATUS="CLOSED" />
            </Transitions>
        </State>
        <State STATUS="99">          
            <Transitions>
                <Transition TO="99" WORKFLOWTASKSTATUS="CLOSED" />
            </Transitions>
        </State>
        <State STATUS="DELETED">         
            <Transitions>
                <Transition TO="DELETED" WORKFLOWTASKSTATUS="CLOSED" />
            </Transitions>
        </State>
    </States>
</Requirement>