Description of problem:
Under specific circumstances it is not possible to open an audit log produced by the engine. This circumstances for example includes Rule Task used in the BPMN process.
Version-Release number of selected component (if applicable):
all bpm versions
Steps to Reproduce:
1. Use reproducer attached and execute AuditLogBug test class
2. This will producer several log files
3. It is possible to import audit_success == rule task wasn't used
4. It is not possible to import audit_fail log == rule task was used
It is not possible to open audit log under specific circumstances,ths specific circumstance seems to be caused by the rule task presense
It is possible to create *any* audit log which was produced by the engine (especially if the process execution was ended successfully)
JBDS produced logging when I attempted to open this 'corrupted' audit log.
This log is attached.
Created attachment 916898 [details]
 jbds log
Created attachment 916899 [details]
Some additional information about environment:
Build id: GA-v20140314-2145-B688
Build date: 20140314-2145
JBoss Drools Core 18.104.22.168406040014 org.drools.eclipse.feature.feature.group JBoss by Red Hat
bpm 6.0.1 was used in the pom.xml, issue is reproducible also with bpm 6.0.2 libraries, which points to the tooling issue.
When using a ruleflow-group, it will auto-deactivate during fireAllRules() in case the group is empty. In this case however, it seems the engine is not calling fireBeforeRuleFlowGroupDeactivated(..), only the after event.
The reason is that this operation is normally called in DefaultAgenda.deactivateRuleFlowGroup(..). When using auto-deactivate however, DefaultAgenda.getNextFocus() will call innerDeactiveRuleFlowGroup(..) which will only trigger the afterRuleFlowGroupActivated event.
It seems simply sending out the beforeRuleFlowGroupDeactivated event in DefaultAgenda.getNextFocus() right before calling innerDeactivateRuleFlowGroup(..) would solve the issue.
Mario, can you please take a look?
Fixed by https://github.com/droolsjbpm/drools/commit/47afc3f9e
I think this doesn't solve the issue. The issue is not with the afterRuleFlowGroupActivated event, as that seems to be triggered always (and with this change it would actually not be triggered all the time again I believe). However, the beforeRuleFlowGroupActivated event seems to be issue, and that behavior hasn't changed, it's still not generated.
should be fixed by following commits as discussed with Mario on IRC
Still reproducible on jbds-8.0.2.GA_jbdsis-8.0.0.CR2.
It IS NOT possible to show 'audit_fail.log' in 'Audit log view'
It IS possible to show 'audit_success.log' in 'Audit log view'
The problem (and the corresponding fix) was in how the xml logs were generated, not in the log parser.
The attached 'audit_fail.log' file has been generated when the bug was still present, so of course the parser is still not able to open it.
Conversely all the log files generated after the fix should be correctly parseable. If I'm missing something or there is still a case where the new logs are not visible in the Audit log view, please let me know.
Sorry My bad.
Attached project  reproducer verified with following changes in pom.xml: