Бюллетень "Lotus Notes CodeStore"

  Все выпуски  

Achieving ultimate storage and server cost savings with DAOS in IBM Lotus Notes and Lotus Domino 8.5


Рассылку ведет: Программист на Lotus NotesLotus CoderВыпуск No 203 от 2009-07-10
рассылка о программировании на Lotus Notes/Domino
Обсуждения на форумах, блогах. Примеры программного кода на LotusScript,@formula, Java

рассылка:выпускархивлентаблогсайт

Бюллетень "Lotus Notes CodeStore" Выпуск 13 от 21.04.2008

comp.soft.prog.lotuscodesrore

CodeStore. Примеры кодов

Еще примеры:
Больше кодов на сайтах:

Форумы.Свежи темы и обсуждения

Ситуация следующая:
В офисе установлен босс-референт на базе IBM Lotus Domino/Notes, неделю назад у нескольких пользователей, при обращении к базам, стало выскакивать сообщение нет привязки к коммутатору. Нашел ответ здесь же на форуме, исправил.
Теперь при обращении к любой базе выскакивает ошибка Lotus - Нет связи с базой данных после нажатия ОК вылетает сразу же еще одна - Field: 'Acess_User': Entry not found in index. Все правила доступа к этим базам прописаны, я их даже поставил без ограничений для группы. Ничего не произошло.
Знающие люди, с чем это может быть связано?
Ребят подскажите, как в 1С можно обрабатывать ошибки... Например в lotus в код вставляешь вот такие строчки:

On Error Goto ErrH

.... далее идет любой код....

ErrH:
Call MsgError(ModuleName$+"(v."+Cstr(ModuleVersion%)+").."+ ProcName$+"//" _
+"Ошибка:"+Error()+"//" _
+"Номер:"+Cstr(Err())+"//" _
+"В строке:"+Cstr(Erl()),True)
Call CreationProtocolBySettings(RateDb,SettingsDoc,processname)
Resume ex


И если происходит какая-нито ошибка в коде, то сразу переходит на метку ErrH и выдает сообщение об ошибка... как такое же провернуть в 1С:Предприятие...
Здравствуйте, уважаемые разработчики.

Краткая заметка о виртуальной машине LS и системе ее команд находится во вложении.
А здесь мы рассмотрим некоторые примеры.

Преобразования типов и встроенные функции
Встроенные функции, возвращающие строки, (Chr, Ucase, Lcase и другие) в зависимости от написания (Chr или Chr$) возвращают либо Variant of DataType 8 (String), либо String.
Посмотрим, как это выглядит "внутри".
Dim s As String
s = Chr(13)
s = Chr$(13)
После трансляции:
    Dim S As String
line #
    lvalue_l S
    push_long 13
    Chr
    Cvar
    Cstr
    Let
line #
    lvalue_l S
    push_long 13
    Chr
    Cstr
    Let
В первом присвоении выполняется лишнее преобразование типов, чего можно избежать, используя "$" в имени функции.

Select Case
Код
Public Sub printNumber(x As Integer)
    Select Case x
    Case 0: Print "zero"
    Case 1: Print "one"
    Case Else: Print "something else"
    End Select
End Sub
транслируется в
Public Sub PRINTNUMBER(X As Integer)
line # 13
line #
    goto label_3
label_0:
line # 14
    stack_copy
    push_int_0
    =
    if_false_goto label_1
    pop
line #
    push_str_const {zero}
    Print
line #
    goto label_4
label_1:
line # 15
    stack_copy
    push_int_1
    =
    if_false_goto label_2
    pop
line #
    push_str_const {one}
    Print
line #
    goto label_4
label_2:
    pop
line # 16
    push_str_const {something else}
    Print
line #
    goto label_4
label_3:
line #
    rvalue_pi X
    goto label_0
label_4:
line # 18
    end_routine
End Sub
Что здесь происходит. Переменная x сравнивается с каждым из значений в операторе Select Case последовательно. Если есть совпадение, выполянется соответствующий код и происходит переход на следующую за End Select строчку. Таким образом, если в вашем коде одна из веток Case ... встречается чаще других, ее следует поставить на первое место.

