This event is used for undoing activities in case a transaction subprocess has been canceled or needs rollback.

It only can be attached to activities when it is a catching event. When it is a throwing event, it can be added to the normal flow process.
When the event is attached, it only can be associated with a Script Task, using association connectors –not sequence connectors.
In the below diagram, each activity with an Intermediate Compensate Event associated with a Script Task will be undone if an error is triggered.

Objects: Business Process Diagram
Cancel End Event
Error Intermediate Event