在数据库之间共享 LotusScript 库

发布于 2024-08-20 18:51:28 字数 235 浏览 6 评论 0原文

是否可以在一个数据库中创建 LotusScript 库,然后从另一个数据库访问它?

无需简单地将库复制到需要使用它的每个数据库中。

我想要实现的是一个可以更新库的位置,而不必手动将其复制到正在使用它的每个数据库。我无法使用设计模板,因为使用此脚本库的数据库都使用不同的设计模板。

我想另一个解决方案是创建一个代理,以便在更新时将库复制到所有数据库。因此,如果有人以前做过类似的事情,那么我也想在这里介绍一下。

Is it possible to create a LotusScript library in one database and then access it from another database?

Without simply copying the library into each database that needs to use it.

What I would like to achieve is a single location where I can update the library and not have to manually copy it over to each database that is using it. I can't use a design template as the databases that use this script library all use different design templates.

I guess another solution would be to create an agent to copy the library out to all databases whenever it is updated. So if anyone has done anything like that before then I would also like to here about it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

清欢 2024-08-27 18:51:28

Lotus Notes 中的设计继承不仅仅在数据库级别 - 各个设计元素(例如脚本库)可以显式地从不同的模板继承。请参阅链接各个设计元素到模板

通过像这样设置继承, Domino 服务器上的设计器 任务将自动更新设计元素。为此,必须将模板复制到同一服务器。

您可能希望在发布模板时禁用此继承,以避免在生产环境中出现令人讨厌的意外情况。我不久前为此创建了一个解决方案: 以编程方式删除 Lotus Notes 设计元素继承< /a>.

Design inheritance in Lotus Notes isn't only on database level - individual design elements (such as your script library) can be explicitly inherited from a different template. See Linking individual design elements to a template.

With inheritance set up like this, the designer task on the Domino server will update the design element automatically. For this to work, the templates must be replicated to the same server.

You might want to disable this inheritance when you release your template, to avoid nasty surprises in the production environment. I created a solution for this a while ago: Remove Lotus Notes design element inheritance programatically.

孤云独去闲 2024-08-27 18:51:28

安德斯很好地回答了这个问题。正如 Anders 已经说过的,不幸的是,Domino 无法在数据库之间共享代码库。所有代码都是独立的,这在这种情况下是一个限制。

将代理复制到您想要使用它的所有数据库中,然后采用设计继承是分发代理的一种快速而简单的方法。

另一种想法是使用一个数据库作为代理存储库,因此如果您需要一遍又一遍地重复使用同一个代理,它的设计始终在一个数据库中,但您需要对其进行设计,以便它可以对您需要更新的所有数据库执行操作。

实际上,仅使用每个数据库作为数据源,并且相关代理在一个位置进行操作。这将需要更多的工作来允许您定义一些额外的配置文档,代理将使用这些文档来识别您希望代理在哪些数据库上运行。

这种方法的优点是:

  • 您无需处理设计继承问题。当您拥有复杂的脚本库/设计结构时,它可能会变得大规模混乱,您可能必须购买第三方工具来帮助您做到这一点。

  • 您实际上可以通过一系列配置文档集中控制更新哪些数据库,其中使用标记数据库进行更新的“活动/非活动”字段。而不是直接“接触”代理,这需要您亲手启用/禁用代理。在一些严格控制的企业环境中,您需要不断要求 Notes 管理员为您执行此操作。

  • 您可以对代理进行编码,以便它在每个数据库上运行时在您自己的自定义日志文档中报告活动,并集中存储它。

    您可以对代理进行编码,以便

希望这能为您提供一些选择...

Anders has answered the question very well. As Anders has already said, Domino, unfortunately, cannot share code libraries between databases. All the code is self contained, which is in this scenario a limitation.

Copying the agent into all the databases you want to use it for, and then employing design inheritance is a quick and easy way to distribute the agent.

An alternative idea, is to have a single database that serves as a repository of agents, so if you need to re-use the same agent over and over, it's design is always in one database, but you will need to design it so that it can perform operations on all the database you need to update.

Effectively, using each database as a datasource only, and the relevant agent(s) operating from one location. It will require some more work that will allow you to define some additional configuration documents that the agent(s) would use to identify which databases you want the agent to run on.

The advantages of this approach are :

  • You don't need to contend with design inheritance. It can get messy on a large scale when you have complex script library/design structures, you may have to buy third party tools to help you do this.

  • You can actually control which databases get updated via a series of configuration documents centrally with an "active/inactive" field that flags the database for update. Rather than directly "touching" the agents which requires you to get your hands dirty with enabling/disabling the agent. In some corporate environments which are tightly controlled, you need to keep asking the Notes admin to do this for you.

  • You can code the agent so that it reports activity in your own custom log documents when it runs on each database, and centrally store it.

Hope this provides you with some options...

辞别 2024-08-27 18:51:28

您可以在数据库之间共享 LotusScript 库。将脚本导出到后缀为 .lss 的文件,并将其放置在 domino 服务器上的 domino 文件夹中。然后您可以像普通 LotusScript 库一样编写“use "script.lss"”。您可以在 domino 文件夹中看到已经有一些库,例如。 lsconst.lss

You can share a lotusScript library between databases. export the script to a file with the suffix .lss and place it on the domino server in the domino folder. Then you can write "use "script.lss" " as with normal LotusScript libraries. You can see in the domino folder there are already some libraries eg. lsconst.lss

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文