Add “LinkParentID” UDF to the order line containing the Parent product and choose a value.
Add “LinkedParentID” UDF to the order line containing the child product and assign it the same value given to “LinkParentID” UDF in the order line of the parent product.
Example:
Consider we have :
PROD_A (PCO)--->PROD_B (AP=false)
PROD_A (PCO)--->PROD_C (AP=false)
PROD_B (PCO)--->PROD_C (AP=false)
The submitted request contains below orderlines:
======
<ord1:line>
<ord1:lineNumber>1</ord1:lineNumber>
<ord1:productID>PROD_A</ord1:productID>
......
<ord1:udf>
<ord1:name>LinkParentID</ord1:name>
<ord1:value>Var1</ord1:value>
</ord1:udf>
<ord1:udf>
<ord1:name>LinkedParentID</ord1:name>
<ord1:value></ord1:value>
</ord1:udf>
</ord1:line>
<ord1:line>
<ord1:lineNumber>2</ord1:lineNumber>
<ord1:productID>PROD_B</ord1:productID>
.....
<ord1:udf>
<ord1:name>LinkParentID</ord1:name>
<ord1:value>MyVal</ord1:value>
</ord1:udf>
<ord1:udf>
<ord1:name>LinkedParentID</ord1:name>
<ord1:value>Var1</ord1:value>
</ord1:udf>
</ord1:line>
<ord1:line>
<ord1:lineNumber>3</ord1:lineNumber>
<ord1:productID>PROD_C</ord1:productID>
.....
<ord1:udf>
<ord1:name>LinkParentID</ord1:name>
<ord1:value>ADM</ord1:value>
</ord1:udf>
<ord1:udf>
<ord1:name>LinkedParentID</ord1:name>
<ord1:value>MyVal</ord1:value>
</ord1:udf>
</ord1:line>
=========
This means that PROD_C is child of PROD_B and not of PROD_A. This way, a dependency will be created in execution plan between plan items of PROD_A/PROD_B and between those of PROD_B/PROD_C. Therefore, order of execution will be : PROD_C, PROD_B and at last PROD_A.
Find in the attachments to this KB (Filenames: ExecPlan1.png, ExecPlan2.png, ExecPlanRequest1.xml, ExecPlanRequest2.xml, Product_Model.png, Request1.xml, Request2.xml) a request and execution plan for this example and also another example.