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 How reproducible: always 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 Actual results: It is not possible to open audit log under specific circumstances,ths specific circumstance seems to be caused by the rule task presense Expected results: It is possible to create *any* audit log which was produced by the engine (especially if the process execution was ended successfully) Additional info: JBDS produced logging when I attempted to open this 'corrupted' audit log. This log is attached.
Created attachment 916898 [details] [0] jbds log
Created attachment 916899 [details] [1] reproducer
Some additional information about environment: JBDS version Version: 7.1.1.GA Build id: GA-v20140314-2145-B688 Build date: 20140314-2145 Plugin JBoss Drools Core 6.0.3.201406040014 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. https://github.com/droolsjbpm/drools/blob/6.1.0.Final/drools-core/src/main/java/org/drools/core/common/DefaultAgenda.java#L530 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 drools master: https://github.com/droolsjbpm/drools/commit/5e05721f4a81d9f80285c0dc1216d37e7f34d78d 6.2.x: https://github.com/droolsjbpm/drools/commit/8bad15fa74be3d2cd82d7e290a98deabf5bfec12
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 [1] reproducer verified with following changes in pom.xml: from: <brms.version>6.0.2-redhat-6</brms.version> to: <brms.version>6.2.0.Final-redhat-1</brms.version> and from: <url>http://maven.repository.redhat.com/techpreview/all/</url> to: <url>http://download.lab.bos.redhat.com/brewroot/repos/jb-ip-6.1-build/latest/maven/</url>