APAR status
Closed as program error.
Error description
In IBM Rational ClearQuest (CQ) 7.1.1.x or 7.1.2.x, when invoking a VBscript CQ API call to BuildQuery (and possibly other API calls) with a reference to a record type (Entity Type) that does not exist, no error may be thrown to the screen, the hook may proceed without failure, and the record form will may proceed unhindered. An error should be visibly thrown indicating failure, the hook should fail, and the use of the action may be affected (fail). Steps to reproduce: 1) Use the Out Of The Box SAMPL Defect Tracking database. 2) Checkout the schema and add a field called "TestField" to Defect record type. 3) Add a FIELD_VALIDATION hook for the TestField, with the following VBscript hook: MsgBox "Field validation hook started" set sessionObj = GetSession set queryDefOBj = sessionObj.BuildQuery("Customer2") MsgBox "Done" ' where "Customer2" is a record type that does not exist 4) Save and checkin the schema or test work. 5) Perform a submit action on the Defect record type. Result: You will see a first message box indicating start, no failure on the screen, then a second message box indicating completion. If you perform a CQ core trace, in 7.1.x you will see the following error (not thrown on the screen): [CQ 16.375, 522] API: call OAdSession(1EE9568)::BuildQuery ("Customer2") [CQ 16.375, 523] Throw [CQ 16.406, 524] API Throw [CQ 16.406, 525] VBasic: 1EEF870::5::SmEntityExtension::OnScriptError: [CQ 16.406, 526] API: call OAdSession(1EE9568)::OnFinalRelease () [CQ 16.406, 527] API: dest OAdSession(1EE9568) [CQ 16.406, 528] VBasic: 1EEF870::3::SmEntityExtension::InvokeHook:error: [CQ 16.406, 529] VBasic: 1EEF870::3::SmEntityExtension::InvokeHook:error from COleException:
Local fix
Catch error through CQ core trace and perform hook code refinement. It is the responsibility of customers to thoroughly test their customized hook code for use with CQ. Please only invoke CQ API calls against record types (Entity types) that exist and will withstand being referenced. The current example is an illogical use of BuildQuery.
Problem summary
**************************************************************** * USERS AFFECTED: * **************************************************************** * PROBLEM DESCRIPTION: * **************************************************************** * RECOMMENDATION: * * Upgrade to ClearQuest 8.0.0.x or 8.0.1.x to address this * * situation on at least one workstation where you exercise and * * test your schema. * * * * Users need to thoroughly test their customized hook code for * * use with CQ. * * Thoroughly exercise your schema to catch this type of logic * * error. * * Thoroughly exercise your schema prior to upgrading all users * * to any Maintenance Release or higher patch level (CQ 8.0.0.0 * * is a Major Release, and 8.0.1.0 is a Maintenance Release). * **************************************************************** Resolution will also appear if a CQ core trace is performed as follows: [CQ 7.508, 284] API: call OAdSession(2F34D50)::BuildQuery ("Customer2") [CQ 7.509, 285] API Throw: A CException occurred: [CQ 7.509, 285] Unspecified error [CQ 7.518, 286] VBasic: 2FBDBD0::5::SmEntityExtension::OnScriptError:A CException occurred: [CQ 7.518, 286] Unspecified error [CQ 7.518, 287] API: call OAdSession(2F34D50)::OnFinalRelease () [CQ 7.519, 288] API: dest OAdSession(2F34D50) [CQ 7.519, 289] VBasic: 2FBDBD0::3::SmEntityExtension::InvokeHook:error: A CException occurred: [CQ 7.519, 289] Unspecified error [CQ 7.519, 290] VBasic: 2FBDBD0::3::SmEntityExtension::InvokeHook: Throwing exception A CException occurred: [CQ 7.519, 290] Unspecified error [CQ 7.519, 291] Throw: A CException occurred: [CQ 7.519, 291] Unspecified error [CQ 7.520, 292] Throw: A CException occurred: [CQ 7.520, 292] Unspecified error
Problem conclusion
Beginning in CQ 8.0.0.0 and 8.0.1.0 a visible error will be thrown, and the hook will fail execution (no second message box), for example: ERROR! CRMUD0081E Execution of a hook failed during the action Submit. It was the FIELD_VALIDATION hook of the field TestField, attached to the Defect "TEST00000002". The reason for the failure was: A CException occurred: Unspecified error Various aspects of the ClearQuest product were Enterprise hardened for the CQ 8 Release, including this type of error message catching.
Temporary fix
Comments
APAR Information
APAR number
PI20048
Reported component name
CLEARQUEST WIN
Reported component ID
5724G3600
Reported release
712
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2014-06-13
Closed date
2014-07-16
Last modified date
2014-07-16
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
CLEARQUEST WIN
Fixed component ID
5724G3600
Applicable component levels
R711 PSN
UP
R712 PSN
UP
[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSSH5A","label":"Rational ClearQuest"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.1.2","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]
Document Information
Modified date:
16 July 2014