cancel
Showing results for 
Search instead for 
Did you mean: 

Setting attributes mandatory/optional based on matrix result

former_member217396
Participant
0 Kudos

Hi all,

we have another requirement, straight from the space ...

Our customer want to have the possibility, to mark an attribute ( in by setting an additional flag on attribute level) in a LDM model as mandatory/conditional/optional.

Simply saying, we need to find a way, how we can calculate this flag based on a matrix.

He wants to create a matrix per attribute where he will define the combination of f.e. 2-3 dimensions an the result of the matrix/flag, f.e.:

For attribute Entity1.Attribute2

Dim B

Dim A X Y Z

1 M C O

2 C M C

3 O O M

So, if the configuration for Entity1.Attribute2 is DimA=1 and DimB=X, the flag is set to M (mandatory), if the combination is DimA=2 and DimB=Z, the flag is set to C (conditional).

There is no predefined numbr of possible dimensions and combinations. The logic can't be hard-coded, as the customer want's to have the possibility, to change the matrix at any time and recalculate the flags.

Has anyone ever tried to implement such an requirement in PD? If yes, how to start ...?

BR & thanks in advance!

Rafal

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member217396
Participant
0 Kudos

Thanks for your suggestion.  

I would like to give it another go - Here is a more detailed example of our clients request: 

The decision if a given attribute has to be set as mandatory/conditional/optional is based on several factors (which are classified into "dimensions"). 

The number of these dimensions is quite low (three dimensions) but will be extended in the future and shouldn't be limiting. 

Here is an example: In the context of a business partner type A (Dimension: business partner types), of business role type Y (dimension: business partner roles) and the business is of type Z (dimension: business types), a certain attribute C will be set to mandatory. 

Each dimensions consists of different criteria, which form a catalogue. The combination of one criteria of each dimension forms a package of criteria, which will be linked to one the three classification (mandatory/conditional/optional) and also to the corresponding attributes. The combination of criteria is random (so each criteria can be in several packages) but there can only be one criteria of each dimension in a package, also the combination of criteria has to be unique.  

Our idea was to represent the criteria itself as requirements, and sort them in folders sorted by the different dimensions they belong to. We would then create a traceability link between the criteria requirements to the criteria package they are sorted in. The Packages would be put into another requirment model. The packages would be then connected to the attributes via outgoing traceability links which carry the information if the attribute is mandatory etc. as either a link type or as an extended attribute. 

Do you see any problems in this approach?

GeorgeMcGeachie
Active Contributor
0 Kudos

I can't quite follow your example, as it's not a real world example, but here goes anyway. 🙂

Could you use Business Rules to represent your 'matrix' connections, and then have a script that populates an extended attribute with different values depending on the Business Rules it is or isn't attached to? You say that you can't hard-code the logic in the script, so, could the result depend on extended attributes defined on the Business Rules? e.g. set value to 'M' if the attribute is attached to more than 3 Business Rules with value 'M'?