if there is no processinstanceinfo then the processes instance should be in state completed/aborted. So there is something wrong. What data base are you using?
Btw, you might want to look at version 6 instead that has bunch of bug fixes where similar was done for oracle db where processinstancelog was missing end date.
Ok, thx for your answer,
in other processes that have been successfully completed I see an end_date.
I use jbpm in a seperate schema in ORACLE. The Connection from JBOSS AS 7 is configured as an XA Connection.
I'm thinking about manipulating the ProcessInstanceLog querys via orm.xml or configure a trigger in Oracle?
What do you think. (When will jbpm 6 become a stable release)
since you use jBPM in your application you can try to patch the logger responsible for that and register it instead of the default one. Here are the links to important parts that you would need to change compared to the current one:
- on beforeProcessStarted event you need to save the log entry in meta data - code here
- on afterProcessCompleted event first check if there is log already in meta data and if so use it, otherwise use same approach as it's there - code here
jbpm 6.0.0 is stable as far as I know, haven't heard of any blockers. Of course some issues may arise and here I see great potential for community to use it and report any issues.
THX for that Information.
Is there a changelog that can help me to decide how much effort a migration from 5.4 to 6 means? (Database Migration etc.)
I can't get any ProcessInstanceLog at beforeProcessStarted / afterProcessCompleted for the Process BPMN2-ErrorBoundaryEventInterrupting.bpmn2. (not in engine and not on db)
Mind i use 5.4, so my code looks more like that jbpm/jbpm-bam/src/main/java/org/jbpm/process/audit/JPAWorkingMemoryDbLogger.java at 5.5.x · droolsjbpm/jbpm · GitHub
In other Processes i can see ProcessInstanceLog here.
And in the updateProcessLog after afterProcessCompleted was called the following statement returns no data:
List<ProcessInstanceLog> result = em.createQuery(
"from ProcessInstanceLog as log where log.processInstanceId = ? and log.end is null")
But when i flush() the em then i can see the ProcessInstanceLog but i think thats not the best way???
What can i do`?
this is exactly the problem that was resolved by using the meta data to store the log information as it was not available on the query time without the flush. The fact that you use 5.4 is not such important as the lines I pointed out are important ones and should be possible to backport. So just take the code of JPAWorkingMemoryDbLogger and add the additional lines to deal with missing log on query time. That should fix the issue.
Ok, it works! Thx for your advice!
My JPAWorkingMemoryDbLogger looks now a bit more like in v.6.