This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Jul 9, 2011, 1:10 AM
8 Posts

Exception occurred calling method NotesAgent.runWithDocumentContext

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.2
  • Role:
  • Tags: runWithDocumentContext
  • Replies: 2
 Hi,
 
I'm trying to run an agent from a button using SSJS. Here's the piece of code I have under the button:
 
var agent = database.getAgent("LSSendMemo");

if(null != agent) {
    try {
        var doc = document1.getDocument(true);
        print(doc.getItemValueString("WFStatus"));
        agent.runWithDocumentContext(doc);
    } catch(e) {
        print("Error: " + e);
        return;
    }
}
 
Checking the log.nsf I can see that the doc object exists because the value in the WFSatus field is printed in the log. This is followed by the error "Exception occurred calling method NotesAgent.runWithDocumentContext(lotus.domino.local.Document) Null". I tried to run it on different servers using different settings for the agent e.g Run as Web User.
The code in the agent is fairly simple, creates a memo document, populates its fields from the context document and sends it to the recipient.
Any idea why the agent is not running?
Thank you for your help,
 
Etyien
Jul 27, 2011, 9:21 PM
272 Posts
Re: Exception occurred calling method NotesAgent.runWithDocumentContext
What is printed in the Stack Trace?
Jul 28, 2011, 8:21 AM
4 Posts
Re: Exception occurred calling method NotesAgent.runWithDocumentContext
In the agent properties > Security, be sure to check "Run as web user"
 

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal