I am trying to model the deployment process for some software using BPMN. Various parts of the deployment could go wrong, and I want to indicate in the diagram what steps should be taken in each case.
At first, it seemed like I should use "compensation" events for this, but I ended up using "error" events. I have been unable to find a clear distinction between these two, but the best I have come up with is that "error" indicates what should happen immediately if the task generates an error, whereas "compensation" indicates what needs to happen if, sometime later, the process needs to be reversed.
The examples of compensation I have seen are things like a travel agent taking a hotel booking: the task to cancel the booking would then be a compensation event on the booking task. I haven't been able to find many appropriate examples of "error": am I correct to use "error" in my case?