Using lookup or Yes/No variables from any record producer or Catalog item causes a Null Pointer Exception when reading through the history of the record. The following variable types can cause this issue:
- Lookup Select Box
- Lookup Multiple Choice
When using any of these variable types and submitting a record (or a Catalog item), any component using HistoryWalker against the record (or the catalog item) will fail. HistoryWalker is used mainly from the SLA Engine and the SLA Timeline.
Steps to Reproduce
Open the OOB record producer Emergency Change (sys_id: 389d27110a0a0b27004f344ed8a38ee4).
Create a new variable with following values:
- Type: Lookup Select box
- Catalog Item: Emergency Change
- Question: Choice
- Name: Choice
- Lookup from table: Change Request
- Lookup field: Urgency
On a change request, create a new SLA Definition with the following Start Condition:
- Type: Emergency
- Active: True
- Name: test PRB1251707
Navigate back to the Emergency Change record producer.
Click Try It and submit the change request.
In the Change Request form, make sure there is a Task SLA of the defined test PRB1251707.
Click Show SLA Timeline.
An NPE is shown.
The following example shows a sample Exception Stack Trace.
The line pointing at AbstractChoiceListQuestion.java is the sign that you are most likely affected by this issue.
Two Kingston patches contain a fix for this issue:
Kingston Patch 4 (KP4) contains the full fix for this issue.
Kingston Patch 3 (KP3) contains a fix that applies only to records submitted via record producers but not via Catalog Item (which resulting records are in Service Catalog tables such as sc_req_item and sc_task).
Related Problem: PRB1251707