Solved

Agent behaving Strange !

Posted on 2003-12-09
24
569 Views
Last Modified: 2013-12-18
Hi guys


I have two databases, one copy of the other in two servers (say A and B).

IN the database i have a form and a webquerysave agent for that form . The webquerysave agent is able to get all the values in documentcontext in server A. but the same agent is not getting any values of documentcontext in server B

To tell u guys clearly ,a simple querystring display in two servers yield me different results

Assume the url is like this :test?openform&docid=3243432

the agent in serverA returns the query string as

OpenForm&Seq=1&docid=3243432


the agent in serverB returns the query string as
OpenForm&Seq=1

the cause of this problem which i am not trying to rule out is:

agent signer rights


but the ppl in server B claim that they relevant rights to run the agent


What else cud be the cause for documentcontext to be null in that server when the same are displayed in server A


Thanks guys
Partha







0
Comment
Question by:p_partha
  • 11
  • 7
  • 6
24 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9908694
1. Is this notes form/page
2. Do you have full passthru html
3. Is treat contents as html enabled ?

If you view source in html then the document content is enclosed in FORM tags ? If not then this could be a problem..

If you view sources for form A and form B .. they look same ??

Also these kind of  problems ca arise due to some incompatibility issues with DSAPI filters.. not sure if Server B uses one like that.. and anyother third party software that you might want to consider..

~Hemanth
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9908704
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9909160
Wait, if DOcumentContext was null, then the agent on server B wuld not report back query string as OpenForm&Seq=1!  It would fail with Object Variable Not Set!

try this for tesing purposes.  Temporarily add a visible, editable field to the form, named ContextCheck, with a default value of: @Unique + " " + @Text(@Now)

In your agent, just below the line that says something like set doc = s.documentcontext,  want you to add:
If doc Is Nothing Then
  MsgBox "No document context!"
Else
  MsgBox doc.noteID & "." & doc.universalID & " ContextCheck: " & doc.ContextCheck(0)
End If

Now, have someone work through the form on server B, note the value of the context check field.  You can then look in Misc Events in the log, to see what the agent reported.
0
 
LVL 14

Author Comment

by:p_partha
ID: 9909278
Hemanth,
It's a normal form, with generate html for all fields enabled.

Good point, i will check with them whether they are using any DSAPI filter. If at all they are using, what is the alternative for me.

Qwalette,
Since my agent was failing, i tested with a dummy form with webquerysave agent, and printed just doc.query_string(0)
will try ur alternatives and get back on the result

But guys any ideas what is the alternative apart from using openagent , if my documnet context is failing,

THx guys

Partha
0
 
LVL 14

Author Comment

by:p_partha
ID: 9909300
Also is this anyway related to "having rights with running agents"... or some thing related at server documnet level, as it is working in our development server.

One more point, the server B is a cluster server


Partha


0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9909582
f the agent runs at all, then it has some level of rights.  If it is doing anything rights-wise that cause it to terminate prematurely, you can probably catch it with On Error.

You can also create a global integer variable named terminatedNormally.  In your Terminate event, add:

If terminatedNormally
  MsgBox "Hapilly ever after"
Else
  MsgBox "Abend!"
End If

Then, at the end of you regular initialize code, do a terminatedNormally=True (and anywhere else you have an exit sub in Initialize or an end statement anywhere)
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9909598
Please also note that I find...

OpenForm&Seq=1&docid=3243432

...odd.  &Seq=1 is used when a user presses a button/action that does not close the form (simple refresh or file save or field-change formula).  Notes appends the &Seq so that the browser will not use a cached copy of te page.

So, why would &docid ever appear? Did you open teh form originally by URL, with this parameter?  Does that parameter actually appear in the URL when teh agent "fails?"  Or could it be that the agent is fine, but whatever mechanism you are using to add the QS parameter is behaving differently on the two servers, and the agent issue is a symptom, not a direct exhibition of the problem?
0
 
LVL 14

Author Comment

by:p_partha
ID: 9912636
Qwalette,
This is my original URL before i submit the document

http://<servername>/rater/Rater.nsf/pp.test?OpenForm&docid=3423432423


i have a submit button and webquerysave agent

The agent is this code

      Dim session As New notessession
      Dim doc As notesdocument
      Set doc = session.documentcontext
      If Not doc Is Nothing Then
            Print doc.Query_String(0)
      Else
            Print "doc is nothign can't do anything"
      End If



The url after submission changes to http://<servername>/rater/Rater.nsf/pp.test?OpenForm&Seq=1

and output of the agent is

OpenForm&Seq=1

I am confused here

Partha




0
 
LVL 24

Assisted Solution

by:HemanthaKumar
HemanthaKumar earned 100 total points
ID: 9913077
That is right.. Print will write a new content .. and domino recognizes that as a refresh..and adds &seq=1.. The problem is with the agent.. don't print it rather set the value of the field in the form for testing.

eg:

doc.Test = doc.Query_String(0)

or create field Query_String in the form and it will display the correct value
0
 
LVL 14

Author Comment

by:p_partha
ID: 9913473
Hemanth,

I was not printing the value, that is only for testnig purpose, but as i said, query_string is getting only &seq=1, so
&docid=3243432 which was also sent is lost. So i cannot get the value of the docid and my agent is failing , but the strangest part it is the same agent is working in couple of our development servers it is able to get the value of docid in query_string


Partha
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9913538
for testing purpose include query_string field in the form .. and see if it reflects the value properly. ALso is this in frame
0
 
LVL 14

Author Comment

by:p_partha
ID: 9913546
I have already added query_string in the form hemanth, is there any server document level settings....


