-I have three tables: Projects, Task and Sub-Task.
-Relationship between tables: One Project can have many Task, One Task can have many SubTasks.
Attribute Type: Composition
-User of the system are assigned according to their roles(Project Supervisor, Task Performer and Sub-Task Performer). Project Supervisor can edit all the projects he created, that includes all the Task and Sub-Tasks as well. Task Performer and Sub-Task Performer can edit only the Status of Tasks and Sub-Tasks they are assigned to.
Status can be: Planned, In_Progress, On_Hold and Complete.
*A Project Status is set to complete when all its Tasks status are set to complete.
*A Task status is set to complete when all its Sub-Tasks status are set to complete.
*I implemented this rule by using entity Listeners(BeforeInsertEntityListener and BeforeUpdateEntityListener).
When I log in as a Task Performer or Sub-Task Performer and change all their Statuses to complete from the Task and Sub-Task tables, It does not trigger the BeforeUpdateEntityListener of Project to set the Projects Status to complete.
Give me good simpler examples or references about Transaction Listeners with an explanation where to apply it and how different they are from Entity Listeners.
Am I doing it wrong? Please help
Thank you in advance