This content has been marked as final.
Show 2 replies
-
1. Re: No logging to JBPM_LOG when process instance ends
kukeltje Apr 1, 2008 5:17 PM (in response to jbarrez)I assumed that the end() method of the processInstance would act like a 'catch-all' and flushes the log.
Assumptions are always dangerous ;-) Why not assume that when signalling a token/process would do the same?
Seriously... to me there is no difference. I just have to make sure I always do this... just like with any plain hibernate thing... -
2. Re: No logging to JBPM_LOG when process instance ends
jbarrez Apr 2, 2008 3:40 AM (in response to jbarrez)Indeed, assuming that it happens when signalling a token would do the same.
But when I checked the sourcecode, this ain't happening.
The ProcessLogs are added to the LoggingInstance, but the problem is that this are non-persisted objects at that point.
Until the call to the jbpmContext.save(processInstance) is made, resulting in calling the loggingService which will do a session.save(ProcessLog), Hibernate simply does *not* know the ProcessLogs.
In my point of view, this is quite error-prone (you *have* to call the jbpmContext.save() method).
Simply doing a session.save(ProcessLog) after the ProcessLog creation will do the trick. Hibernate will then persist the ProcessLog when it flushes its session.