IBM Support

JR49290: CWLLG2041E "TW.*" IS NOT DEFINED ERROR WHEN EXECUTING JAVASCRIPT

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When executing a service which runs a javascript
    that is located in a different toolkit, an error occurs stating
    "tw.*" is undefined. Even when they are system defined APIs.
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  IBM BPM Express, Standard and Advanced      *
    *                  Edition.                                    *
    ****************************************************************
    * PROBLEM DESCRIPTION: CWLLG2041E "tw.*" is not defined        *
    *                      error when executing javascript.        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    The setup for this problem involves a PA containing
    javascript, and a Toolkit which contains a service which also
    contains javascript in an external file.  The PA invokes the
    service using one the two javascript methods:
    tw.system.executeServiceByName, or
    tw.system.model.findServiceByName().execute().  The toolkit
    service might receive the following error: CWLLG2041E "tw.*"
    is not defined error when executing javascript.
    

Problem conclusion

  • The BPM runtime uses the Rhino javascript implementation.
    Rhino specifies that there is only one active
    org.mozilla.javascript.Context object per thread.  When a
    service is invoked using tw.system.executeServiceByName, or
    tw.system.model.findServiceByName().execute(), it runs on the
    same thread as the invoker.  This caused the Rhino Context to
    carry old scope information from the PA into the toolkit
    service, which caused the error.  The solution is to exit the
    Rhino Context before invoking an external service.  This
    causes a new Rhino Context to be associated with the toolkit
    service.  Upon return from the toolkit service, the Rhino
    Context is restored to the original.
    An interim fix for 8.0.1.1 is available.
    On Fix Central (http://www.ibm.com/support/fixcentral), search
    for JR49290:
    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 JR49290, 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

Comments

APAR Information

  • APAR number

    JR49290

  • Reported component name

    BPM ADVANCED

  • Reported component ID

    5725C9400

  • Reported release

    801

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2014-02-07

  • Closed date

    2014-04-09

  • Last modified date

    2014-04-09

  • 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 ADVANCED

  • Fixed component ID

    5725C9400

Applicable component levels

  • R800 PSY

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSFTN5","label":"IBM Business Process Manager Advanced"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.0.1","Edition":"","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
09 April 2014