title: Java Agent not receiving updates after launching
body: <p>I am calling a Java agent using Formula code:</p>
  
  <pre><code>@Command([RunAgent]; "My Agent");
  </code></pre>
  
  <p>The agent runs and reads its parameters correctly. Some documents might change while the agent is still running. The agent doesn't see the changes and keeps reading the old values. To be concrete, the processing might be cancelled, so I am trying to tell my agent to stop.  I am doing this by changing the value in a document I dedicated for passing arguments to the agent:</p>
  
  <pre><code>Call doc.ReplaceItemValue("Pause","True")
  Call doc.Save(True, False)
  </code></pre>
  
  <p>This is what the agent does:</p>
  
  <pre><code> Session session = getSession();
   AgentContext agentContext = session.getAgentContext();
   Database db = agentContext.getCurrentDatabase();
  'Reload the document with the parameters
   paramDoc = db.getDocumentByID(paramDoc.getNoteID());
  </code></pre>
  
  <p>But the agent only sees the default values. It seems to have an image of the database as it was at the time of calling it.</p>
  
  <p>Any clue as to how to inform the agent about the new values or pausing/cancelling its thread?</p>