Plan generation fails with "PLANFRAGMENT_MAPPING_NOT_FOUND" error
book
Article ID: KB0072141
calendar_today
Updated On:
Products
Versions
TIBCO Order Management
5.x
Description
Let's deal with this use case using an example: Submit order: -productid=B -action=UPDATE
After submitting this order, plan generation fails and below errors are logged: === 20 juil. 2022 18:37:29,111 ERROR [] [ORDER_2] [Member1] [com.tibco.aff.aopd.types.plan.PlanItem] [setMainPlanFragments] - [ThreadID:221] [Tenant ID:TIBCO] Planfragment mapping not found in the product Model [B] and action [UPDATE]in Main or Affinity Plan fragments. 20 juil. 2022 18:37:29,166 ERROR [] [ORDER_2] [Member1] [com.tibco.aff.aopd.engine.RuleExecutionController] [generateAOPDPlanReply] - [ThreadID:221] [Tenant ID:TIBCO] Exception while creating execution plan while decomposing order for orderID [1075] , orderref [ORDER_2] : [TIBCO-AFF-AOPD-100004] - Planfragment mapping not found in the product Model [B] and action [UPDATE]in Main or Affinity Plan fragments. : com.tibco.aff.aopd.rule.action.RuleExecutionException: PLANFRAGMENT_MAPPING_NOT_FOUND at com.tibco.aff.aopd.types.plan.PlanItem.setMainPlanFragments(PlanItem.java:1165) at com.tibco.aff.aopd.types.plan.PlanItem.setPlanItemFragments(PlanItem.java:1108) at com.tibco.aff.aopd.rule.action.PopulatePlanItemAction.setPlanItemData(PopulatePlanItemAction.java:144)
.... ===
Please refer to the attached omsServer-local.log file for the full logs.
Environment
ALL
Resolution
This issue occurred because of a misconfiguration in the catalog; there is no plan fragment associated to "UPDATE" action for the product "B" in the catalog. Hereafter, a snippet of the catalog configuration: === <ns0:Product> <ns0:productId>B</ns0:productId> <ns0:description/> <ns0:owner/> </ns0:Product> <ns0:startDate>2021-11-17T20:31:54+05:18</ns0:startDate> <ns0:endDate>2021-11-17T20:31:54+05:18</ns0:endDate> <ns0:planFragments> <ns0:planFragmentUniqueId_CANCEL> <ns0:name>PF_CANCEL</ns0:name> <ns0:description> CANCEL</ns0:description> </ns0:planFragmentUniqueId_CANCEL> <ns0:planFragmentUniqueId_PROVIDE> <ns0:name>PF_PROVIDE</ns0:name> <ns0:description> PROVIDE</ns0:description> </ns0:planFragmentUniqueId_PROVIDE> <ns0:planFragmentUniqueId_CEASE> <ns0:name>PF_CEASE</ns0:name> <ns0:description> CEASE</ns0:description> </ns0:planFragmentUniqueId_CEASE> </ns0:planFragments> <ns0:affinityPlanFragments> <ns0:planFragmentUniqueId_CANCEL> <ns0:name/> <ns0:description> AFFINITY CANCEL</ns0:description> </ns0:planFragmentUniqueId_CANCEL> <ns0:planFragmentUniqueId_PROVIDE> <ns0:name/> <ns0:description> AFFINITY PROVIDE</ns0:description> </ns0:planFragmentUniqueId_PROVIDE> <ns0:planFragmentUniqueId_CEASE> <ns0:name/> <ns0:description> AFFINITY CEASE</ns0:description> </ns0:planFragmentUniqueId_CEASE> </ns0:affinityPlanFragments> ===
So to fix the issue, configure UPDATE action for the product B and reload the catalog. See below example:
For more details, please refer to the attached Correct_PRODUCTMODEL.xml and Wrong_PRODUCTMODEL.xml files that show product B configuration.
This behavior is also valid for the other actions (cancel, provide, cease); if not properly configured, then this error will be encountered.
Issue/Introduction
This KB article deals with plan generation failure due to the error:
===
[TIBCO-AFF-AOPD-100004] - PLANFRAGMENT_MAPPING_NOT_FOUND : com.tibco.aff.aopd.rule.action.RuleExecutionException: PLANFRAGMENT_MAPPING_NOT_FOUND
===
Attachments
Plan generation fails with "PLANFRAGMENT_MAPPING_NOT_FOUND" errorget_app
Plan generation fails with "PLANFRAGMENT_MAPPING_NOT_FOUND" errorget_app
Plan generation fails with "PLANFRAGMENT_MAPPING_NOT_FOUND" errorget_app