Support Article
Compose behavior incorrect
Summary
A report definition is present in a data flow as a secondary source to compose a shape. A criteria to match Vehicle ID (VEH_ID) is present in the compose. The compose generates a query with a Where clause as below if a matching VEH_ID is present in the secondary source:
Performing query: SELECT "PC0"."VEH_ID" AS "VEH_ID" , "PC0"."USED_QTY" AS "USED_QTY" , "PC0"."CHANNEL_TYP_CD" AS "CHANNEL_TYP_CD" , "ONS_SVC"."SVC_CD" AS "SVC_CD" , "PC0"."SVC_ID" AS "SVC_ID" FROM PEGTEST.ONS_VEH_SVC_CHANNEL "PC0" INNER JOIN PEGTEST.ONS_SVC "ONS_SVC" ON ( ( "PC0"."SVC_ID" = "ONS_SVC"."ID" ) ) WHERE ( ( ( "PC0"."VEH_ID" = ? ) ) ) ORDER BY 3 ASC, 4 ASC
Pega generates incorrect query if a matching VEH_ID is not present in the secondary source. The compose pulls all records from the table into the memory crashing the JVM. The query generated in-case of VEH_ID that does not match is as below:
Performing query: SELECT "PC0"."VEH_ID" AS "VEH_ID" , "PC0"."USED_QTY" AS "USED_QTY" , "PC0"."CHANNEL_TYP_CD" AS "CHANNEL_TYP_CD" , "ONS_SVC"."SVC_CD" AS "SVC_CD" , "PC0"."SVC_ID" AS "SVC_ID" FROM PEGTEST.ONS_VEH_SVC_CHANNEL "PC0" INNER JOIN PEGTEST.ONS_SVC "ONS_SVC" ON ( ( "PC0"."SVC_ID" = "ONS_SVC"."ID" ) ) ORDER BY 3 ASC, 4 ASC
Where condition is not present in the above queries for the failed scenarios.
Error Messages
Not Applicable
Steps to Reproduce
- Create contacts table with two columns (contactid and contactname)
- Add four records:
(1,'C1'),(2,'C2'),(3,'C3'),(4,'C4') - Create a Pega class and map it to the table
- Create 'AllContactsRD' report definition
- Create 'AllContacts' database dataset
- Create the below dataflow:
AllContacts>Compose with AllContactsRD>Abstract - Run the dataflow for the contactid that does not match
Root Cause
A defect in Pegasystems’ code or rules.
Resolution
Apply HFix-41311.
Published May 10, 2019 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.