コード例 #1
0
 public void remove(WorkflowExecution workflowExecution) {
   String collection = workflowExecution.getCollection();
   if (!workflowsExecutionsMap.containsKey(collection + workflowExecution.getId())) {
     throw new WorkflowExecutionIndexRuntimeException_WorkflowExecutionNotFound(
         workflowExecution.getId(), collection);
   }
   String filePath =
       collection
           + File.separator
           + EXECUTION_FOLDER
           + File.separator
           + workflowExecution.getId()
           + XML_EXTENSION;
   oneXMLConfigPerCollectionManager.updateXML(
       collection, newRemoveWorkflowExcecutionIndexDocumentAlteration(workflowExecution));
   configManager.delete(filePath);
 }
コード例 #2
0
 public void addUpdate(WorkflowExecution workflowExecution) {
   String collection = workflowExecution.getCollection();
   String filePath =
       collection
           + File.separator
           + EXECUTION_FOLDER
           + File.separator
           + workflowExecution.getId()
           + XML_EXTENSION;
   if (!workflowsExecutionsMap.containsKey(collection + workflowExecution.getId())) {
     oneXMLConfigPerCollectionManager.updateXML(
         collection, newAddWorkflowExcecutionIndexDocumentAlteration(workflowExecution));
   } else {
     oneXMLConfigPerCollectionManager.updateXML(
         collection, newUpdateWorkflowExcecutionIndexDocumentAlteration(workflowExecution));
     configManager.delete(filePath);
   }
   configManager.createXMLDocumentIfInexistent(
       filePath, newAddWorkflowExcecutionDocumentAlteration(workflowExecution));
 }