-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: retention-2021.0
-
Fix Version/s: retention-2021.x, retention-2023.x
-
Component/s: Retention
-
Tags:
-
Backlog priority:600
-
Team:PLATFORM
-
Sprint:nxplatform #116
Steps to reproduce:
- Define a retention rule named "Retention Rules - PBC Document"
- Deploy the attached jar
- As user Joe, create a File document
- start the workflow WF
- As user Administrator, validate the task
- The document is moved to the state Approved which triggers an Automation script which attaches the Retention rule
- Observe the error in the UI and the task is not finished
- And this error in the logs
Caused by: org.nuxeo.ecm.core.api.PropertyException: Failed to invoke operation Retention.AttachRule, Record cannot be checked in: be5ccd01-5816-4ea6-9992-07ae1b3fdc29 at org.nuxeo.ecm.core.storage.sql.coremodel.SQLDocumentLive.checkIn(SQLDocumentLive.java:588) ~[nuxeo-core-storage-sql-2021.50.12.jar:?] at org.nuxeo.ecm.core.versioning.StandardVersioningService.doCheckIn(StandardVersioningService.java:365) ~[nuxeo-core-2021.50.12.jar:?] at org.nuxeo.ecm.core.versioning.VersioningComponent.doCheckIn(VersioningComponent.java:450) ~[nuxeo-core-2021.50.12.jar:?] at org.nuxeo.ecm.core.api.AbstractSession.checkIn(AbstractSession.java:2023) ~[nuxeo-core-2021.50.12.jar:?] at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.checkIn(DocumentModelImpl.java:688) ~[nuxeo-core-api-2021.50.12.jar:?] at org.nuxeo.ecm.core.versioning.StandardVersioningService.doAutomaticVersioning(StandardVersioningService.java:504) ~[nuxeo-core-2021.50.12.jar:?] at org.nuxeo.ecm.core.versioning.VersioningComponent.doAutomaticVersioning(VersioningComponent.java:460) ~[nuxeo-core-2021.50.12.jar:?] at org.nuxeo.ecm.core.api.AbstractSession.saveDocument(AbstractSession.java:1778) ~[nuxeo-core-2021.50.12.jar:?] at org.nuxeo.retention.adapters.Record.save(Record.java:120) ~[nuxeo-retention-2021.6.6.jar:?] at org.nuxeo.retention.adapters.Record.setRule(Record.java:134) ~[nuxeo-retention-2021.6.6.jar:?] at org.nuxeo.retention.service.RetentionManagerImpl.attachRule(RetentionManagerImpl.java:132) ~[nuxeo-retention-2021.6.6.jar:?]
Expected behavior: the task is completed and the retention rule is attached to the document