MaintainRelationships

MaintainRelationships rule is an attached Business Rule and is available in Rules Palette under the Global Rules Explorer -> Business Rules -> Attached Rules. The rule must be defined as a Transaction override and must be added to TransactionBusinessRulePacket in order for it to be executed by activity processing. The rule may be added to Policy or Client level transactions. On Policy level transactions, the rule can have a state override. The rule can contain a copybook for all or a portion of the configuration. For example, the rule might contain multiple <Relationship> elements and the full configuration of each element can be contained within its own copybook.

 

The MaintainRelationships rule allows an activity to create relationships between two OIPA Clients or Group Customers and defines the meaning of each relationship in the perspective of the clients or group customers. The rule also provides the creation of dynamic field data to save with the relationship.

MaintainRelationships: Elements and Attributes
Element Parent Element Attributes Description Element/Attribute Values

<MaintainRelationships>

 

 

The opening and closing elements of the MaintainRelationships Business Rule.

  

<Relationships> <MaintainRelationships>  

Required:

The structure to hold multiple relationships that will be updated.

 
<Relationship> <Relationships>  

Required, Repeatable:   

A structure to update a single relationship.

 

<Relationship> PRIMARYGUID

Required:   

The attribute holds the GroupCustomerGUID or ClientGUID that is the primary client or group customer in this relationship.

Math variable, field or literal code value

<Relationship>

SECONDARYGUID

Required:

This attribute holds the GroupCustomerGUID or ClientGUID that is the secondary client or group customer in this relationship.

Math variable, field or literal code value

<Relationship>

PRIMARYTYPE

Required:

The attribute holds a code value for the primary relationship type of the two entities. Code values are defined by AsCodePrimaryRelationshipType.

Math variable, field or literal code value

<Relationship>

SECONDARYTYPE 

Required:

The attribute holds a code value for the secondary relationship type of the two entities. Code values are defined by AsCodeSecondaryRelationshipType.

Math variable, field or literal code value

<Relationship>

EFFECTIVEFROM

Required:

Defines the start date for the relationship. This must be a date value.

Math variable, field or literal code value

<Relationship>

RECORDSTATUSCODE

Optional:

The attribute holds the record status code for the relationship. Allowed values are DRAFT and ACTIVE which are defined in AsCodeChangeStatus. Default value is ACTIVE.

Math variable, field or literal code value

<Relationship>

BUSINESSSTATUSCODE

Optional:

The attribute holds the business status code for the relationship. Allowed values are defined in AsCodeClientRelationshipBusinessStatus. When the attribute is not configured, a null is saved to the database.

Math variable, field or literal code value

<Tests>

<Relationship>

 

Optional:

The element defines the section holding the tests to determine when the relationship record is to be created.

 

<Test> <Tests>

 

Required, Repeatable:

Standard conditional expression comparing values from the activity’s Math and Field sections.

condition

<Fields> <Relationship>

 

Optional:

The element defines a structure holding the dynamic relationship fields that are inserted by executing the rule.

 

<Field>

<Fields>

 

Required, Repeatable:

The element defines a structure that identifies a field and its initial value that are inserted.

 

<From>

<Field>

 

Required:

The element defines the source of the value that will be the saved value for the field.

Math variable, field or literal code value

<To>

<Field>

 

Required:

The element identifies the target field by its name that will be inserted with the source value.

literal

XML Schema

<MaintainRelationships>
<Relationships>
<Relationship PRIMARYGUID="[variable | field]" SECONDARYGUID="[variable | field]" PRIMARYTYPE="[variable | literal code]" SECONDARYTYPE="[variable | literal code]" EFFECTIVEFROM="[variable | field]" RECORDSTATUSCODE="[variable | code | literal code]" BUSINESSSTATUSCODE="[variable | code | literal code]">
<Tests>
<Test>[condition]</Test]
<Test>...</Test>
</Tests>
<Fields>
<Field>
<From>[variable | field]</From>
<To>[literal]</To>
</Field>
<Field>...</Field>
</Fields>
</Relationship>
<Relationship>...</Relationship>
</Relationships>
</MaintainRelationships>

XML Example

<MaintainRelationships>
<Relationships>
<Relationship PRIMARYGUID="PrimaryRelationshipClientGUIDMV" SECONDARYGUID="SecondaryRelationshipClientGUIDMV" PRIMARYTYPE="PrimaryRelationshipTypeMV" SECONDARYTYPE="SecondaryRelationshipTypeMV" EFFECTIVEFROM="EffectiveDateMV" RECORDSTATUSCODE="RecordStatusMV" BUSINESSSTATUSCODE="BusinessStatusMV">
<Fields>
<Field>
<From>EmployeeSalaryMV</From>
<To>EmployeeSalary</To>
</Field>
</Fields>
</Relationship>
</Relationships>
</MaintainRelationships>