[jboss-user] [jBPM Users] - Re: Groovy language in Script activity

2009-11-25 Thread bgoetzmann
Hello,

I would be happy to do some tests, but I don't know what I can use for the 
factory attribute? Any idea?

Thank you,

Bertrand.

kukeltje wrote : it needs to be compliant with JSR 223

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4267444#4267444

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4267444
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


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

2009-11-25 Thread bgoetzmann
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
default-script-language=groovy
  script-language name=juel 
factory=org.jbpm.pvm.internal.script.JuelScriptEngineFactory /
  script-language name=groovy 
factory=org.codehaus.groovy.jsr223.GroovyScriptEngineFactory /
/script-manager

- 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?


Cheers,

Bertrand.


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=bbop=viewtopicp=4267458#4267458

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4267458
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [jBPM Users] - Re: The most simple jBPM jbpm.cfg.xml configuration file

2009-11-24 Thread bgoetzmann
Thank you Ronald,

In a NetBeans project I reused the configuration files jbpm.cfg.xml and 
jbpm.hiernate.xml coming from the jbpm_4_2\install\generated\cfg folder (I 
put them at the root of my source code). Of course, I added the required jars.

My main method looks like this:

ProcessEngine processEngine = new Configuration().buildProcessEngine();
  | RepositoryService repoService = 
processEngine.getRepositoryService();
  | ExecutionService executionService = 
processEngine.getExecutionService();
  | 
  | NewDeployment deployment = 
repoService.createDeployment().addResourceFromClasspath(process.jpdl.xml);
  | deployment.deploy();
  | executionService.startProcessInstanceByKey(helloWorld);

As you can see in the code, I used the process.jpdl.xml process definition file 
(also in the classpath).
And before running it, I executed a HSQLDB server instance by running the Ant 
task start.hsqldb.server from jbpm_4_2\install.
And it works!

I also implement a custom activity (and use it in the process) in Groovy 
language by implementing ExternalActivityBehaviour, in order to invoke a remote 
service also in Groovy. This service is even running as a script in the Groovy 
console using the XML-RPC Groovy module.

Best regards,

Bertrand.


kukeltje wrote : There is a 'default' cfg in jbpm that is 'minimal´ If you 
want less, you have to describe in detail what functionality of jBPM you do not 
want to use (there is not much difference in using jBPM in a webapp or 
standalone app)
  | 
  | Regarding the database, that is totally up to you to decide. 

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4267354#4267354

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4267354

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [jBPM Users] - Groovy language in Script activity

2009-11-24 Thread bgoetzmann
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=bbop=viewtopicp=4267360#4267360

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4267360
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [jBPM Users] - The most simple jBPM jbpm.cfg.xml configuration file

2009-11-20 Thread bgoetzmann
Hello,

I'm new in jBPM, and think it is a very powerful tool!

My first goal is to use a ProcessEngine object, init a simple process 
definition, and run an instance of this, by code.
The documentation says (jBPM 4) that I must use a jbpm.cfg.xml.
What would be, in my case, the simplest definition in that configuration file, 
knowing that I would to have jBPM embedded in my java application?
I suppose I must use a in memory database?

Thank a lot!

Bertrand.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=4266810#4266810

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=4266810
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user