예제 #1
0
 // removes any history and process data
 @Transactional
 public String removeAll() {
   try {
     // remove brute force including history and running instances
     processEngine.getRepositoryService().deleteDeploymentCascade(Long.toString(deploymentId));
     hibernateSession.flush();
     return "removedAll";
   } catch (final JbpmException ex) {
     final FacesMessages facesMessages = FacesMessages.instance();
     facesMessages.add(Severity.ERROR, "Error: " + ex.toString());
     ex.printStackTrace();
     return "invalid";
   }
 }
예제 #2
0
 // removes just the process keeping the history data
 @Transactional
 public String remove() {
   try {
     // remove if there are no open executions, history information stays
     processEngine.getRepositoryService().deleteDeployment(Long.toString(deploymentId));
     hibernateSession.flush();
     return "removed";
   } catch (final JbpmException ex) {
     final FacesMessages facesMessages = FacesMessages.instance();
     facesMessages.add(Severity.ERROR, "Error: " + ex.toString());
     ex.printStackTrace();
     return "invalid";
   }
 }