title: Update document in Processor on the condition based
body: <pre><code>{
    "status":1,
    "expire":15349870000,
    "detail1":"test1",
    "detail2":"test2"
  }
  {
    "status":0,
    "expire":15349870000,
    "detail1":"test1",
    "detail2":"test2"
  }
  </code></pre>
  
  <p>I have two different documents of same data type, I want to update status, detail1 and detail2 on conditions</p>
  
  <p>if(status==0 and expire > now()) then status = 1 and detail1 = "good"</p>
  
  <p>if(status==1 and expire > now()) then status = 2 and detail2 = "bad"</p>
  
  <p>But all this I want to do in Processor. So how can I apply a check in processor as I am unable to get value of fields in processor?</p>
  
  <pre><code>@Override
      public Progress process(Processing processing) {
          for (DocumentOperation op : processing.getDocumentOperations()) {
              if (op instanceof DocumentUpdate) {
                  DocumentUpdate documentUpdate = (DocumentUpdate) op;
  
  if(?){
  documentUpdate.addFieldUpdate(FieldUpdate.createAssign(documentUpdate.getDocumentType().getField("detail1"), new StringFieldValue("good")));
  }
  else if(?){
  documentUpdate.addFieldUpdate(FieldUpdate.createAssign(documentUpdate.getDocumentType().getField("detail2"), new StringFieldValue("bad")));
  }
              }
  
          }
          return Progress.DONE;
      }
  </code></pre>
  
  <p>Please help!</p>