cancel
Showing results for 
Search instead for 
Did you mean: 

After update activiti to 5.16.3,the scripttask doesn't work

fielixlv
Champ in-the-making
Champ in-the-making
When I update activiti 5.15 to 5.16.3, the process that deployed before can't be started.

There is one  script tasks and i call rpc with groovy,as follow:
   println("############ lock_devices jsonrpc.invoke ############")
   res = jsonrpc.invoke('act_lock_devices',[operator:sponsor,orderIdSmiley Surprisedrder_id,svrId:svrid_list])
   println("lock_devices res=${res}")
   execution.setVariableLocal("lockFlag",res[0])
   execution.setVariableLocal("lockMsg",res[1])

And the jsonrpc is configed in xml file:
<bean class="com.tencent.yunoss.JsonrpcBean" id="jsonrpc">
    <property value="http://ip/jsonrpc" name="baseUrl"/>
  </bean>

when i start the process , the exception is throwed:
07:43:47,524 [http-bio-8080-exec-8] WARN  org.activiti.engine.impl.bpmn.behavior.ScriptTaskActivityBehavior  - Exception while executing lockdevices_st : problem evaluating script: javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: jsonrpc for class: Script1

and when i set the script task  activiti:async="true", and redeploy the process, the exception disappeared。

why??




3 REPLIES 3

fielixlv
Champ in-the-making
Champ in-the-making
And the jsonrpc is configed in xml file:
<bean class="com.tencent.yunoss.JsonrpcBean" id="jsonrpc">
    <property value="http://ipSmiley Tongueort" name="baseUrl"/>
  </bean>

martin_grofcik
Confirmed Champ
Confirmed Champ
Could you create jUnit test for it please?

jbarrez
Star Contributor
Star Contributor
As Martin says, can you provide a failing test that demonstrates this problem? We can't do a lot with a big stacktrace