As far as I know you have to do your custom WebService for that..
What do you recommend? try to use the java api for what we want to do, or use sql o hql query against db structure?. I need to do something similar to what Ricardo want's.
I think you have to options.
- Get all the processes and filter it by your side.
- Query jbpm audit tables. You can check this class which does it:
I'll check fo that example to make my own REST service and get that info. You know if exist any database scheme or descripcion of each field? I don't see a logical use for some of them.
I think you can see the generated tables.But as you have to make your own query to audit tables, it may be easy.. you have three tables, ProcessInstanceLog, NodeInstanceLog and VariableInstanceLog.
In your case you may want to do a query like this
select p from ProcessInstanceLog p where exists (select * from VariableInstanceLog v where v.variableId = :varname and v.value=varvalue and v.processInstanceId = p.id)
Note that I wrote it on the fly
I have one question about the session, I use the api service (business-central-server for the BRMS) for "my tasks" and all "definitions", also I create a custom rest service in a different war with all libraries and create service that get me all the task by some variable value, the point here is that sometimes process definitions doesn't work or my tasks fail throwing errors in the background, I think the problem is the way I get the entity manager factory and create a new knowledge session; is there any way to get the session from the rest API and using it or I have been using it in the wrong way?