I have the same question. I've started to look at the JBPM5 code to see whether the integration I have done with JBPM3 and 4 will be forward compatible.
From what I can see the JBPM4 API and PVM no longer exists, unless I'm looking in the wrong place.
I guess there is a hint in the fact that most of the source code refers to drools source.
Now both of us have the same question. It'd be great if someone can provide some directions.
You can use the integration api as defined in the gwt modules (which would be a very good idea if you actually want to offer these APIs using a REST service), or you could just use the underlying api to get the information you need (just like the gwt implementations are doing). But the gwt implementation is a fully functional example, so you can definitely take a look at that.
There are numerous APIs that you can use to do what you are describing. I would suggest looking through the documentation; examples and API to see how they are done. Some pointers:
Everything related to loading process definitions:
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
KnowledgeBase kbase = kbuilder.newKnowledgeBase();
Creating a session:
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
Starting a process instance:
Everything about monitoring your process instances, use a history logger:
Everything related to task management, use a task client:
If you have specific questions, just let us know