protected function finaliseRollback() {

		// Figure out the status by inspecting specific rollback steps.
		$success = true;
		$rollback1 = $this->RollbackStep1();
		$rollback2 = $this->RollbackStep2();
		if (!empty($rollback1) && $rollback1->Status=='Failed') $success = false;
		if (!empty($rollback2) && $rollback2->Status=='Failed') $success = false;

		// Send messages.
		if ($success) {
			$this->log("Pipeline failed, but rollback completed successfully.");
			$this->sendMessage(self::ALERT_ROLLBACK_SUCCESS);
		} else {
			$this->log("Pipeline failed, rollback failed.");
			$this->sendMessage(self::ALERT_ROLLBACK_FAILURE);
		}

		// Finish off the pipeline - rollback will only be triggered on a failed pipeline.
		$this->Status = 'Failed';
		$this->write();
	}