Bug 1117954 - Audit log can't be opened when Business Rule Task is used
Summary: Audit log can't be opened when Business Rule Task is used
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: Eclipse Tooling
Version: 6.0.2
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Mario Fusco
QA Contact: Marek Baluch
Depends On:
Blocks: 1135925 1135935
TreeView+ depends on / blocked
Reported: 2014-07-09 17:15 UTC by Anton Giertli
Modified: 2018-12-06 17:15 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed:
Type: Bug

Attachments (Terms of Use)
[0] jbds log (3.52 KB, text/x-log)
2014-07-09 17:22 UTC, Anton Giertli
no flags Details
[1] reproducer (37.21 KB, application/zip)
2014-07-09 17:24 UTC, Anton Giertli
no flags Details

Description Anton Giertli 2014-07-09 17:15:32 UTC
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:

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.

Comment 2 Anton Giertli 2014-07-09 17:22:37 UTC
Created attachment 916898 [details]
[0] jbds log

Comment 3 Anton Giertli 2014-07-09 17:24:18 UTC
Created attachment 916899 [details]
[1] reproducer

Comment 4 Anton Giertli 2014-07-09 17:26:23 UTC
Some additional information about environment:

JBDS version
Version: 7.1.1.GA
Build id: GA-v20140314-2145-B688
Build date: 20140314-2145

  JBoss Drools Core	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.

Comment 6 Kris Verlaenen 2015-01-15 23:57:27 UTC
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?

Comment 7 Mario Fusco 2015-01-16 14:44:44 UTC
Fixed by https://github.com/droolsjbpm/drools/commit/47afc3f9e

Comment 8 Kris Verlaenen 2015-01-20 16:17:16 UTC
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.

Comment 9 Maciej Swiderski 2015-01-21 11:50:37 UTC
should be fixed by following commits as discussed with Mario on IRC



Comment 10 Jozef Marko 2015-02-13 08:28:53 UTC
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'

Comment 11 Mario Fusco 2015-02-13 08:55:35 UTC
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.

Comment 12 Jozef Marko 2015-02-13 09:29:53 UTC
Sorry My bad.

Attached project [1] reproducer verified with following changes in pom.xml:




Note You need to log in before you can comment on or make changes to this bug.