IBM Support

JR52531: A "CWLLG2041E "TW.*" IS NOT DEFINED" ERROR OCCURS WHEN THE TW.SYSTEM.STARTPROCESSBYNAME JAVASCRIPT RUNS

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • When you start a business process definition (BPD) from a
    service by using the  tw.system.startProcessByName method, you
    see an error  and stack trace that is similar to the following
    content if the BPD uses a JavaScript method from a managed file.
    
    E   CWLLG2041E:  TeamWorksJavaScriptException created
    non-nested.   Error: ÄTeamworksException name='ReferenceError',
    message='ReferenceError: "tw" is not defined. (scripts.js#2)',
    line=2, pos=0 nested=<none>Ü
                                     ÄTeamworksException
    name='ReferenceError', message='ReferenceError: "tw" is not
    defined. (scripts.js#2)', line=2, pos=0 nested=<none>Ü
     at com.lombardisoftware.core.script.js.JavaScriptRunner.
      execute(JavaScriptRunner.java:292)
     at com.lombardisoftware.core.script.js.JavaScriptRunner.
      evalScript(JavaScriptRunner.java:366)
     at com.lombardisoftware.component.common.workflow.
      ExecutionContext$1.call(ExecutionContext.java:593)
     at com.lombardisoftware.component.common.workflow.
      ExecutionContext$1.call(ExecutionContext.java:591)
     at com.lombardisoftware.component.common.workflow.
      ExecutionContext.doWithParams(ExecutionContext.java:727)
     at com.lombardisoftware.component.common.workflow.
      ExecutionContext.evalScript(ExecutionContext.java:591)
     at com.lombardisoftware.component.common.workflow.
      ExecutionContext.evalScript(ExecutionContext.java:585)
     at com.lombardisoftware.component.twscript.worker.
      ScriptWorker.doJob(ScriptWorker.java:66)
     at com.lombardisoftware.component.common.workflow.
      ExecutionJob.doJob(ExecutionJob.java:431)
     at com.lombardisoftware.server.ejb.workflow.
      EJBWorkflowManagerBean.doResumeWorkflowEngine
      (EJBWorkflowManagerBean.java:1313)
     at com.lombardisoftware.server.ejb.workflow.
      EJBWorkflowManagerBean.runProcess
      (EJBWorkflowManagerBean.java:560)
     at com.lombardisoftware.server.ejb.workflow.
      EJSRemoteStatefulEJBWorkflowManager_82478d70.
      runProcess(Unknown Source)
    

Local fix

Problem summary

  • Calling JavaScript code from different artifacts (in this case,
    a service implementation and BPD managed file) on the same
    thread can cause the individual code to run in the wrong
    JavaScript context and result in an error.
    

Problem conclusion

  • A fix is/will be available for IBM BPM that cleans the
    JavaScript context to prevent the error and reset the context
    to the original value after the JavaScript execution completes.
    
    On Fix Central (http://www.ibm.com/support/fixcentral), search
    for JR52531
    
    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 JR52531, 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

    JR52531

  • Reported component name

    BPM ADVANCED

  • Reported component ID

    5725C9400

  • Reported release

    801

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2015-02-09

  • Closed date

    2015-04-09

  • Last modified date

    2015-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 STANDARD

  • Fixed component ID

    5725C9500

Applicable component levels

  • R801 PSY

       UP

  • R850 PSY

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSFTDH","label":"IBM Business Process Manager Standard"},"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 2015