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
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: Eclipse Tooling
Version: 6.0.2
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Mario Fusco
QA Contact: Marek Baluch
URL:
Whiteboard:
Depends On:
Blocks: 1135925 1135935
TreeView+ depends on / blocked
 
Reported: 2014-07-09 17:15 UTC by Anton Giertli
Modified: 2020-03-27 20:04 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-27 20:04:28 UTC
Type: Bug
Embargoed:


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:
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.

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


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.

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.
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?

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

drools
master:
https://github.com/droolsjbpm/drools/commit/5e05721f4a81d9f80285c0dc1216d37e7f34d78d

6.2.x:
https://github.com/droolsjbpm/drools/commit/8bad15fa74be3d2cd82d7e290a98deabf5bfec12

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:

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>


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