5 Replies Latest reply: Jan 20, 2010 3:01 AM by 843830 RSS

    The Javascript Assign function in BPEL. JBI. Open ESB.

    843830
      Hi.

      I'm really struggling with the javascript element (Extensible assign) and its basic functionality.
      And there is very very little documentation or examples on it.

      All i want to do for now is assign a variable from BPEL to a Jscript variable, and then assign that same variable back to the output BPEL variable and then log it.

      Doesn't make much sense, it should be pretty straight forward. This functionality is really poorly documented and it is frustrating.
      If anyone has used this function before please assist me or point me to some documentation.

      Thanks in advance.


      It is giving me the following error:

      BPCOR-6151: The process instance has been terminated because a fault was not handled; Fault Name is {http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling}systemFault; Fault Data is <?xml version="1.0" encoding="UTF-8"?><jbi:message xmlns:sxeh="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling" type="sxeh:faultMessage" version="1.0" xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"><jbi:part>ReferenceError: "System" is not defined. (extensionAssignOperation.Expression#2)</jbi:part></jbi:message>
      com.sun.jbi.engine.bpel.core.bpel.exception.SystemException: I18N: Error in executing extensionAssignOperation
      at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.AssignUnitImpl.executeExtensionAssignOperation(AssignUnitImpl.java:857)
      at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.AssignUnitImpl.doAction(AssignUnitImpl.java:169)
      at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.CodeReUseHelper.executeChildActivities(CodeReUseHelper.java:65)
      at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.StructuredActivityUnitImpl.executeChildActivities(StructuredActivityUnitImpl.java:193)
      at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.StructuredActivityUnitImpl.doAction(StructuredActivityUnitImpl.java:93)
      at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.SequenceUnitImpl.doAction(SequenceUnitImpl.java:95)
      at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.CodeReUseHelper.executeChildActivities(CodeReUseHelper.java:65)
      at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.StructuredActivityUnitImpl.executeChildActivities(StructuredActivityUnitImpl.java:193)
      at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.BPELProcessInstanceImpl.doAction(BPELProcessInstanceImpl.java:650)
      at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELInterpreter.execute(BPELInterpreter.java:162)
      at com.sun.jbi.engine.bpel.core.bpel.engine.BusinessProcessInstanceThread.execute(BusinessProcessInstanceThread.java:98)
      at com.sun.jbi.engine.bpel.core.bpel.engine.impl.BPELProcessManagerImpl.process(BPELProcessManagerImpl.java:1031)
      at com.sun.jbi.engine.bpel.core.bpel.engine.impl.EngineImpl.process(EngineImpl.java:289)
      at com.sun.jbi.engine.bpel.core.bpel.engine.impl.EngineImpl.process(EngineImpl.java:1291)
      at com.sun.jbi.engine.bpel.BPELSEInOutThread.processRequest(BPELSEInOutThread.java:566)
      at com.sun.jbi.engine.bpel.BPELSEInOutThread.processMsgEx(BPELSEInOutThread.java:290)
      at com.sun.jbi.engine.bpel.BPELSEInOutThread.run(BPELSEInOutThread.java:183)
      Caused by: org.mozilla.javascript.EcmaError: ReferenceError: "System" is not defined. (extensionAssignOperation.Expression#2)
      at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3557)
      at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3535)
      at org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3620)
      at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1652)
      at org.mozilla.javascript.gen.c16._c0(extensionAssignOperation.Expression:2)
      at org.mozilla.javascript.gen.c16.call(extensionAssignOperation.Expression)
      at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:401)
      at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3003)
      at org.mozilla.javascript.gen.c16.call(extensionAssignOperation.Expression)
      at org.mozilla.javascript.gen.c16.exec(extensionAssignOperation.Expression)
      at org.mozilla.javascript.Context.evaluateString(Context.java:1088)
      at com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.AssignUnitImpl.executeExtensionAssignOperation(AssignUnitImpl.java:777)
      ... 16 more