[jboss-user] [jBPM] - Problems with usage python language in jpdl.xml

Andrey Chuyko do-not-reply at jboss.com
Mon Mar 29 15:48:42 EDT 2010

Andrey Chuyko [http://community.jboss.org/people/chuiko.andrew] replied to the discussion

"Problems with usage python language in jpdl.xml"

To view the discussion, visit: http://community.jboss.org/message/534492#534492

Thahks,  http://community.jboss.org/people/rebody Huisheng Xu  for your replay!! But I`ve included python factory into +*jbpm.default.scriptmanager.xml*+.
I`ve done it as this one - +*<script-language name="python" factory="org.python.jsr223.PyScriptEngineFactory" />*+.

And i checked it debuging code. So, in the class org.jbpm.pvm.internal.script.ScriptManager in the method evaluate(String script, String language)
I`ve got object *ScriptEngine = org.python.jsr223.PyScriptEngine at 6ca716*
which have *object interp = org.python.util.PythonInterpreter at 17cd18d*
and *object factory = org.python.jsr223.PyScriptEngineFactory at f92541.* 

*+<script name="invoke script" var="text" lang="python" g="113,18,104,52">
<text>import sys;print "start test!";testvar1 = 2 * 2 + 90;print "testvar1=", testvar1</text>
<transition to="wait" />
By this means that python is visible in jpdl.xml. But when evaluate(ScriptEngine scriptEngine, String script) is run then throw Exception
javax.script.ScriptException: NameError: name 'testvar1' is not defined in <script> at line number 1. For some reason variables can`t be remembered.

May be I try to use wrong factory +*org.python.jsr223.PyScriptEngineFactory???
If somebody hade met with this strangeness.

Thanks alot for replies!!! Andrew


Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100329/f5505020/attachment.html 

More information about the jboss-user mailing list