I'm planning to implement support for BSF and will contribute it back if it's wanted.
(BSF supports pluggable scripting engines and pluggable domain classes.)
I'm posting this here, rather than on the forum, to make sure we don't end up with duplicate efforts.
If this was the wrong thing to do, apologies in advance.
My current plans are to just provide a way to configure a global scripting engine via jbpm.cfg.xml. In the future, it would be desirable to make this settable in the Process Definition.
I'll make sure this works with BeanShell and Groovy - other folks will have to vet Rhino, etc.
Current estimate is "before end of February".
Any thoughts? Requests? Is this useful to others? I haven't seen much about it on the forums.
This was originally misposted on JIRA as http://jira.jboss.com/jira/browse/JBPM-830.
Tom Baeyens responded there:
good idea. i mainly would be interested to know how you could enhance the current scripting support to BSF without braking backwards compatibility.
if this could be done with adding a language attribute to the script tag that has the default value of 'bsh', I'm all ears :-)
<script language="bsh">attribute sounds good; folks also might want to set a default language in the process definition or even in the config file.
Ronald van Kuijk (mis)posted "isn't there a JSR for pluggable scripting?" on another thread (http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008880).
Oops - yes, there is - JSR-223 (https://scripting.dev.java.net/).
I didn't realize it was so far advanced.
I'll use it if possible.