cancel
Showing results for 
Search instead for 
Did you mean: 

Setting a DATE property in a custom type.

marcog
Confirmed Champ
Confirmed Champ
I'm using Alfresco ECM 23.1 in Docker in Ubuntu Linux 18.04 building with Maven SDK AIO 4.7. I built a Java class for a folder rule that applies logic to rename the actionedUponNodeRef document after calculating and setting a DATE property in a custom type.
 
The problem I have is that the class works perfectly renaming the document but does not save the DATE property.
 
The DATE property does not need to be set every time and the name does not need to be set every time. Sometimes both values are set.
 
I set the name so:
 
FileInfo renamedFileInfo = serviceRegistry.getFileFolderService().rename(actionedUponNodeRef, newDocName);
 
I set the DATE property so:
 
nodeService.setProperty(actionedUponNodeRef, qnameProp, (Serializable)newDate);
 
newDate is type LocalDate. I also tied it without (Serializable) and also with "new Date()" (java.util.Date). I verified that qnameProp is the correct QName. No error is reported.
 
In the logic of the class I can read the property I set this way:
 
String newDateRead = nodeService.getProperty(actionedUponNodeRef, qnameProp).toString();
 
At the end of processing I always see this error and sometimes also during processing:
 
"proj-acs_1       | 2025-03-10T01:14:35,907 [] ERROR [repo.event2.EnqueuingEventSender] [eventAsyncDequeueThreadPool1] Unexpected error while dequeuing and sending repository event org.alfresco.error.AlfrescoRuntimeException: 02100041 Could not send event"
 
I suppose this is the reason the property is not set.
 
Any pointers of what I'm doing wrong?
 
Thanks
 
Marco Gianini
0 REPLIES 0