Parameter transfer between proxies

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.