Вычисление булевых значений (операторы And, Or)
Некоторые компиляторы языков высокого уровня допускают частичное вычисление булевых значений: вычисление прекращается, как только будет известно его значение. К примеру, значение выражения False And x = 0 известро еще до вычисления значения x = 0, оно равно False. Компилятор языка Lotus Script всегда выполняет полное вычисление булевых значений, поэтому в LS невозможна проверка вида
If Not document Is Nothing And document.Created > cutOff Then
    ...
End If
    rvalue_p DOCUMENT
    push_Nothing
    Is
    Not
    rvalue_object DOCUMENT
    push_property CREATED
    call_routine
    rvalue_p CUTOFF
    >=
    And
    if_false_goto label_0
    ...
label_0:
Если все таки document Is Nothing, то вычисление document.Created вызовет ошибку.

Переменного числа аргументов не существует
Компилятор подставляет пропущенные значения.
Print Instr(x, "a")
транслируется в
    push_1
    rvalue_l X
    push_str_const {b}
    push_int 0
    Instr
    Print

Dim uiWorkspace As New NotesUIWorkspace()
Call uiWorkspace.Prompt(PROMPT_OK, "Test", "OK")
транслируется в
line # 
    lvalue_l UIWORKSPACE
    push_constructor NOTESUIWORKSPACE
    сall_constructor
    Set
line #
    rvalue_object UIWORKSPACE
    push_routine PROMPT
    push_num_const PROMPT_OK = 1
    push_str_const {Test}
    push_str_const {OK}
    push_int 0
    push_int 0
    call_routine
    pop


Расширенный синтаксис
Пришло время поставить все точки над ё в вопросе о расширенном синтаксисе. Сравним:
    Print document.GetItemValue("Form")(0)
    Print document.Form(0)
    
    Call document.ReplaceItemValue("Form", "test")
    document.Form = "test"
и
line # 
    rvalue_object DOCUMENT
    push_lsx_routine GETITEMVALUE
    push_str_const {Form}
    call_routine
    push_int_0
    rvalue_arr
    Print

line #
    rvalue_object DOCUMENT
    push_notes_function FORM
    push_int_0
    call_notes_function
    Print

line #
    rvalue_object DOCUMENT
    push_lsx_routine REPLACEITEMVALUE
    push_str_const {Form}
    push_str_const {test}
    call_routine
    pop

line #
    rvalue_object DOCUMENT
    lvalue_document_field FORM
    push_str_const {test}
    Let



А теперь переходим к части, обозначенной подзаголовком. Ваши вопросы, господа и дамы.
Интересные темы:
Список форумов:

Tips. Советы

By Scott Tomlinson

Last week, we discussed the end-of-life of options for Domino.doc. One approach is moving to a collaborative mixture of Quickr and FileNet, but the disadvantage of that is you lose an all-Domino solution. This week, we'll look at how you can retain full document management capabilities and stay in Domino completely.

Benefits of staying with an all-Domino solution
For many of you, this represents the most cost effective option for document management. There are some serious benefits to staying within Domino.

Leverage your existing Domino infrastructure
There's no additional infrastructure (and associated cost) required.

Flattens the learning curve
You already know the backend. You already have the Domino admin and development skills, so you just need to focus on the nuances of the application.

Even if you don't have the skills, the costs to obtain will be less than the equivalent J2EE resource. This is unlike the scenario we discussed last week, where you would have had to learn both a new backend (DB2 and WebSphere) and the document management application.

Quicker and easier data migration
You're going from one Domino app to another. More specifically, you're migrating from one Notes document to another. Customizations could be easier to move as well.

Tap here to learn lots more.

John Coolidge offers his list of useful Notes tools for developers and administrators. His list includes links so you can get your own copies.

Read | Permalink
This month's Sys Admin tips have been posted to LotusUserGroup.org. Tips include: "Editing Attachments Received in 8.5 via SMTP" and "Unable to Open Replica of Personal NAB on Server in Notes 8.5 Standard".

Read | Permalink


PDF CONVERSION FOR LOTUS NOTES
Convert Lotus Notes documents to PDF for sharing, archiving or web printing.

  • 1-step PDF: As easy as clicking a Lotus Notes toolbar icon
  • Archive email folders or views as a self-contained PDF
  • Convert any document collection into a PDF file
  • Produce print-quality output from Web applications
  • Client side or Server side conversion
  • Doesn't require any DLL files
  • LotusScript API for developers


