Hello,
I Would like to have a visual list of items that are no longer valid or were removed.
I have seen several examples here, but in these examples the records were first removed from the actual records and then from the released records.
This works fine, but the user can not possibly know which items were valid in the past and now have been removed (by the red block in the actual records see illustration).
When I try to remove only the released record can sometimes go well , but in most cases I run into this error:
de.espirit.or.ORException : The entity de.espirit.or.impl.EntityImpl@35aeb7c1{Bericht,PERSISTENT,released,FS_ID=112482,FS_VALID_FROM=139151...} Is not deletable in release session ( current version still valid)
at de.espirit.or.impl.DeleteEntity.checkDeletable ( DeleteEntity.java : 127)
at de.espirit.or.impl.DeleteEntity.doProcess ( DeleteEntity.java : 42)
at de.espirit.or.impl.AbstractProcessEntity.process ( AbstractProcessEntity.java : 33 )
at de.espirit.or.impl.SessionImpl.delete ( SessionImpl.java : 80)
at de.espirit.firstspirit.store.access.contentstore.DatasetImpl.delete ( DatasetImpl.java : 438 )
This is my Java code that is invoked by a workflow .
if ( s.getIncomingReferences ( e ) . length == 0 ) {
Session releaseSession = c.getTemplate release ( ) GetSchema ( ) getSession ( true) ;
releaseSession.rollback ();
Entity eRelease = releaseSession.find ( e.getKeyValue ( ) ) ;
try {
C.LOCK ( eRelease ) ;
Dataset = EDs c.getDataset ( eRelease ) ;
eDS.delete ();
eDS.save ();
} Catch ( Exception Lock le ) {
System.out.println ("2 : delete entity " + le ) ;
}
Finally {
try {
c.unlock ( eRelease ) ;
releaseSession.commit ();
} Catch ( Exception Lock le ) {
System.out.println ( " 2.1 : delete entity " + le ) ;
}
releaseSession.rollback ( ) / / VOODOO
}
}
Does anyone know how I can remove the record from released records, allowing the user to see which records were deleted at a glance ?
Thank you !