almost all the testcases in the source use jBPM from a pojo as an embedded library. If you deploy jBPM (on an appserver) and you want to remotely interact with it, use the commandservice (ejb). The webservice 'api' is kind of similar as the commandservice but with the advantages of being transactional. Not sure how mature the ws-api is btw...
Thanks for you quick reply... I'm going to look for "commandservice".
If you are trying to do something simple you can include the jbpm-jpdl-xx.jar and then configurate it to consume the database with the JbpmContext....
Hope it helps. I will try to make a post about it in my blog!
My first attempt was in that direction. I tried doing it using JbpmContext but it seems I'm not able to connect to server/DB, I mean I'm only able to use a new local context.
Maybe it is possible to configure the right context by configuring the hibernate.cfg.xml or hibernate.cfg.xml files, but I wasn't able to understand it. do you know where I can find some example?
Yes.. of course, you need to configure the hibernate.cfg.xml file to connect to you database that have the jBPM schema. You can do that in the following way, if you are in a standalone application with a postgreSQL DB:
<!-- hibernate dialect --> <property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property> <!-- JDBC connection properties (begin) --> <property name="hibernate.connection.driver_class">org.postgresql.Driver</property> <property name="hibernate.connection.url">jdbc:postgresql://localhost:5432/jbpm</property> <property name="hibernate.connection.username">user</property> <property name="hibernate.connection.password">password</property> <!-- JDBC connection properties (end) -->
In the case that you are using jBPM in an Application Server you could look in my post: