You can use an event-based gataway for this, using a intermediate signal-event and the timer. The event that fires first will be taken, the other will be cancelled. So by signalling/messaging the process, you cancel the timer. See userguide for a good example of what you want: http://www.activiti.org/userguide/#bpmnEventbasedGateway