no, meaning not with a single api call....
in jBPM 4 there is something about that?
if not.. can we think some kind of pattern or best practices to achive that?
the pattern is to use the business key and retrieve process instances based on that. Store domain data in your domain model and select from there which process instance to retrieve. People still tend to put to much data in the process as well as use the identity module to broadly. I never used the identity module...
I like storing the data in the process itself,
The process itself makes a usage of the process vars (for decisions for example) and it makes my programming much easier (instead of loading few domain models I just load the process and thats it)
I have thousands of processes, having almost duplicated entries is not fun to maintain.
Well, back to this thread, is there a way to retrieve a process by var? are there any instructions how to do that?
It seems to be pretty complicated since there is the context between the process instance and its vars.
write your own HQL
I thought so, but I have no idea how to do that since there is no direct association between processinstance->vars, there's a context in the middle that is associated with a MAP of vars,
Is there any example or something similar somewhere?
uhmmmm using joins? subselects? etc....
Sometime too much thinking leads to complicating ideas,
I just performed a select on the variables, each variable references the process its attached to so it's easy to fetch the process from the loaded var.