Notifications

841 views

Description

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:

  • Yes/No 
  • 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

 

  1. Open the OOB record producer Emergency Change (sys_id: 389d27110a0a0b27004f344ed8a38ee4).

  2. 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
  3. On a change request, create a new SLA Definition with the following Start Condition:

    • Type: Emergency
    • Active: True
    • Name: test PRB1251707
  4. Navigate back to the Emergency Change record producer.

  5. Click Try It and submit the change request.

  6. In the Change Request form, make sure there is a Task SLA of the defined test PRB1251707.

  7. Click Show SLA Timeline.

    An NPE is shown.

    The following example shows a sample Exception Stack Trace.

    com.glideapp.questionset.AbstractChoiceListQuestion.setDisplayValue(AbstractChoiceListQuestion.java:48) 
    com.glide.vars2.Variable.setDisplayValue(Variable.java:45) 
    com.glide.script.glide_elements.GlideElementGlideObject.setDisplayValue(GlideElementGlideObject.java:228) 
    com.glide.script.AbstractHistoryWalker.copyVariable(AbstractHistoryWalker.java:578) 
    com.glide.script.AbstractHistoryWalker.copyElements(AbstractHistoryWalker.java:382) 
    com.glide.script.AbstractHistoryWalker.copyElements(AbstractHistoryWalker.java:299) 
    com.glide.script.AbstractHistoryWalker.getWalkedRecord(AbstractHistoryWalker.java:268) 
    com.glide.script.fencing.ScopedHistoryWalker.jsFunction_getWalkedRecord(ScopedHistoryWalker.java:157) 
    sun.reflect.GeneratedMethodAccessor1305.invoke(Unknown Source)

    The line pointing at AbstractChoiceListQuestion.java is the sign that you are most likely affected by this issue.

 

Workaround

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

Seen In

Kingston

Fixed In

Kingston Patch 3
Kingston Patch 4
London

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-07-26 23:24:51
Published:2018-05-14