public final T execute() throws InvalidProcessStateException, ProcessExecutionException {
		if (state != ProcessState.READY && state != ProcessState.ROLLBACK_SUCCEEDED
				&& state != ProcessState.PAUSED) {
			throw new InvalidProcessStateException(this, state);
		}
		logger.debug("Executing '{}'.", this);
		setState(ProcessState.EXECUTING);
		notifyListeners(ProcessState.EXECUTING);
		isRollbacking = false;

		T result;
		try {
			result = doExecute();
			setState(ProcessState.EXECUTION_SUCCEEDED);
			notifyListeners(ProcessState.EXECUTION_SUCCEEDED);
		} catch (Exception ex) {
			setState(ProcessState.EXECUTION_FAILED);
			notifyListeners(ProcessState.EXECUTION_FAILED);

			// log exception, wrap it to PEE, throw
			String msg = "An exception has been catched during execution. See cause for more information.";
			logger.error(msg, ex);
			if (ex instanceof ProcessExecutionException) {
				throw ex;
			} else {
				throw new ProcessExecutionException(this, ex, msg);
			}
		}
		return result;
	}