Partha
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9913559
It is nothing to do with configurations !!
0
 
LVL 14

Author Comment

by:p_partha
ID: 9913728
Why i am asking u this becoz, the same agent is behaving differently in two servers. IN server A and in all my development servers, it is fetching the querystring with the docid, but in the server B it is fetching the value of querystring as openform&seq=1 .


Hope i am clear

Partha


0
 
LVL 31

Accepted Solution

by:
qwaletee earned 150 total points
ID: 9914874
Actually, I'm a bit confused.  WHat is teh user clicking on that causes teh doc to save?  If I put in a button that just says @COmmand([FilseSave]), then my WQSAgent runs, but the resulting URL is a ?CreateDocument URL, and thatis the query string value my agnet prints out.  So, teh agent sees the RESULT URL, not the URL that was displayed before the user clicked whatever button/action used to submit.

In other words, the fact that yuo see a ?OpenForm URL tells me that either you have something else in the "save button," or a $$Return that is redirecting to an ?OpenForm URL, which is unlikely given that there's the typical Domino &Seq=1.
0
 
LVL 14

Author Comment

by:p_partha
ID: 9915132
Qwalette, i will try to be clear.

I have a submit button on a form -- javascript --> document.forms[0].submit()

i have a webquerysave  -->@Command([ToolsRunMacro]; "pp.test")

No $$return

Agent code:

Dim session As New notessession
      Dim doc As notesdocument
      Set doc = session.documentcontext
      Print "Hai"
      If Not doc Is Nothing Then
            Print doc.query_string(0)
      Else
            Print "doc is nothing "
      End If



The url to the form is like this :

http://<servername>/rater/Rater.nsf/pp.test?OpenForm&docid=3423432423


When the submit button is clicked in server A , the url changes to
http://<servername>/Rater.nsf/pp.test?OpenForm&Seq=1&docid=3432432



The same code and the same url in server B , the url changes to
http://<servername>/Rater.nsf/pp.test?OpenForm&Seq=1

So when i see the querystring docid is not there...

Hope i am clear

Partha







0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9915606
I say it is not the normal stuff.. something is setting the docid back..while submit

Usually when this is the url

http://<servername>/Rater.nsf/pp.test?OpenForm

then after submit it will be
http://<servername>/Rater.nsf/pp.test?OpenForm&Seq=1

In your case if the initial url is
http://<servername>/rater/Rater.nsf/pp.test?OpenForm&docid=3423432423

Then after submit it would be
http://<servername>/Rater.nsf/pp.test?OpenForm&Seq=1

So check the FOrms in both the server for any javascript functions manipulating location object
0
 
LVL 14

Author Comment

by:p_partha
ID: 9915633
no Hemanth,

you can check, if ur URL IS of this format
http://<servername>/rater/Rater.nsf/pp.test?OpenForm&docid=3423432423 then after submit it becomes like this:

http://<servername>/rater/Rater.nsf/pp.test?OpenForm&seq=1&docid=3423432423

I am sure on that.... otherwise we cannot use querystring in the code itself...


since the datbaase is a copy of hte other there is no change
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9915667
for a test can you try a simple form with one field and manually add docid at the end of the url

I am pretty sure that seq=xx is always appended by domino far right of the url !
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9915676
Nope, I get what your server B does, and I created this as simply as possible:

Create agent:
Sub Initialize
      Dim s As New notesSession
      Dim doc As notesDocument
      Set doc = s.documentContext
      If doc Is Nothing Then
            Msgbox "============= NO CONTENT ==============="
            Print "============= NO CONTENT ==============="
            End
      End If
      Forall item In doc.items
            Msgbox item.name & "=" & item.text
            Print item.name & "=" & item.text "<BR>"
      End Forall
End Sub

New form, one subject field
Add QUERY_STRING field, CFD, text, value QUERY_STRING
Create button, set to run JS, document.forms[0].submit()
Set WQS to run above agent

Put in URL of above form, ?OpenForm&testitout

Results:
Subject=js submit!!!!!!
QUERY_STRING=CreateDocument
Form

Now, if I add a button with @Command([ViewRefreshFields]), and click the refresh button followed by the submit button, I get:
On refresh: the URL changes from ?OpenFOrm&somejunk to ?OpenForm&Seq=1
Notice that the extra parameters in the original query string are dropped on refresh.

Here's what I wonder: Are the two servers at the same version of Domino?  Perhaps some versions keep all parameters on refresh, and some do not.  Server B does not, server A does.  You have a refresh of some sort (not necessarily view [viewrfershfields]), and after that the user submits.
0
 
LVL 14

Author Comment

by:p_partha
ID: 9916258
Very Good point Qwalette, the server A is 5.0.11 and server B is 5.0.9... So that might be the problem right...

if yes then i will increase the poitns and give it to u and hemanth...

thx as always..

partha
0
 
LVL 14

Author Comment

by:p_partha
ID: 9916343
Guys
Is there any link where lotus documents what are the new additions/deletions from server 5.0.9a to 5.0.11 version...

Thx
Partha
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9916672
Ha ha ha ha ha ha ha!

Release notes are suposed to.  Theyd on't always really cover it, and nobody but nobody really wants to read them.
0
 
LVL 14

Author Comment

by:p_partha
ID: 9916727
The problem  is If i ask these guys to upgrade to 5.0.11 and this doens't solve the problem, then i will be jacked.. anyways will give a try.. thx bro.....


Partha
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Lotus Notes mail can not print out Full page 8 1,127
Lotus notes email code 6 112
Domino Server 2 72
@SETFIELD from LOOKUP showing incorrect decimal number dependant on region. 5 101
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now