code: public Integer lockActivityInstance(Long actInstId)
         throws DataAccessException {
          try {
              if (!isInTransaction()) throw
                  new DataAccessException("Cannot lock activity instance without a transaction");
              return engineImpl.getDataAccess().lockActivityInstance(actInstId);
          } catch (SQLException e) {
              throw new DataAccessException(0, "Failed to lock activity instance", e);
          }
      }
docs: This method must be called within the same transaction scope (namely engine is already started
  @param actInstId
  @throws DataAccessException