[jboss-user] [jBPM Users] - Groovy in Script activity works, but lang attribute seems to

bgoetzmann do-not-reply at jboss.com
Wed Nov 25 04:54:53 EST 2009

After some search, I've found how to proceed. The class to use is org.codehaus.groovy.jsr223.GroovyScriptEngineFactory.

- I added this declaration (in bold) in the jbpm.cfg.xml:

<script-manager default-expression-language="groovy"
      <script-language name="juel" factory="org.jbpm.pvm.internal.script.JuelScriptEngineFactory" />
      <script-language name="groovy" factory="org.codehaus.groovy.jsr223.GroovyScriptEngineFactory" />

- You have to have the groovy-all-....jar in your libs

So you use Groovy in a script activity; for example:

  <script name="display hello world" lang="groovy"
          expr="println 'Salut !'">

But with some test, I see that the lang attribute value is not take in account; and the only way to have Groovy to be executed is to set it as default as I do it above in script-manager XML element.

Is it a bug?



"bgoetzmann" wrote : Hello,
  | The jBPM says a little on how to use another script language in a Script activity.
  | It seems you have to add something like this, as child element of the script-manager XML element in the jbpm.cfg.cml file:
  | <script-language name="..." factory="..."/>
  | for the language you want.
  | How can I define Groovy? And what interface the class defined in factory attribute is supposed to support?
  | Thank you,
  | Bertrand.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267458#4267458

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267458

More information about the jboss-user mailing list