Ready to learn more?

During a recent spurt of intensive JavaScripting the major revelation for me has been that you can use a function as the second parameter of the humble replace() method of a String.

We all know you can do this:

"Today is Tuesday".replace("Tues", "Wednes");

The result being the string "Today is Wednesday".

We probably all know you can get fancy and use Regular Expressions too. That's all old news though.

Adding Functionality To Replace

We can make the String's .replace() method even more powerful by using a function to work out what to replace any given string with. For example:

"Today is Wednesday".replace(/(\S+)day/g, function(matched, group){ switch ( group.toLowerCase() ){ case "to": return "Tomorrow"; case "wednes": return "Thursday"; case "thurs": return "Friday"; //etc default: return matched; } }
);

Again, the result of this would be the string "Tomorrow is Thursday". It's probably a poor example but it proves a point -- that you can get clever about what string is used as the replacement.

It works by looking for all words that end in "day". It then looks at the bit of the string before "day" to see what the day after it will be. Or, if the bit before "day" is "To" then it returns "Tomorrow". If it's a word ending in "day" that doesn't match a know day name then we just return the matched string unchanged.

Templating With Replace

Where this becomes useful is when you want to allow your applications to be configurable by the administrator/owner. If you have a string stored in JavaScript and want to replace a part of the string with another JavaScript variable then this has just become a whole lot easier.

Imagine the following JavaScript "application":

var myApp = { version: "1.3", name: "My App", config: { messages_welcome: "Welcome to version <%= version %> " + " of <%= name %>" }
} myApp.init = function(){ alert( myApp.config.messages_welcome.build() );
}

When the application's init() method is called it builds then displays a message like  "Welcome to version 1.3 of My App".

String.Build() ?

To transform the string using the template I added a method called "build" to the String class' Prototype, like so:

String.prototype.build = function(){ var re=/<%=?(.*?)%>/g; return this.replace(re, function (matched, group) { return myApp[ group ] || matched; } );
};

What does this do? Well, it looks at the string you asked it to "build" for anything inside the delimiters <%= %>. When it finds one it looks to see if the MyApp object has a property with a matching name. If so then the value of that property is replaced in to the string. If the property doesn't exist that part of the string remains unchanged.

It's hard to get across just how useful this can be but I've knocked up a little demo which might help. In the demo the init() method of the app takes a set of extra configuration setting which are applied (my username in this case) to the MyApp.config object and then, in turn, applied to the welcome message.

Click here to post a response

You can easily create an RSS feed application in Lotus Notes/Domino 8 using these steps. All you need to do is set up your Notes view and use some XML code. Read the full tip now for complete instructions.


Stuart McIntyre says LotusLive has had a make-over and is now back in business. You can get a 30-day trial of this online collaboration tool.

Read | Permalink
Franziska Tanner offers a shortened version of the problem. You really, really need to get the hotfixes for a couple of SPRs, and apply them, BEFORE you start the upgrade. Otherwise, bad things will happen.

Read | Permalink
Keith Brooks found an interesting quirk during his upgrade to Sametime 8.0.2. He assures us, ghostly services under Windows can be brought back to life.

Read | Permalink
Version 2.8 of the Lotus Notes Diagnostic tool is now available for download. This handy tool helps you analyze server crashes and performance issues.

Read | Permalink

Volker Weber discovered the recent change-over at LotusLive left data on the servers. But, since he's a "new person" under the new version he can't edit the old records.

Read | Permalink
Еще советы:
Смотри советы на сайтах:

Блоги. Что обсуждают и пишут

Author: Joseph Hoetzl
Tags: tabs ui interface tear tear-off
Idea:
I know we just got open in new back on tabs in 8.5, but I've become used to the tear off tabs in Chrome and now Firefox, so, I'd like to see tear off tabs to new window implemented in the Eclipse UI.

Author: Roland Reddekop
Tags: DAOS foundations
Idea:
In an SMB environment especially, where Email is king of collaboration, and they don't have SANS or even an IT department, we need the disk space relief that DAOS gives.

Author: Joseph Hoetzl
Tags: user dictionary user.dic roaming consistency
Idea:
Include the user dictionary, user.dic, as part of roaming profile data.

Author: Niel Revelle
Tags: lotusscript webservice
Idea:

In a Domino Web Service Provider you can access NotesSession.DocumentContext and see all of the CGI fields of the request, except for Request_Content.  This field is very helpful for debugging/testing.


Author: David Leedy
Tags: UI
Idea: In a recent twitter conversion a person had a complaint that Notes didn't have "Live Scrolling" in email.

Live Scrolling is where you take the scroll bar and dragging it instantly updates your view.

His comment was that this is just "expected behavior" in a modern application. I checked various programs (Apple Mail, File Explorers, etc) and did find live scrolling to be commonplace. I also checked iNotes, Full and Lite, and there was no live scrolling there either

Lotus Notes should add Live scrolling to at least the mail views. It would be nice if customer Databases could use it as well.

I think that any feature that improves the UI experience of the user is a good feature to add.
Author: Patrick Kwinten
Tags: rich text preferences
Idea:
I wasting daily time on formatting rich text items such as links (color, format) , tables (number of rows, columns), font-types, font-sizes etcetera.
 
It seems not possible to define 'my style' and have it easy available for me.
 
Would it be easier to have in stead of the 'defaults' the ability to set 'my defaults' and be able to work from there?

Еще записи:
Интересные блоги специалистов:

Статьи и Документация

In this article, we discuss the various features that you can leverage in IBM® Lotus Notes® and IBM Lotus® Domino® 8.5 to reduce your overall Lotus Domino server storage costs. We also outline how these savings affect more than just storage. We provide specific real-life savings seen by implementing these features in the Lotus Domino domain and how implementing DAOS inside IBM made a significant impact. We also show you how using the DAOS Estimator tool can provide you with information you need to determine your own cost savings.
In IBM® Lotus® Quickr™ versions earlier than 8.1.1, the public APIs supported only document-related services. Lotus Quickr 8.1.1 now has REST-based services for wiki and blog content, to enable creating, viewing, updating, and deleting wiki and blog content inside Lotus Quickr. This article focuses on the REST-style wiki and blog content service APIs, their usage, and how they can be leveraged to build custom solutions.
When you use a bookmark or icon to open a database in Lotus Notes, replicas open that you did not expect. This occurs only when you use unstacked icons on your workspace.
When running the "adminp" task in Lotus Domino, the process deletes users and their associated mail files. An .nrf file (redirect file) is created for each deleted mail database.
Alpha Tabs are the index tabs that can be used to move forward and backward in a list of Contact information in the Personal Address Book. Is this possible using Notes?
After upgrading your local contacts file from template version 6.x or 7.x, you notice that there is no longer a Briefcase tab.
This document contains the detailed system requirements for the 8.5 release of the Lotus Notes® client, Lotus® Domino Designer® client, and Lotus® Domino® Administrator client.
You have activated Notes Minder on your workstation. When you receive new messages the Notes Minder icon flashes, but the Mail Summary is empty. This issue seems to affect only users running Notes Minder alongside the Lotus Notes 6.5.4 client.
A lookup is performed on the first column (key) of a view containing two categorized columns and is supposed to return data from the second column. However, the lookup formula returns only the first value that matches the key, not all values which match the key.
This technote contains a link to a developerWorks article, "Creating a Notes/Domino plug-in with Eclipse,"
You are using six Lotus Domino partition servers with the following configuration: Data_dir=/notes/mail01, /notes/mail02, /notes/mail03, /notes/mail04, /notes/mail05, /notes/mail06 Prog_dir=/opt/lotus. When you attempt to start up the six servers, they all fail with error messages.
You replicate from an Oracle server, Unix platform (using the Sun operating system) to a Microsoft Windows operating system with Lotus Enterprise Integrator (LEI). If a cr/lf pair (0x0d0a) is encountered, the server crashes every time.
What entries does Trend Micro ScanMail (for a Lotus Domino server application) add to a Domino server's notes.ini file?
Также почитатай:
Найти документацию можно на сайтах:

В избранное