Andrey Chuyko [
http://community.jboss.org/people/chuiko.andrew] created the discussion
"Problems with usage python language in jpdl.xml"
To view the discussion, visit:
http://community.jboss.org/message/534173#534173
--------------------------------------------------------------
Hello everyone!
I am confused by usage of simple python script in jpdl.xml file.
For example :
<?xml version="1.0" encoding="UTF-8"?
<process name="ScriptText" xmlns="
http://jbpm.org/4.3/jpdl
http://jbpm.org/4.3/jpdl">
<start g="16,22,80,40">
<transition to="invoke script" />
</start>
<script name="invoke script" var="text" lang="python"
g="113,18,104,52">
<text>
*#!/usr/local/bin/python
# coding=utf-8
import sys
print "start test!"
testvar = 2 * 2 + 90;print "testvar=", testvar*
</text>
<transition to="wait" />
</script>
<state name="wait" g="266,18,80,52"/>
</process>
But I got that StackTrace
### EXCEPTION ###########################################
16:38:14,027 INF | [DefaultCommandService] exception while executing command
org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd@1bae5f5
org.jbpm.api.JbpmException: script evaluation error: NameError: +*name 'testvar'
is not defined in <script> at line number 6*+
What is this ? I can`t get the value of this variable!!!
Everyone could help me!?
Andrew
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/534173#534173]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]