cancel
Showing results for 
Search instead for 
Did you mean: 

How to modify node property in CronJob without changing "modifier"?

npavlov
Confirmed Champ
Confirmed Champ
If I change some property (add aspect for example) in a scheduled Job, I get "modifier" property changed to "System".

public class
ExampleCronJob implements StatefulJob {

public void execute(JobExecutionContext ctx) throws JobExecutionException {
...
nodeService.addAspect(ref, ASPECT_EXAMPLE);

         ...
}
Is it possible to do this and leave "modifier" parameter unchanged?
1 ACCEPTED ANSWER

janv
Employee
Employee

You should be able to disable the behaviour of the auditable aspect. See for example:

http://dev.alfresco.com/resource/AlfrescoOne/5.2/PublicAPI/index.html?org/alfresco/repo/policy/Behav...

Regards,

Jan

ps. you should be able to find examples within the core code (repository or open source extensions), eg.

https://github.com/Alfresco/records-management/blob/master/rm-community/rm-community-repo/source/jav...

... etc

or search web for more general discussions, eg.

https://stackoverflow.com/questions/46809388/how-to-edit-modified-and-modifier-properties-in-alfresc...

... etc

View answer in original post

1 REPLY 1

janv
Employee
Employee

You should be able to disable the behaviour of the auditable aspect. See for example:

http://dev.alfresco.com/resource/AlfrescoOne/5.2/PublicAPI/index.html?org/alfresco/repo/policy/Behav...

Regards,

Jan

ps. you should be able to find examples within the core code (repository or open source extensions), eg.

https://github.com/Alfresco/records-management/blob/master/rm-community/rm-community-repo/source/jav...

... etc

or search web for more general discussions, eg.

https://stackoverflow.com/questions/46809388/how-to-edit-modified-and-modifier-properties-in-alfresc...

... etc