[MAGNOLIA-4737] Empty nodes of finished workflow still exist (Expressions workspace) Created: 12/Dec/12  Updated: 26/Jan/13  Resolved: 20/Dec/12

Status: Closed
Project: Magnolia
Component/s: None
Affects Version/s: 4.5.6
Fix Version/s: 4.5.8

Type: Bug Priority: Minor
Reporter: Andreas Antener Assignee: Jaroslav Simak
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Magnolia EE 4.5.6, Tomcat 7, Java 6, OS X


Attachments: Text File JCRExpressionStoreCleanupTest.java     Text File expressions.txt     Text File libs.txt     Text File magnolia-debug.log     File patch.diff    
Issue Links:
relation
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled

 Description   

The nodes in the "Expressions" workspace won't get deleted after a finished workflow.

Steps to reproduce:

  • Start Magnolia (public and author) with workflow module, no repositories yet
  • Login with superuser
  • Create a page
  • Activate that page
  • Go to inbox and proceed with the activation
  • Check the Expressions workspace under /owfe/activation

There I have 2 empty nodes now.
See attachments for debug-log, libs and listing from JCR query.



 Comments   
Comment by Andreas Antener [ 18/Dec/12 ]

Attached test case and patch.

There is a problem with the use of org.apache.jackrabbit.commons.iterator.FilteringNodeIterator in info.magnolia.module.workflow.jcr.JCRExpressionStore#deleteAndRemoveEmptyParents

The check on size()==0 cannot work because the implementation of this filtering node iterator always returns -1. It is explained in javax.jcr.RangeIterator#getSize

Cheers
Andy

Generated at Mon Feb 12 03:58:33 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.