• Browse Blogs
  • My Blog
  • My Updates

+Tags Get help with tags?

  • View as cloud  | list

+ Similar Blogs

photo

Henning Schmi...

54 Entries |  Henning Schmidt
Updated 
RatingsRatings 1     No CommentsComments 0
photo

Patrick Picar...

62 Entries |  Patrick Picard
Updated 
RatingsRatings 2     CommentsComments 112
photo

Beyond The Ye...

247 Entries |  Peter Presnell
Updated 
RatingsRatings 13     CommentsComments 396
photo

Lotus Nut

111 Entries |  Chris Whisonant
Updated 
RatingsRatings 23     CommentsComments 157
photo

TexasSwede

109 Entries |  Karl-Henry Martinsso...
Updated 
No RatingsRatings 0     CommentsComments 94

+ Blog Authors  

All entries tagged with lotusscript

1 - 4 of 4
  • Previous
  • Next
  • Page   1

8.5.1 changed my way of codeing

Urs Meli |   | Tags:  8.5.1 else lotusscript | Comments (5)  |  Visits (573)
 A few day's ago I had to write 3 simple webagents to set some field: status, username and time/date.
Before ELSE (Eclipse Lotus Script Editor) I would write 3 webagents with almost the same code:

public sub webagent1
dim s as notessession
dim context as notesdocument
set s = new notessession
set context = s.documentcontext
call context.replaceitemvalue("Status","3")
...
...
end sub

and for the second agent:

public sub webagent2
dim s as notessession
dim context as notesdocument
set s = new notessession
set context = s.documentcontext
call context.replaceitemvalue("Status","3")
...
...
end sub

Lots of duplicate code.
With ELSE I changed the code to use classes.
Public Class WebagentClass
private s as notessession
private context as notesdocument
private username as string
public sub new()
set me.s=new notessession
set me.context =s.documentcontext
me.username =s.effectiveusername
end sub

public sub webAgent1()
 call me.context.replaceitemvalue("Status","3")
call me.context.save(true)
end sub
public sub webAgent2()
call me.context.replaceitemvalue("Status","4")
call me.context.replaceitemvalue("Editor",me.username)
call me.context.save(true,false)
end sub
end Class





No RatingsRatings 0

Recompile in 8.0.2

Urs Meli |   | Tags:  lotusscript recompile | Comments (0)  |  Visits (823)

Today I was forced to recompile a database with Notes 8.0.2. I was very surprised.

Recompile time dropped from about an hour (in Notes 7.0.2) to 5 minutes.

No RatingsRatings 0

Agent Performance Tuning - Stupid mistakes

Urs Meli |   | Tags:  lotusscript performance agents programming | Comments (0)  |  Visits (715)

 

Today I tested my agent, which updated some calendar entries, which were replicated via LEI from a MSSQL database.

Lei replicated the data in a notesdatabase in under a minute. After the replication, LEI started my agent, which took more then 1900 seconds to process around 1000 entries.

 

The problem was, that the LEI replication job started every 30 minutes. The agent stopped with the error "document has been deleted".

Change the replication schedule would solve the problem. But more than 30 minutes for my agent? I can do better.

 

The agent used a lot of Notesdatabase.search() calls to prevent duplicated entries in the users calendar.

 

Refactoring the Notesdatabase.search() to Notesview.getAlldocumentsbyKey() and some minor improvements made a nice performance boost.

The result: from around 1900 Seconds to 160  to 190 seconds for the same amount of documents.

 

The use of the search() method has been chosen to avoid changing the mailtemplate (multilingual environment R7 migrating to  R8). And in

the test environment I only used too less data....

 

Now the agent checks wether a special view is available and creates it if needed.

 

The first solution is not necessary the best.....

No RatingsRatings 0

Messing with the content type

Urs Meli |   | Tags:  content-type webagent lotusscript | Comments (0)  |  Visits (421)
Today, while I was editing a webagent my domino 8.0.1 testserver suddenly crashed.
Everytime I started the agent, my server would crash.

NSD showed just a FATAL error in nhttp with a "Access Violation" message.
I added lots of debug messages to the openlog database. These messages showed me, that the agent had finished successfull before the server crashed.

After investigating the agent a lttle more, adding some additional Print statements, I found the problem.
To have a clean HTML output I added the code: print "content-type:text/html" so my output had the right mime-type.
While refactoring the code I split it into several subroutines and made the mistake to add content type to a string.
My code looked like this

dim result as string

result = "content-type:text/html"
result = result & "<html><head>"
.... [lots of html code here]
print result

After changing the first result= back to print, the agent was working as expected and without crashing the server.

Seems that messing with the content type can crash a domino server.

If this is a bug in domino, than every one, which can create Lotusscript agents and run them through the browser, would be able to crash the server.


No RatingsRatings 0

  • Previous
  • Next
Jump to page of 1
Skip to main content link. Accesskey S
IBM Lotus Connections Help Tools About