IBM Support

JR53092: YOU RECEIVE AN ARRAYINDEXOUTOFBOUNDSEXCEPTION WHEN INDEXES CONTAIN NEGATIVE VALUES ON TWObject.listAddSelected

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When you use TWObject.listAddSelected to add an index to the
    list of selected indexes, negative values are not prevented from
    being used and you receive an ArrayIndexOutOfBoundsException
    when the negative value is read and used to access any kind of
    array.
    
    Invoke tw.system.currentProcessInstance.businessData
    via the JS API within a nested service (multiple levels from
    the context of a process instance):
    
    tw.local.backOffice =
    tw.system.currentProcessInstance.businessData.get("backOfficeRou
    tingData.BackOffice3.name");
    
    
    By calling the statement above we recieve an exception: Wrapped
    com.lombardisoftware.client.delegate.BusinessDelegateException:
    Index:
    -1, Size: 9 (<JSScript>#1).
    
    [3/12/15 10:04:38:781 CET] 00000523 wle           E
    CWLLG2015E:  An unexpected runtime exception occurred. See
    exception for more details.
    Error : Wrapped
    com.lombardisoftware.client.delegate.BusinessDelegateException:
    Index: -1, Size: 9 (<JSScript>#1).
    
    org.mozilla.javascript.WrappedException: Wrapped
    com.lombardisoftware.client.delegate.BusinessDelegateException:
    Index: -1, Size: 9 (<JSScript>#1)
            at
    org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.ja
    va:1773)
            at
    org.mozilla.javascript.MemberBox.invoke(MemberBox.java:183)
            at
    org.mozilla.javascript.ScriptableObject.getImpl(ScriptableObject
    .java:2020)
            at
    org.mozilla.javascript.ScriptableObject.get(ScriptableObject.jav
    a:287)
            at
    com.lombardisoftware.core.script.js.TWProcessInstanceScriptable.
    get(TWProcessInstanceScriptable.java:130)
    ...
    at
    com.lombardisoftware.client.delegate.BPDInstanceAPIDelegateDefau
    lt.getBusinessData(BPDInstanceAPIDelegateDefault.java:119)
            ... 73 more
    .
    Caused by:
    com.lombardisoftware.client.delegate.BusinessDelegateException:
    Index:
    -1, Size: 9
            at
    com.lombardisoftware.client.delegate.BusinessDelegateException.a
    sBusinessDelegateException(BusinessDelegateException.java:41)
    .
    Caused by: java.lang.IndexOutOfBoundsException: Index: -1, Size:
    9
            at java.util.ArrayList.get(ArrayList.java:352)
            at
    com.lombardisoftware.core.TWObject.listSelected(TWObject.java:10
    58)
    

Local fix

Problem summary

  • No additional information is available.
    

Problem conclusion

  • A fix is/will be available for IBM BPM that changes when you
    see the ArrayIndexOutOfBounds exception. With the fix applied,
    you receive this exception when you try to add negative indexes
    by using TWObject.listAddSelected instead of when the index
    value is used somewhere else in the code to access an array
    field with that negative index value. In addition, with the fix
    applied you get the exact line number of your script when you
    receive the exception, which helps you debug faster.
    
    On Fix Central (http://www.ibm.com/support/fixcentral), search
    for JR53092:
    
    1. Select IBM Business Process Manager with your edition from
      the product selector, the installed version to the fix pack
      level, and your platform, and then click Continue.
    
    2. Select APAR or SPR, enter JR53092, and click Continue.
    
    When you download fix packages, ensure that you also download
    the readme file for each fix. Review each readme file for
    additional installation instructions and information about the
    fix.
    

Temporary fix

  • Not applicable
    

Comments

APAR Information

  • APAR number

    JR53092

  • Reported component name

    BPM ADVANCED

  • Reported component ID

    5725C9400

  • Reported release

    801

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2015-04-13

  • Closed date

    2015-06-16

  • Last modified date

    2015-12-21

  • 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

    BPM STANDARD

  • Fixed component ID

    5725C9500

Applicable component levels

  • R801 PSY

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSFTDH","label":"IBM Business Process Manager Standard"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.0.1","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
16 October 2021