Hello Benyamin,
Did you have a change to take a look at our Documentation? In this scenario you can use the Global events for Workflow, there is also special event executed when document is rejected.
For more information please take a look here: Reference - Global system events
Regards, Martin