The agent uses the run method to compile the upload data to create a file in the first proxy. Returns the value to the item in the file, then obtains the object of the second proxy and uses the run method. The number of items in the run method is the first one. The noteid of the file created by the proxy, so that the noteid of the root file in the second proxy gets the file Then, perform a series of operations on the values in the file. Then in the first proxy Delete the previously created files in the internal storage, and then the root noteid is obtained by the second proxy. Operation and save the file, and then perform operations on the value in the file, so that a complete data volume is completed.
For example:
ParameterpassingProxy: Dim ss as new notessession Dim dB as notesdatabase Dim agent as notesagent Dim doc as notesdocument Dim item as notesitem Dim paramid as string Set DB = ss. currentdatabase 'to get the object of the proxy to run Set agent = dB. getAgent ("Invokedagent") 'Prepare to create a file Set Doc = dB. createdocument 'upload the value of the token to the created File Item Set item = Doc. appenditemvalue ("status", "NONE ") Call Doc. Save (true, false) 'to obtain the noteid of the file. Paramid = Doc. noteid' run proxy Call agent. Run (paramid) 'Remove the uploaded files from the memory (that is, the object referenced by the deleted file) Delete Doc 'to getInvokedagentFiles saved in proxy Set Doc = dB. getdocumentbyid (paramid) Set item = Doc. getfirstitem ("status ") Status = item. Text MessageBox "StatusInvokedagent= "& Status": Permanently uploads this file from the disk. Call Doc. Remove (true)
Invokedagent:
Dim ss as new notessession Dim dB as notesdatabase Dim agent as notesagent Dim doc as notesdocument Dim item as notesitem Dim noteid as string Set DB = ss. currentdatabase Set agent = ss. currentagent Noteid = agent. parameterdocid 'obtain the file according to the latest noteid. Set Doc = dB. getdocumentbyid (noteid )' Set item = Doc. replaceitemvalue ("status", "OK ") Call Doc. Save (true, false)
Bytes -----------------------------------------------------------------------------------------------------------------The above is a simple parameter transfer between proxies. Passing parameters using the runonserver method is similar to the run method.