Java AgentRunner CN=Serge Zarembsky/OU= 09/08/99 02:36:35 PM Thomas Gumz/Iris updated Anonymous 09/08/99 02:36:31 PM Thomas Gumz/Iris added Anonymous 09/08/99 02:36:21 PM Thomas Gumz/Iris updated -Default- 09/08/99 02:30:14 PM Thomas Gumz/Iris updated OtherDomainServers 03/17/98 03:46:22 PM Robert Perron/CAM/Lotus deleted Richard Adams/CAM/Lotus 01/06/98 07:45:24 AM Richard Adams/CAM/Lotus added OtherDomainServers 01/06/98 07:45:24 AM Richard Adams/CAM/Lotus added LocalDomainServers 01/06/98 07:45:24 AM Richard Adams/CAM/Lotus updated Richard Adams/CAM/Lotus 01/06/98 07:45:24 AM Richard Adams/CAM/Lotus added Richard Adams/CAM/Lotus -Default- LocalDomainServers OtherDomainServers Anonymous dUFMU OU(iVxMU Ks&5 #KW"S T$9\T Dre2R CN=Lotus Notes Template Development/O=Lotus Notes agentcontexts ($agentcontexts) $agentcontexts agentcontext CN=Richard Adams/OU=CAM/O=LotusCN=Robert Perron/OU=CAM/O=LotusCN=Lotus Notes Template Development/O=Lotus NotesCN=Thomas Gumz/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes $Modifiej 1S2S3S $TITLE$FormPrivs$FormUsers$Body$Flags$Class$Modified$Comment$AssistTrigger$AssistType$AssistFlags$UpdatedBy$$FormScript_O$LANGUAGE $Flags 0SL1S4S5S3724 $TITLE CN=Richard Adams/OU=CAM/O=Lotus AgentContexts CurrentDatabase_Server CurrentDatabase_Server CurrentDatabase_Server Local 3S4S8S9S10S11S12S13S14S15S17S19S CurrentDatabase_Server CurrentDatabase_Server Local CurrentDatabase_Server 3S4S8S9S10S11S13S15S $17$16CurrentDatabase_FilePathCurrentAgent$18Description$Conflict$REF AgentContext J1S1V $17$16CurrentDatabase_FilePathCurrentAgent$18 CurrentDatabase_Server CurrentDatabase_Server CurrentDatabase_Server Local 3S4S8S9S10S11S12S13S14S15S17S19S $16Server CurrentDatabase_Server CurrentDatabase_Server Local CurrentDatabase_Server 3S4S8S9S10S11S13S15S CurrentDatabase_FilePathDatabaseCurrentAgentAgent$18 DescriptionDescription& CN=Robert Perron/OU=CAM/O=LotusCN=Lotus Notes Template Development/O=Lotus Notes CN=Serge Zarembsky/OU=CAM/O=Lotus Java AgentRunner ($AgentContexts)|($AgentContexts)H CurrentDatabase_Server CurrentDatabase_Server Local CurrentDatabase_Server CurrentDatabase_FilePath" 3S4S8S9S10S11S13S15S17S18S19S20R $16CurrentAgent$18$Conflict$REF AgentContext L1S1- $16CurrentAgent$18 $16Key CurrentDatabase_Server CurrentDatabase_Server Local CurrentDatabase_Server CurrentDatabase_FilePath" 3S4S8S9S10S11S13S15S17S18S19S20R CurrentAgentAgent$18Last Modified CN=Richard Adams/OU=CAM/O=LotusCN=Lotus Notes Template Development/O=Lotus Notes CN=Serge Zarembsky/OU=CAM/O=LotusCN=Lotus Notes Template Development/O=Lotus Notes Dre2R CN=Joseph Millar/O=IrisCN=Lotus Notes Template Development/O=Lotus Notes 1AgentContext ViewList_ModifiedCurrentDatabase_ViewListProcessedDateTimesProcessedDocsSelectedDocsSavedDataLastRunLastExitStatusEffectiveUserNameDocumentContextCurrentDatabase_ServerCurrentDatabase_FilePathCurrentAgentAgentSearchCriteriaAgentRunsOnViewAgentRunsOnDescription CN=Serge Zarembsky/OU=CAM/O=LotusCN=Lotus Notes Template Development/O=Lotus Notes O=Lotus Notes O=Lotus Notes PURSAFO |.:#U O=Lotus Notes CN=Lotus Notes Template Development/O=Lotus Notes PURSAFO n$cV, $ACLDigest Edit Document New AgenwContext0 AgentContext 0S0E Categori_zea Send Docu_ment _Forward _Move To Folder... _Remove From Folder4 Help 0S0E O=Lotus Notes O=Lotus Notes PURSAFO |.:#U O=Lotus Notes CN=Lotus Notes Template Development/O=Lotus Notes PURSAFO ;cQD= $TITLE $Index $Formula $FormulaClass $ViewFormat $Comment $ACTIONS O=Lotus Notes O=Lotus Notes PURSAFO |.:#U O=Lotus Notes CN=Lotus Notes Template Development/O=Lotus Notes PURSAFO $TITLE $Index $Formula $FormulaClass $ViewFormaw $Comment Dre2R Symbol &Arial About - AgentRunner This tool provides Notes agent context to a Java IDE. Once the context is set up, yow can build, run, and debug without leaving the IDE. The code executes as it would in the Notes agent. This tool was developed and tested on Sun JDK, IBM VisualAge , and Symantec Visual Cafe; it should work with other Java IDEs but was not tested in other environments. See the Using document Java AgentRunner for help. Queries and comments should be directed to the "Developer Discussion Forum" at http://www.lotus.com/developers Copyright Under the copyright laws, neither the documentation nor the software may be copied, photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form, in whole or in part, without the prior written consent of Lotus Development Corporation, except in the manner described in the software agreement. Copyright 1999 Lotus Development Corporation 55 Cambridge Parkway Cambridge, MA 02142 All rights reserved. Published in the United States. Domino, InterNotes, Notes, and Lotus Domino Toolkit for Java are trademarks and Lotus, Lotus Notes, and SmartIcons are registered trademarks of Lotus Development Corporation. cc:Mail is a trademark of cc:Mail, a wholly-owned subsidiary of Lotus Development Corporation. IBM, OS/2, and VisualAge are registered trademarks of International Business Machines Corporation. Other product and company names mentioned herein may be the trademarks or registered trademarks of their respective owners. International Correctspell. English licensed from Houghton Mifflin Company. Copyright 1991 by Houghton Mifflin Company. All rights reserved. Reproduction or disassembly of embodied algorithms or database prohibited. Based upon The American Heritage Dictionary. LOTUS DEVELOPMENT CORPORATION LICENSOR(S) MAKES NO WARRANTIES,'EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE SOFTWARE. LOTUS DEVELOPMENT CORPORATION'S LICENSOR(S) DOES NOT WARRANT, GUARANTEE OR MAKE ANY REPRESENTATIONS REGARDING THE USE OR THE RESULTS OF THE USE OF THE SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY, CURRENTNESS OR OTHERWISE. THE ENTIRE RISK AS TO THE RESULTS AND PERFORMANCE OF THE SOFTWARE IS ASSUMED BY YOU. THE EXCLUSION OF IMPLIED WARRANTIES'IS NOT PERMITTED BY SOME JURISDICTIONS. THE ABOVE EXCLUSION MAY NOT APPLY TO YOU. IN NO EVENT WILL LOTUS DEVELOPMENT CORPORATION'S LICENSOR(S), AND THEIR DIRECTORS, OFFICERS, EMPLOYEES OR AGENTS (COLLECTIVELY LOTUS DEVELOPMENT CORPORATION'S LICENSOR(S)) BE LIABLE TO YOU FOR ANY CONSEQUENTIAL, INCIDENTAL OR INDIRECT DAMAGES (INCLUDING DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, AND THE LIKE) ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARG EVEN IF LOTUS DEVELOPMENT CORPORATION'S LICENSOR(S) HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE ABOVE LIMITATIONS MAY NOT APPLY TO YOU. O=Lotus Notes O=Lotus Notes PURSAFO |.:#U O=Lotus Notes CN=Lotus Notes Template Development/O=Lotus Notes PURSAFO $Info $Body Dre2R 5Courier New Using AgentRunner R5 includes AgentRunner, a Java application program for debugging Notes/Domino agents in a Java IDE. There are two versions of AgentWunner for different package classes: lotus.domino.AgentRunner for the lotus.domino package (Notes/Domino R5) lotus.notes.AgentRunner for the lotus.notes package (Notes/Domino R4.6.x) Also included is a set of gebug classes that access Notes context information while running in a Java IDE. You create your agent code to extend DebugAgentBase, then initially run the program as an agent inside Notes to generate an AgentContext document in AGENTRUNNER.NSF. Subsequently, you run the AgentRunner application that runs your agent code outside Notes. The AgentRunner code accesses the AgentContext document to make the program behave as though it were running as an agent. This allows you to build and run without having to switch between the IDE and Notes, and to use IDE run-time tools such as the debugger. Create a project for your agent In Java IDE: Add the fully-qualified file specification for notes.jar (for example, for JDK or Cafe) to your Java IDE's CLASSPATH or Import (for example, for VisualAge). Create an agent (see Java Programmer's Guide for instructigns) that extends DebugAgentBase (instead of AgentBase). Note: If using R4.6-style agents, use the " import lotus.notes.*; " format. If using the new lotus.domino package in Notes R5 (recommended), then use " import lotus.domino.*; ". You do this to select the proper version of DebugAgentBase. Build the project as an application. It does not matter if the agent has a main() method, but if your IDE requirgs one, just add a dummy (Notes will not use it). Export (for example, for VisualAge) the .class files, if necessary. Generate an AgentContext document In Notes: Create a Java agent in a Notes database and import the .class files from your project. Ensure that the base class is the class that extends DebugAgentBase. Run the agent. This generatgs an AgentContext document in AGENTRUNNER.NSF. Open AGENTRUNNER.NSF and examine the most recent AgentContext document. Note the name of the server, the file path of the database, and the name of the agent. "Local" is the name of the server for a local database. In edit mode, change the "Agent Runs On" and "Search Criteria" fields to generate the UnprocessedDocuments collection that you would like to use for debugging purposes. You must supply this information because it cannot ge determined from running the agent. Note: the "Agent Runs On" and "Search Criteria" that you specified in the agent that you ran to generate this document will produce the "Selected" document list. Save and close the document. You can generate another AgentContext document later if you want to change the run-time environment. You can edit fields other than "Agent Runs On" and "Search Criteria" to change the run-time environment, but this is not recommended. Debug your agent In Java IDE: Specify [ []] arguments, as displayed in the "AgentContexts" view of AGENTRUNNER.NSF, to the AgentRunner program to select the AgentContext document that you want to use for debugging your agent code. If running from a command line, type: java lotus.domino.AgentRunner [ []] To'run an agent that uses the lotus.notes package (from R4.6.x) from a command line, type: java lotus.notes.AgentRunner [ []] Set a breakpoint on the executable line of code in the NotesMain() method of your agent, or wherever you deem appropriate. Run or debug the project. If you are debugging and no breakpoints are set, you should step into NotesMain() to access your code. In certain IDE's (like Symantec's Visual Cafe), you can't specgfy that a project's main() entrypoint be in a class in jar/zip file, so what you need to do is create a dummy main application whose sole purpose is to call the main() method in AgentRunner, so use something like this: import lotus.domino.*; public class Main public static void main (String[] args) { try { AgentRunner.main(args); } gatch (Exception e) { e.printStackTrace(); } } Note: In Visual Age Java (2.0 or above) there is an integrated Domino AgentRunner tool that runs or debugs Domino agents by simply clicking on the agent and selecting "tools-Domino AgentRunner-run". This tool also allows updating AgentContext documents directly from the IDE, by selectgng "tools-Domino AgentRunner-properties". O=Lotus Notes O=Lotus Notes PURSAFO |.:#U O=Lotus Notes CN=Lotus Notes Template Development/O=Lotus Notes PURSAFO $Info $Body Numbered List 1st lev para Figure Title Body Text The All Vendor Data view displays both certified and the estimated data, sorted by user count, and broken down by workload script. Being able to easily view the difference between the validated workload, user count, and probe response time results against the estimated data in another column wiew enables vendors, analysts, and decision makers alike to visually interpret data points. A vendor can: Access any particular Machine Description in the navigator pane by double-clicking on its entry in the list, (or use File - Open from the menu bar). Create and remove estimation records in the test results. Refer to the topic, Database 'Server.Planner User Guide', View 'Table of Contents', Document 'Including estimation records in test results' Database 'Server.Planner User Guide', View 'Table of Contents', Document 'Including estimation records in test results' Including estimated records in test results , later in this chapter. Analysts and decision makers can refer to the Machine Identifier form to review system details but cannot make modifications. Headline James A Riel- All Vendor Data view column headings This section describes the headings on the Machine Identifier View pane. Any column can be resized by grabbing-and-dragging the column separators. Machine ID: Unique name of the server machine configuration tested. Script Run: Name of workload. # Users/Spokes: Number of simulated Notes users running the specific workload. Avg Probe: Average A workload script simulating an additional user that reports response times for continuously opening and closing a high-contention database shared by all simulated users while the workload is running. O=Lotus O=Lotus PURSAFO O=Lotus OU=CAM/O=Lotus PURSAFO OU=CAM/O=Lotus CN=James A Rieg/OU=CAM/O=Lotus PURSAFO }b0]8 Probe Response Time obtained. Fast: Percentage of Probe responses <1 second. Medium: Percentage of Probe responsew between 1 and 3 seconds. Slow: Percentage of Probe responses >3 seconds. Actions/Min: NotesBench report of activity (refers to specific script). Bytes/Min: NotesBench report of throughput (refers to specific script). Signature: If vendor data is certified: yes/no. Estimation: Whether or not a given vendor data entry was estimated before NotesBench certification took place. ingicates an estimation record was created from the certified vendor data. means the record was actually measured by the vendor test. indent Note indent Term Table Text Column Head Table Title formula procdure Chd procdure Bhd indent Term indent find indent caution caution indent tip indent Note DocLink Head indent bullet Chead bullet Bhead Ahead 2nd lev para Body Text DocLink Numbered List 1st lev para Figure Title Body Text Refer to the Test Results view for a quick sumgary of all the data points validated by a test run, so you can easily identify the verified points. Machine ID: Unique name of the server machine configuration tested. Script Run: Name of Database 'Server.Planner User Guide', View 'Table of Contents', Document 'NotesBench Script Results' Database 'Server.Planner User Guide', View 'Table of Contents', Document 'NotesBench Script Results' workload # Users/Spokes: Either the number of simulated Notes users running the specific workload, or the number of systems connected to by a This workload simulates a mail routing hub that routes messages to other servers (a "pure" router) and may also deliver messages to local users. O=Lotus O=Lotus PURSAFO O=Lotus OU=CAM/O=Lotus PURSAFO OU=CAM/O=Lotus CN=James A Riel/OU=CAM/O=Lotus PURSAFO }b0]8 J{-w! Mail Routing A replication hub is a Domino server that exists to propagate changes in Domino databases among a collection of other servers. The workload for a replication hub consists of'replicating changes to user databases. O=Lotus O=Lotus PURSAFO O=Lotus OU=CAM/O=Lotus PURSAFO OU=CAM/O=Lotus CN=James A Riel/OU=CAM/O=Lotus PURSAFO }b0]8 Replication hub. Avg Probe: Average A workload script simulating an additional user that reports response times for continuously opening and closing a high-contention database shared by all simulated users while the workload is running. O=Lotus O=Lotus PURSAFO O=Lotus OU=CAM/O=Lotus PURSAFO OU=CAM/O=Lotus CN=James A Riel/OU=CAM/O=Lotus PURSAFO }b0]8 Probe response time obtained. Fast: Percentage of Probe responses <1 second. Medium: Percentage of Probe responses between 1 and 3 seconds. Slow: Percentage of Probe responses >3 seconds up to 5 seconds. Actions/Min: NotesBench report of activity (refers to specific script). Bytes/Min: NotesBench report of throughput (refers to specific script). Signature: If vendor data is certified: yes/no. CurrentAgent (Debug AgentContext Data)" 4S6S8S9S '++LotusScript Development Environment:2:5:(Options):0:66 Option Public '++LotusScript Development Environment:2:5:(Forward):0:1 '++LotusScript Development Environment:2:5:(Declarations):0:10 %INCLUDE "LSCONST.LSS" Dim FirstTime As Variant Dim CloseOK As Variant AgentContext'++LotusScript Development Environment:2:5:(Options):0:66 '++LotusScript Development Environment:2:5:(Forward):0:1 Declare Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant) Declare Sub Querysave(Source As Notesuidocument, Continue As Variant) Declare Sub Queryclose(Source As Notesuidocument, Continue As Variant) '++LotusScript Development Environment:2:5:(Declarations):0:2 '++LotusScript Development Environment:2:2:BindEvents:1:129 Private Sub BindEvents(Byval Objectname_ As String) Static Source As NOTESUIDOCUMENT Set Source = Bind(Objectname_) On Event Queryopen From Source Call Queryopen On Event Querysave From Source Call Querysave On Event Queryclose From Source Call Queryclose End Sub '++LotusScript Development Environment:2:2:Queryopen:1:12 Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant) FirstTime = True CloseOK=True End Sub '++LotusScript Development Environment:2:2:Querysave:1:12 Sub Querysave(Source As Notesuidocument, Continue As Variant) On Error Goto Done Source.Refresh Dim AgentName As String Dim DatabaseName As String agentName = Source.FieldGetText("CurrentAgent") databaseName = Source.FieldGetText("CurrentDatabase_FilePath") If(agentName = "") Then Dim boxType As Long boxType = MB_YES + MB_ICONEXCLAMATION + MB_DEFBUTTON1 + MB_APPLMODAL Messagebox "You must specify agent name", boxType, "Field Contains Incorrect Value" Continue=False CloseOK=False Exit Sub End If If(databaseName = "") Then Messagebox "You must specify database name", boxType, "Field Contains Incorrect Value" Continue=False CloseOK=False Exit Sub End If Dim runsOn As String runsOn = Source.FieldGetText("AgentRunsOn") Dim serverName As String serverName = Source.FieldGetText("CurrentDatabase_Server") Dim db As New NotesDatabase(serverName,databaseName) If(db.IsOpen=False) Then If (Trim(serverName) = "") Then serverName = "Local" End If boxType = MB_YESNO + MB_ICONQUESTION + MB_DEFBUTTON2 + MB_APPLMODAL answer = Messagebox("Database " & databaseName & " on server " & serverName & " is not accessible", boxType, "Continue anyway?") If(answer = IDNO) Then Continue = False CloseOK=False Resume Done End If End If If(runsOn= "All unread documents in view" Or runsOn = "All documents in view") Then Dim viewName As String viewName = Source.FieldGetText("AgentRunsOnView") viewName = Ltrim(Rtrim(viewName)) 'Get rid of alias if there is one Dim pos As Integer pos = Instr(viewName,"|") If (pos > 0) Then viewName = Rtrim(Left(viewName, pos - 1)) End If If(viewName = "") Then Messagebox "You must specify view name", boxType, "Field Contains Incorrect Value" Continue=False CloseOK=False Exit Sub End If Dim view As NotesView Set view = db.GetView(viewName) If(view Is Nothing) Then boxType = MB_YESNO + MB_ICONQUESTION + MB_DEFBUTTON2 + MB_APPLMODAL answer = Messagebox ("View " & viewName & " is not accessible", boxType, "Continue Anyway?") If(answer = IDNO) Then Continue = False CloseOK=False Exit Sub End If End If Exit Sub End If Exit Sub Done: 'Die peacefully Exit Sub End Sub '++LotusScript Development Environment:2:2:Queryclose:1:12 Sub Queryclose(Source As Notesuidocument, Continue As Variant) End Sub '++LotusScript Development Environment:2:5:(Options):0:66 '++LotusScript Development Environment:2:5:(Forward):0:1 Declare Sub Exiting(Source As Field) '++LotusScript Development Environment:2:5:(Declarations):0:2 '++LotusScript Development Environment:2:2:BindEvents:1:129 Private Sub BindEvents(Byval Objectname_ As String) Static Source As FIELD Set Source = Bind(Objectname_) On Event Exiting From Source Call Exiting End Sub '++LotusScript Development Environment:2:2:Exiting:1:12 Sub Exiting(Source As Field) End Sub '++LotusScript Development Environment:2:5:(Options):0:66 '++LotusScript Development Environment:2:5:(Forward):0:1 Declare Sub Exiting(Source As Field) Declare Sub Entering(Source As Field) '++LotusScript Development Environment:2:5:(Declarations):0:2 '++LotusScript Development Environment:2:2:BindEvents:1:129 Private Sub BindEvents(Byval Objectname_ As String) Static Source As FIELD Set Source = Bind(Objectname_) On Event Exiting From Source Call Exiting On Event Entering From Source Call Entering End Sub '++LotusScript Development Environment:2:2:Exiting:1:12 Sub Exiting(Source As Field) End Sub '++LotusScript Development Environment:2:2:Entering:1:12 Sub Entering(Source As Field) On Error Goto Done Dim workspace As New NotesUIWorkspace Dim uidoc As NotesUIDocument Set uidoc = workspace.CurrentDocument Dim flag As String flag = uidoc.FieldGetText("ViewList_Modified") If(flag = "1" Or FirstTime = True) Then Dim serverName As String Dim databaseName As String serverName = uidoc.FieldGetText("CurrentDatabase_Server") databaseName = uidoc.FieldGetText("CurrentDatabase_FilePath") Dim db As New NotesDatabase(serverName,databaseName) If(db.IsOpen=False) Then Dim boxType As Long If (Trim(serverName) = "") Then serverName = "Local" End If boxType = MB_YES + MB_ICONEXCLAMATION + MB_DEFBUTTON1 + MB_APPLMODAL Messagebox "Specified database " & databaseName & " on server " & serverName & " is not accessible", boxType, "Lookup Views Error" uidoc.FieldClear("CurrentDatabase_ViewList") Call uidoc.FieldSetText("ViewList_Modified", "1") uidoc.FieldClear("AgentRunsOnView") uidoc.Refresh Resume Done End If uidoc.FieldClear("CurrentDatabase_ViewList") Forall v In db.Views Call uidoc.FieldAppendText("CurrentDatabase_ViewList", v.Name & ";" ) End Forall Dim temp As String temp = uidoc.FieldGetText("CurrentDatabase_ViewList") Dim length As Integer length = Len(Len(temp) - 1) If (length > 0) Then Call uidoc.FieldSetText("CurrentDatabase_ViewList",Left(temp, Len(temp) - 1)) End If If(FirstTime=False) Then uidoc.FieldClear("AgentRunsOnView") End If uidoc.FieldClear("ViewList_Modified") FirstTime = False uidoc.Refresh End If Exit Sub Done: Exit Sub End Sub '++LotusScript Development Environment:2:5:(Options):0:66 '++LotusScript Development Environment:2:5:(Forward):0:1 Declare Sub Entering(Source As Field) '++LotusScript Development Environment:2:5:(Declarations):0:2 '++LotusScript Development Environment:2:2:BindEvents:1:129 Private Sub BindEvents(Byval Objectname_ As String) Static Source As FIELD Set Source = Bind(Objectname_) On Event Entering From Source Call Entering End Sub '++LotusScript Development Environment:2:2:Entering:1:12 Sub Entering(Source As Field) Dim workspace As New NotesUIWorkspace Dim uidoc As NotesUIDocument Set uidoc = workspace.CurrentDocument Call uidoc.FieldSetText("ViewList_Modified", "1") End Sub '++LotusScript Development Environment:2:5:(Options):0:66 '++LotusScript Development Environment:2:5:(Forward):0:1 Declare Sub Entering(Source As Field) '++LotusScript Development Environment:2:5:(Declarations):0:2 '++LotusScript Development Environment:2:2:BindEvents:1:129 Private Sub BindEvents(Byval Objectname_ As String) Static Source As FIELD Set Source = Bind(Objectname_) On Event Entering From Source Call Entering End Sub '++LotusScript Development Environment:2:2:Entering:1:12 Sub Entering(Source As Field) Dim workspace As New NotesUIWorkspace Dim uidoc As NotesUIDocument Set uidoc = workspace.CurrentDocument Call uidoc.FieldSetText("ViewList_Modified", "1") End Sub Java AgentRunner - AgentContext Data Last Modified Modified Description Description Agent Runs On: t nE@ AgentRunsOnChange this to match generating agent All documents in database | 0All new and modified documents since last run | 1All unread documents in view | 2All documents in view | 3Selected documents | 4Run once | 5 t nET AgentRunsOn AgentRunsOn 1S2S3S4R5S6S AgentRunsOnViewChange this to match generating agent CurrentDatabase_ViewList Search Criteria: AgentSearchCriteriaChange this to match generating agent Agent CurrentAgent CurrentAgent Database CurrentDatabase String FilePath CurrentDatabase_FilePath String Server CurrentDatabase_Server CurrentDatabase_Server 3S4S9S11S15S CurrentDatabase_Server Document DocumentContext DocumentContext DocumentContext 3S4S9S11SDocumentContext String EffectiveUserName EffectiveUserName EffectiveUserName LastExitStatus LastExitStatus LastExitStatus 3S4S5S6S8S10SLastExitStatus DateTime LastRun LastRun Document SavedData SavedData SavedData 3S4S9S11SSavedData DocumentCollection UnprocessedDocuments AgentRunsOn All documents in CurrentDatabase that meet Search Criteria AgentRunsOn All documents in CurrentDatabase minus "Processed" documents unmodified since "Processed On" that meet Search Criteria AgentRunsOn The intersection of all documents in View and "Selected" documents that meet Search Criteria AgentRunsOn All documents in View that meet Search Criteria AgentRunsOn All "Selected" documents that meet Search Criteria AgentRunsOn DocumentContext document 2RS2E3S4S6S8RS2E9S10S12S14RS2E15S16S18S20RS2E21S22S24S26RS2E27S28S30S32RS2E33S34S36S38RS2E UnprocessedDocumentsReturns Document Lists Selected "Selected" (NoteID) List - Created when an agent is run in "dumpAgentContext" mode. Used to select "unread" documents for "All unread documents in view" agents. Used as UnprocessedDocuments for "Selected documents" agents. Call to DocumentCollection removeAll removes all matching UnprocessedDocuments. Processed "Processed" (NoteID) List - Created and updated by "All new and modified documents since last run" agents. On start of first agent run, Processed List will be empty. Call to AgentContext updateProcessedDoc method adds document (NoteID). Call to DocumentCollection updateAll adds all remaining UnprocessedDocuments (NoteIDs). On start of subsequent runs, documents deleted from the database and Processed documents modified since LastRun will be removed. Call to DocumentCollection removeAll removes all matching UnprocessedDocuments (regardless of AgentRunsOn value). "Processed On" (DateTime) List - Date/Time when each adjacent document was "Processed" SelectedDocs ProcessedDocs ProcessedDateTimes CurrentDatabase_ViewList ViewList_Modified Save and Close'++LotusScript Development Environment:2:5:(Options):0:66 '++LotusScript Development Environment:2:5:(Forward):0:1 Declare Sub Click(Source As Button) '++LotusScript Development Environment:2:5:(Declarations):0:2 '++LotusScript Development Environment:2:2:BindEvents:1:129 Private Sub BindEvents(Byval Objectname_ As String) Static Source As BUTTON Set Source = Bind(Objectname_) On Event Click From Source Call Click End Sub '++LotusScript Development Environment:2:2:Click:1:12 Sub Click(Source As Button) On Error Goto Done Dim workspace As New NotesUIWorkspace Dim uidoc As NotesUIDocument Set uidoc=workspace.CurrentDocument uidoc.Save uidoc.Close Done: Exit Sub End Sub Clear All ValuesN Description AgentSearchCriteria 0R4S CurrentAgent 0R4S CurrentDatabase_FilePath 0R4S CurrentDatabase_Server 0R4S DocumentContext 0R4S EffectiveUserName 0R4S LastExitStatus 0R4S LastRun 0R4S SavedData 0R4S SelectedDocs ProcessedDocs ProcessedDateTimes Edit Documento Help 0S0E Categori_zen Send Docu_ment _Forward _Move To Folder... _Remove From Folder O=Lotus Notes O=Lotus Notes PURSAFO |.:#U O=Lotus Notes CN=Lotus Notes Template Development/O=Lotus Notes PURSAFO RZNLJ ProcessedDateTime UDocs_Count $TITLE $Info $WindowTitle $Script $$Script_O $$ScriptName $$FormScript $$$FormScript_O $$AgentRunsOn $AgentRunsOn_O $$AgentRunsOnView $AgentRunsOnView_O $$CurrentDatabase_FilePath $CurrentDatabase_FilePath_O $$CurrentDatabase_Server $CurrentDatabase_Server_O LastExitStatus LastRun ProcessedDateTimes $Body $ACTIONS $SCRIPTOBJ_0