示例#1
0
 public void createNewInstance(String caseID, String taskID, String newInstanceData)
     throws YPersistenceException {
   Set workItems = _engineClient.getAllWorkItems();
   for (Iterator iterator = workItems.iterator(); iterator.hasNext(); ) {
     YWorkItem item = (YWorkItem) iterator.next();
     if (item.getCaseID().toString().equals(caseID) && item.getTaskID().equals(taskID)) {
       try {
         _engineClient.createNewInstance(item, newInstanceData);
       } catch (YStateException e) {
         e.printStackTrace();
       }
     }
   }
 }
示例#2
0
 public void rollBackActiveTask(String caseID, String taskID)
     throws YPersistenceException, YLogException {
   Set workItems = _engineClient.getAllWorkItems();
   for (Iterator iterator = workItems.iterator(); iterator.hasNext(); ) {
     YWorkItem item = (YWorkItem) iterator.next();
     if (item.getCaseID().toString().equals(caseID) && item.getTaskID().equals(taskID)) {
       try {
         _engineClient.rollbackWorkItem(item.getIDString());
       } catch (YStateException e) {
         e.printStackTrace();
       }
     }
   }
 }
示例#3
0
  // MUTATORS ############################################################################
  public void applyForWorkItem(String caseID, String taskID) throws YPersistenceException {
    Set workItems = _engineClient.getAvailableWorkItems();
    for (Iterator iterator = workItems.iterator(); iterator.hasNext(); ) {
      YWorkItem item = (YWorkItem) iterator.next();
      if (item.getCaseID().toString().equals(caseID) && item.getTaskID().equals(taskID)) {
        try {
          _engineClient.startWorkItem(item, null);

        } catch (YStateException e) {
          e.printStackTrace();
          reportGeneralProblem(e);
        } catch (YDataStateException e) {
          e.printStackTrace();
          new SpecificationQueryProcessingValidationErrorBox(_frame, item, e);
        } catch (YAWLException e) {
          e.printStackTrace();
          reportGeneralProblem(e);
        }
      }
    }
  }