cancel
Showing results for 
Search instead for 
Did you mean: 

Triggers in Alfresco while adding a document

imane
Confirmed Champ
Confirmed Champ

Hello Community,

I wanna understand technically how Triggers work in Alfresco, (in the case of adding a document into repository).

Thank you in advance.

Best regards.

1 ACCEPTED ANSWER

abhinavmishra14
World-Class Innovator
World-Class Innovator

You should explore behaviors to better understand how to listen to events and execute/run any code as needed. org.alfresco.repo.node.NodeServicePolicies has several methods to listen to node events.

example:

beforeAddAspect

beforeArchiveNode

beforeCreateNode

beforeCreateStore

beforeDeleteAssociation

beforeDeleteChildAssociation

beforeDeleteNode

beforeMoveNode

beforeRemoveAspect

beforeSetNodeType

beforeUpdateNode

onAddAspect

onCreateAssociation

onCreateChildAssociation

onCreateNode

onCreateStore

onDeleteAssociation

onDeleteChildAssociation

onDeleteNode

onMoveNode

onRemoveAspect

onSetNodeType

onUpdateNode

onUpdateProperties

This is a good starting tutorial to learn behaviors: https://ecmarchitect.com/alfresco-developer-series-tutorials/behaviors/tutorial/tutorial.html

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

View answer in original post

1 REPLY 1

abhinavmishra14
World-Class Innovator
World-Class Innovator

You should explore behaviors to better understand how to listen to events and execute/run any code as needed. org.alfresco.repo.node.NodeServicePolicies has several methods to listen to node events.

example:

beforeAddAspect

beforeArchiveNode

beforeCreateNode

beforeCreateStore

beforeDeleteAssociation

beforeDeleteChildAssociation

beforeDeleteNode

beforeMoveNode

beforeRemoveAspect

beforeSetNodeType

beforeUpdateNode

onAddAspect

onCreateAssociation

onCreateChildAssociation

onCreateNode

onCreateStore

onDeleteAssociation

onDeleteChildAssociation

onDeleteNode

onMoveNode

onRemoveAspect

onSetNodeType

onUpdateNode

onUpdateProperties

This is a good starting tutorial to learn behaviors: https://ecmarchitect.com/alfresco-developer-series-tutorials/behaviors/tutorial/tutorial.html

~Abhinav
(ACSCE, AWS SAA, Azure Admin)