Attribute-Based Decomposition
This functionality defines the decomposition rules along the relationship path for products. With the decomposition rule that is defined as XPATH logic, you can apply the defined logic along with the order.
This feature applies to the products having PCO, PDO, and PRF relationships.
The attribute-based decomposition can be applied if the following conditions are satisfied:
- The DECOMPOSITION attribute must exist in the product where the XPATH logic can be defined.
- The XPATH logic must exist (As the XPATH logic is evaluated to true or false).
Automated Order Plan Development supports two xpath evaluation patterns. If the xpath expression contains
$var//Product
, attribute-based decomposition is evaluated based on the old evaluation technique. If the xpath expression contains
$var/Order
, attribute-based decomposition is evaluated based on the new evaluation technique.
Evaluation expression with "Product"
The purpose of the logic can be to check for the user-defined fields or a particular product within the order.
Example:
exists($var//Product[udf[name='AccessType' and value='copper']]) exists($var//Product[name='PO_TV' and udf[name='AccessType' and value='copper']])
xml representation for the same expression is as follows:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <product> <!-- names are productid from every orderline of order > <name>PO_TV</name> <name>CFS_TV</name> <name>PRODUCT_TV</name><!-- udfs included based on flags and order input> <udf> <name>Name1</name> <value>Value1</value> </udf> <udf> <name>AccessType</name> <value>copper</value> </udf> <udf> <name>Name3</name> <value>Value3</value> </udf> </product>
The XPath for attribute-based decomposition can be used against the user-defined fields. The user-defined field considerations can also depend on flags such as
includeproductmodelcharacteristics
and
includeonlyproductorderline
.
Description of these flags are listed as follows:
includeproductmodelcharacteristics: By default this flag is false. The user-defined fields can come from orderline or the product model characteristics. Automated Order Plan Development configuration flag
includeproductmodelcharacteristics
is used to include product model characteristics for xpath execution. By default, product model characteristics are not considered.
includeonlyproductorderline: By default, this flag is false and it considers those orderline's user-defined fields from the order to check against whose Xpath must be executed that satisfies the following conditions:
- Have the same linkid with orderline bundle which is responsible for including the product instance in the plan.
- Product in orderline is a child of the evaluating product.
Alternatively it can also be made to execute only against the orderline from which the product is being decomposed by setting this flag to
true
, by default, which is
false
.
Example: You can define that Copper Access or Fiber Access process component must only be in the plan if the Access Type in the order is Copper or Fiber.
A simple scenario for attribute-based decomposition is described as follows:
Attribute-based decomposition of the product generated. The
DECOMPOSITION
characteristic for
F
and
E
contains a relationship value with
AccessType
set to either
F
or
E
. The Decomposition characteristic can contain complex XPATH logic, which can be used to determine which branch of the tree must be included in the final execution plan for the offering. The design takes into account the new product catalog characteristic called
DECOMPOSITION
. The decomposition engine processes the characteristics and determines which branch in the product hierarchy is required for the final execution plan.
If the order access type
E
is specified, then branch
F
is not included in the execution plan and
E
is included. If access type
F
is specified then
E
is not included in the execution plan and
F
is included in the plan.
Evaluation expression with "Order"
The logic can check user-defined fields along with productID in orderline within the order.
Example:
exists($var/Order/orderlines[productID='PO_TV1']/OrderlinesUDF[name='OLUDF_Name2' and value='OLUDF_Value2'] or $var/Order/orderlines[productID='PO_TV1']/OrderlinesUDF[name='OLUDF_Name1' and value='OLUDF_Value1'])It can also be evaluated against OrderHeaderUDF.
Example:
exists($var/Order/OrderHeaderUDF[name=UDFNAME and value="UDFVALUE"])
- As part of this extended behavior, now xpath evaluation is supported on the order object for attribute-based decomposition.
- The
com.tibco.af.aopd.flags.includeonlyproductorderline
flag is not supported when you choose to evaluate xpath on the order xml, as this flag was introduced to avoid line-udf linking conflict in xpath evaluation with "Product". With the new xpath evaluation technique there is no such conflict. includeproductmodelcharacteristics
flag is not supported when you choose to evaluate xpath on order xml, as product model characteristics, are not required when evaluating xpath using the order object.
When you are not evaluating xpath on the exact OrderRequest.xml
, which is submitted from a northbound-system as parsing the entire OrderRequest.xml
, it is performed on the following xml file. You can configure xpath from the following object xml representation:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <order> <businessTransactionID>Order_1</businessTransactionID> <currentTime>2022-01-14T16:40:57.071+05:30</currentTime> <customerref>CustomerRef 1</customerref> <jmsPriority>4</jmsPriority> <orderHeaderUDF> <name>HeaderUDFName1</name> <value>HeaderUDFValue1</value> </orderHeaderUDF> <orderHeaderUDF> <name>HeaderUDFName2</name> <value>HeaderUDFValue2</value> </orderHeaderUDF> <orderID>Order_1</orderID> <orderRef>Order_1</orderRef> <orderlines> <action>Provide</action> <dynamic>true</dynamic> <lineID>1</lineID> <lineUsed>true</lineUsed> <linkID>1</linkID> <linkParentID>1</linkParentID> <linkedParentID>1</linkedParentID> <offerId>offerID</offerId> <orderlinesUDF> <name>OLUDF_Name1</name> <value>OLUDF_Value1</value> </orderlinesUDF> <orderlinesUDF> <name>OLUDF_Name2</name> <value>OLUDF_Value2</value> </orderlinesUDF> <parentID>parentID</parentID> <productID>PO_TV1</productID> <quantity>1</quantity> <requiredByDate>2022-01-14T16:40:57.078+05:30</requiredByDate> <status>Pending</status> <subscriberID>Subscriber</subscriberID> <timeDelay>2022-01-14T16:40:57.078+05:30</timeDelay> </orderlines> <orderlines> <action>Provide</action> <dynamic>true</dynamic> <lineID>2</lineID> <lineUsed>true</lineUsed> <linkID>1</linkID> <linkParentID>1</linkParentID> <linkedParentID>1</linkedParentID> <offerId>offerID</offerId> <orderlinesUDF> <name>OLUDF_Name1</name> <value>OLUDF_Value1</value> </orderlinesUDF> <orderlinesUDF> <name>OLUDF_Name2</name> <value>OLUDF_Value2</value> </orderlinesUDF> <parentID>parentID</parentID> <productID>PO_TV2</productID> <quantity>2</quantity> <requiredByDate>2022-01-14T16:40:57.078+05:30</requiredByDate> <status>Pending</status> <subscriberID>Subscriber</subscriberID> <timeDelay>2022-01-14T16:40:57.078+05:30</timeDelay> </orderlines> <originator>Member1</originator> <parentID>Orphan</parentID> <requiredByDate>2022-01-14T16:40:57.078+05:30</requiredByDate> <rollback>true</rollback> <sessionID>Order_1</sessionID> <status>Execution</status> <timeDelay>1000</timeDelay> </order>With this order xml, you can generate custom xpath on all other order fields.