I have encountered similar issue when working on showing history of process instances in console:
In addition, execution id was different (process_instance_id.xxx) for task nodes as well. I think (as Ronald mentioned on the above discussion - is just not yet implemented) that there is a lack of one method in HistoryActvityInstanceQuery that will allow querying by processInstanceId instead of only execution or definition id.
Perhaps we could file an jira issue and vote for it?!
Thanks for replying Maciej. Sometimes it is difficult to sift through all the information about JBPM. I can understand why it works the way it does from an implementation perspective, but seems that getting a complete process history is a non-negotiable use case for most clients. I will look through the history tables and see if there is enough information in them to reconstitute a complete process history.
Thanks and regards,
I played a bit with jBPM source today (from trunk) and extended the HistoryActivityInstanceQuery with processInstanceId. It seems to work fine, it is almost the same as for processDefinitionId filter. Need to write some more test cases for it, at the moment only one that is based on already prepared test cases for ActivityInstanceQuery.
Good to hear that the use case described is non-negotiable - I thought I had only a weird idea
And it is not difficult to get extra info in the history table either, so contributions in that area are welcome to
Yeah, I would be happy to contribute, just needs some hints how
- learn the code (seems you are already doing that
- sign the contributors agreement
- submit a patch or two to show you are capable, including tests, and preferably including some docs
- get access to svn to commit yourself
Or was this not what you meant?
This is exactly what I meant
Ok, will follow your description and hopefully will submit a patch this week for HistoryActivityInstanceQuery.
I read on Help page that patch should be submitted as attachment to jira issue - do you know if there is already one for it? Or shall I put it here?
I read on Help page that patch should be submitted as attachment to jira issue
do you know if there is already one for it?
I do not know
Or shall I put it here?
Sure, why not