예제 #1
0
 public boolean hasActiveInstances(final QName pid) {
   try {
     return _db.exec(
         new BpelDatabase.Callable<Boolean>() {
           public Boolean run(BpelDAOConnection conn) throws Exception {
             return conn.getNumInstances(pid) > 0;
           }
         });
   } catch (BpelEngineException re) {
     throw re;
   } catch (Exception e) {
     throw new BpelEngineException(e);
   }
 }
예제 #2
0
 protected boolean deleteProcessDAO(final QName pid, boolean isInMemory) {
   try {
     if (isInMemory) {
       return deleteProcessDAO(_contexts.inMemDao.getConnection(), pid);
     } else {
       return _db.exec(
           new BpelDatabase.Callable<Boolean>() {
             public Boolean run(BpelDAOConnection conn) throws Exception {
               return deleteProcessDAO(conn, pid);
             }
           });
     }
   } catch (BpelEngineException re) {
     throw re;
   } catch (Exception e) {
     throw new BpelEngineException(e);
   }
 }