Association

<< Click to Display Table of Contents >>

Navigation:  Bizagi Studio > Process wizard > Define Forms > Form Controls >

Association

Use

The Association Control is used to handle Multiple-Multiple relationships. This control allows to easily relate values from one collection to one or more values of another collection.

 

To relate them, the Association control displays the values of the Main entity as groups and the ones of the other entity as records within them. A check box on the left of each record allows associating them in their corresponding group (value of the other entity).

 

Forms Components199

 

In the next image an Association control relates the Products of a Credit request with the Guarantees presented by the requester.

The Basic mortgage and the Basic Vehicle guarantees are related to the Credit product.

The Account and the Credit card products have no guarantees related.

 

 

Forms Components200

 

Considerations

To use an Association Control the Data model must contain:

A Collection A (Main collection), in the image below Products Request.

A Collection B (Secondary collection), in the image below Collaterals Request.

Multiple-Multiple relationship between Collection A and the Collection B.

 

Forms Components197

 

Related to attribute types

Association control is related to Collections that have a multiple-multiple relationship within them.

 

Properties

The following properties are exclusive to the Association control:

 

Basic tab

 

PROPERTY

DESCRIPTION

Allow Flip

Allows to temporarily switch the order between the Main collection and the Secondary collection defined in the Form.

 

Forms Components196

 

Configuration

PROPERTY

DESCRIPTION

Main collection

Left collection Xpath: Relates the Xpath of the Main collection.

Left display attrib: Defines the Xpath of the attribute that is displayed to identify the records of the Main collection.

Left additional attrib: Defines the Xpath of the additional attribute that is displayed to identify the records of the Main collection.

Left filter: Allows defining filters over the records displayed in the association control for the Main collection. Advanced filters (defined by rules) are not supported.

  For further information please refer to Filters.

Left header: Defines the header that identifies the Main collection.

Secondary collection

Right collection Xpath: Relates the Xpath of the Secondary collection.

Right display attrib: Defines the Xpath of the attribute that is displayed to identify the records of the Secondary collection.

Right additional attrib: Defines the Xpath of the additional attribute that is displayed to identify the records of the Secondary collection.

Right filter: Allows defining filters over the records displayed in the association control for the Secondary collection. Advanced filters (defined by rules) are not supported.

  For further information please refer to Filters.

Right header: Defines the header that identifies the Secondary collection.

 

Example

In a Credit Request process, each Request has many Products and also has many Guarantees. A Guarantee can cover one or more Products and one Product can be covered by one or more Guarantees. The related Data Model is shown below:

 

 

Forms Components197

 

To define which Guarantee covers which Products, and which Product are covered by which Guarantees, the Association Control is used.

Follow the next steps to configure it:

 

1. Go to the Forms Designer and drag and drop an Association Control from the Controls tab.

 

Forms Components194

 

2. When the Control is dragged, a window will pop-up.

 

Forms Components195

 

Enter the configuration information:

Left collection Xpath: Select the Xpath to the collection that contains the records to be displayed for the main entity. In this case the Products collection.

Left display attribute: Select the Xpath to the attribute of the collection to be displayed. In this case the idProductSubtype.Name attribute.

Left filter: In this case no filter is required.

Left header: Type "Products".

 

Right collection Xpath: Select the Xpath to the collection that contains the records to be displayed on the right of the Control. In this case the Guarantees collection.

Right display attrib: Select the Xpath to the attribute of the collection to be displayed. In this case the idCollateralSubtype.Name attribute.

Right filter: In this case no filter is required.

Right header: Type "Guarantees".

 

Forms Components201

 

 

3. Go to the Work Portal to test the Control.

In order to view records in the Control, there MUST be records added in each entity. In this case we have:

 

Product entity: Account, credit and credit card.

Guarantee entity: Basic mortgage, basic pledge and basic vehicle.

 

 

Forms Components198

 

Check the desired values according to which you wish to relate to establish the relation.

 

Forms Components202