Shared Attributes

This section describes about the Shared Attributes and its samples test scenarios.

Shared Attributes are used when two Products (parent to child and sibling) share the same attribute and its corresponding value and an update in the value of one needs to be reflected in the other. If an attribute is deemed as a shared attribute and when the value was passed on the order then during decomposition value is copied to the other products based on the EvaluationPriority set on the other products.

EvaluationPriority

Multiple products can have same shared attribute. Hence, if value for a shared attribute needs to be merged with same shared attribute in other products, user needs to define the EvaluationPriority, which indicates the priority of merging the specified characteristic from the target Product.

During plan development process, AOPD checks if characteristic (i.e. attribute) is of type 'Shared'; if yes then it checks the EvaluationPriority for the characteristic. If products mentioned on the EvaluationPriority have the same shared attribute, then the value for the characteristic is taken from the product. If none of the products mentioned on the EvaluationPriority have the same shared attribute OR EvaluationPriority is not defined, then the value is taken from order line (if passed in order line) or product model.

Second part of the Shared attribute definition mentions that update in the value of shared attribute in one product needs to be reflected in other products having same shared attribute.

During execution, the Process Component may need to update the attribute (UDF) values. To update the value of a UDF, the Process Component calls setPlanItem on TDS mentioning the UDFs to be updated. Process Component sends the following details for the UDF:

  1. name - name of the UDF to update
  2. value - updated value
  3. flavor - 'output' (this indicates that Process Component has updated the value from set/get methods), Input (this indicates that Process Component has updated the value from order line), Config (this indicates that Process Component has updated the value from Product model)
  4. type - Shared (if UDF is of type Shared)

On the subsequent calls to getPlanItems on TDS (Process Component may make this call to get details such as UDFs for plan items from TDS), TDS checks if requested plan items have any UDF (i.e. attributes) with type as 'Shared'. If Shared UDFs are present then TDS checks the EvaluationPriority for that UDF.

For the products mentioned on the EvaluationPriority, for each product (in the order of priority) TDS checks if it contains the UDF with same name and flavor = output. If TDS finds such UDF then value from this UDF is returned. If EvaluationPriority is not defined OR products mentioned on the EvaluationPriority do not contain the UDF with same name and "output" flavor then value from order line/product model is returned (i.e. merging is not done).