Skip to content
Micky Hulse edited this page Jul 31, 2013 · 3 revisions

What are RULEs?

RULEs are also known as CSP (Caché Server Page) tags.

A few examples of common DTI RULEs:

  • <dti:popular ...>...</dti:popular>
  • <dti:story:link ... />...</dti:story:link>
  • <dti:file:include ... />

A few examples of common CSP RULEs:

  • <csp:if condition='...'>...<csp:elseif condition='...'>...<csp:else>...</csp:if>
  • <csp:while condition="...">...</csp:while>
  • <csp:loop ...>...</csp:loop>

More information on CSP RULEs (tags):

Local RULE documentation:

In Lightning:

  • Select the Administration from the Module drop down.
  • Click on the Setup button.
  • Under System heading, click on the Rules Docs link.

Or, you should be able to visit this page directly by going here:

http://DATASERVER/csp/cms/dt.common.util.RuleDocs.cls

Note: You might need to change http to https.

RULE logs

Most of ya'll probably know 'bout this one ...

DTI's built a nice little interface for checking RULE errors/warnings/other. Get to it by going here:

http://DATASERVER/csp/cms/dt.common.util.dtlog.RuleLogView.cls

Note: You may need to use https.

Some folks have told me that the above page does not offer everything they need for when it comes to debugging RULE code, so they've taken the manual approach by building their own page; if you want to head down this path, here's a few queries to get you started:

SELECT TOP 20 *
FROM dt_common_util_dtlog.RuleLog
ORDER BY TimeAdded DESC

... and:

SELECT TOP 75 rl.*,
ROUND(rl.ElapsedTime, 1) as myElapsedTime,
LEFT(rl.Error, 700) as myShortError
FROM dt_common_util_dtlog.RuleLog rl
ORDER BY rl.TimeAdded DESC

Big thanks to the original authors of the above code snippets.

Custom RULEs?

If you're running DTI's 2011.x (and later) system, then you can compile RULEs using the latest version of the DTI Dreamweaver plugin. For earlier DTI systems, only the Studio IDE will compile RULE .csr files.

Custom RULE documentation:

2013.1: Using Caché Server Pages (CSP): Developing Custom Tags

Shameless plug:

I've started a repo with a few examples of RULE patterns:

Intersystems' Caché: RULE boilerplate and examples.

... I hope to add more examples to that repository in the future.

Clone this wiki locally