Personally, I'd start by searching the forum (e.g. with its embedded search engine or maybe google), but that is just me...
You could interpret more charitably. I have indeed searched the forums and the length and breadth of the internet. Perhaps I need a custom hibernate query. Maybe somebody has already thought this through and would share it with the rest of us (saving me a bit of trouble). As I am happy to to do when I can help others.
You could interpret more charitably. I have indeed searched the forums and the length and breadth of the internet
Next time, mention this. Nothing from your post gives me the intention you did. And since I'm pretty sure it has been discussed before multiple times, I posted what I posted.
. Perhaps I need a custom hibernate query. Maybe somebody has already thought this through and would share it with the rest of us (saving me a bit of trouble). As I am happy to to do when I can help others.
That is indeed what has been discussed before, combined with the (dis)advantages, the usage of the businesskey etc... So sorry if you feel offended, next time add the information in this second post to the first one....Then you would have gotten a different response from me. Something like:
Yes that is the way to go, or use the businesskey for this. Keep in mind that indexes might need to be created on each variable type column.
businesskey, that was the key search term. So now hopefully we have a clearer connection between the two concepts.
There were a few posts and that showed some hsql that worked with the TaskInstance class from 3.x. But no joy with the new 4.o domain objects.
I see that we can get the execution from org.jbpm.pvm.internal.type.Variable. It should be easy enough. I was just looking for a shortcut.
I will post the code when I'm done.
I also need a solution for this..and yes I searched the forums. It would be greate if you could post some code. thx.
The first question you always have to ask yourself: Is the businesskey sufficient. In many cases it is IF you separate your domain model from jBPM and just use a simple reference.
Ronald is right. In many cases, the business key is sufficient and even more appropriate to do queries. Do remember that business keys can have any string value, so with a bit of thinking chances are that you don't need additional variables.
Nonetheless, querying on variables is planned for a next release, but the approach will probably be way slower performance-wise compared to using the business key.