or in another way the question is: How can I connect to a JBoss-server(working with a mysql-DB) to get a process?
meanwhile I found out that I can connect and get the ProcessDefinitions stored in the DB like this:
JbpmConfiguration config = JbpmConfiguration.getInstance(); JbpmContext context = config.createJbpmContext(); List processes = context.getGraphSession().findLatestProcessDefinitions();
but in the third line an exception is thrown.
what does that mean?
Means it cannot find the class org/hibernate/Session .
Looks like you haven't got the required hibernate jar files in your classpath.
meanwhile I discovered that the code above is only possible if that class was deployed to the JBoss AS. But I want to get a ProcessDefinition/Instance from outside the AS. How can I do this? With EJB? Or is there an easier way?
As I said, check your jars. You can run that code outside JBoss AS. I run the same code in Tomcat. You can run it anywhere, as long as you have setup your classpath/libraries correctly.
Look at the deployment section in the documentation. Make sure you are referencing all relevant jar files.