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