RuleManager Features

Based on the .NET Managed Code Environment

Because RuleManager is based on the Microsoft .NET Framework, it inherently gains powerful features such as an object-oriented, managed code, highly secure operating environment. The features and advantages of the Microsoft™ .NET Framework are too numerous to list here, but describes a few of the major ones.

Managed Code

The .NET CLR is a language-neutral development and execution environment that provides modern features such as memory management, Just In Time (JIT) compilation performance enhancements, strongly typed code enforcement, and code access security (CAS) among many others.

This means that applications based on the .NET Framework do not suffer from typical attacks which plague unmanaged code like stack and buffer overflow vulnerabilities. While its possible that the .NET Framework itself could potentially contain a vulnerability like this, patching a single framework is a much less daunting task then it would be to patch many different applications in different ways as is currently the case with unmanaged code.

Garbage Collection

Because memory management is handled by the .NET Framework, memory leaks are far less likely in managed code than in unmanaged code. This helps RuleManager to be a much more robust product -- reducing maintenance and support costs.

Support for Modern Technologies such as XML and Web Services

The .NET FCL provides standardized access to modern technologies and standards such as XML, SOAP (Web Services), TCP/IP, HTTP, and other networking protocols, etc. This allows the RuleManager to support more features and standards out-of-the-box by taking advantage of the standard features in the .NET Framework which is well tested and widely used in the development community.

Runs as a Windows Service

RuleManager is a full Windows Service and runs just like other Windows services. It can be configured to log on as any user. It will start automatically when the computer starts and, most importantly, does not require a user to be logged on to the console.

Secure

RuleManager was designed with security as a top priority. RuleManager will run with very few privileges and is designed to run as the 'Network Service' user on XP and later as recommended by Microsoft for services such as RuleManager. In fact, on Windows XP and later, RuleManager doesn't even have the privileges to write log files unless specifically granted by the administrator of the computer.

For more information about security considerations when using RuleManager, consult the Security Considerations section.

SMTP-based

RuleManager requires no additional software to be installed on the server (other than the .NET Framework and the Dovetail SDK) and connects directly to any SMTP server. SMTP is the main email standard which all Internet email servers must implement in order to interact with each other. This allows RuleManager to work against whichever email solution your organization has chosen to install (including Unix™ and Linux mail servers as well as other Windows-based email servers).

SSL / TLS

Dovetail Rulemanager supports SSL and TLS 1.2 when connecting to a SMTP server. For more information, refer to the Dovetail knowledgebase article on Rulemanager and TLS / SSL

Email Signing

If desired outgoing emails can be digitally signed. For email signing to occur a valid digital certificate must be present in the Personal certificate store of Windows account user whose credentials are used by the RuleManager windows service. To obtain a digital certificate you'll need to purchase one from a digital certificate vendor such as Verisign or Thawte.

Enhanced Logging

RuleManager takes advantage of the powerful and flexible logging features built into the Dovetail SDK. This makes it easier to troubleshoot and diagnose problems that may arise as well as audit and monitor the health of RuleManager. Logging settings can be changed on-the-fly at runtime without having to stop the service and restart it. Changes are seen immediately.

HTML Emails

RuleManager can convert Markdown within an email to HTML. This is commonly used in conjunction with Dovetail Agent (version 8 or later), which supports sending richly-formatted emails using Markdown.

Markdown is a lightweight and easy-to-use syntax for styling text on the web. You control the display of the document; formatting words as bold or italic, adding images, and creating lists are just a few of the things we can do with Markdown. Mostly, Markdown is just regular text with a few non-alphabetic characters thrown in, like # or *.

The Markdown to HTML conversion is enabled/disabled by the EmailServiceConfig.ParseMarkdown configuration setting.

Markdown can be used in any text that gets sent as an email, including


Images

RuleManager supports publicly available images within an email. The Markdown for these would look like:

![kittens.jpg](http://www.mycompany.com/images/kittens.jpg)

RuleManager supports images that have been uploaded to Amazon S3 from Dovetail Agent. The Markdown for these would look like:

![image.jpg](store://s3/agent-images/b3445724-abcd-1234-90db-1107f0913e1cx)

Emails that contain a link to an image stored in Amazon S3 (such as those sent from Dovetail Agent version 8 and later) will show the image as an inline image.

This requires the S3 settings to be defined within the FChoice.RuleManager.WindowsService.exe.config file.

RuleManager (as of version 1.6) also support images that have been uploaded to Dovetail Seeker from Dovetail Agent. The Markdown for these would look like:

![image.jpg](store://seeker/agent-images/b3445724-abcd-1234-90db-1107f0913e1cx)

This requires the ResourceStore setting to be defined within the FChoice.RuleManager.WindowsService.exe.config file.


Styles

When RuleManager converts the Markdown to HTML, it also inlines the CSS styles. Inline styles are supported across all major email clients. The styles are defined in the email.css file, which is shipped with RuleManager. This file can be customized, if needed. Once the file is edited, RuleManager needs to be restarted in order to pick up the changes.

Function-based Rule Properties

Rule properties are used in a number of places throughout the Dovetail suite, including:

Traditionally, a rule property would traverse a path through the schema, starting from the base object, and ending at a column.

For example, the Contact First Name property for a case would use the path case_reporter2contact:first_name.

However, there are instances where a path cannot be traversed, or where a calculation needs to be made.

For example, you may wish to fire a business rule only if all of the subcases on a case have been closed. So your two business rule conditions would be:

  1. Number of Subcases is greater than zero
  2. Number of Open Subcases is equal to zero

Or, you may wish to fire a business rule if the Number of cases for product X within the last 7 days is greater than 10.

Or you may wish to use a variable (rule property) as part of a canned response that retrieves data from another system using a web service call.

Or you may wish to use a variable (rule property) as part of a task manager property that calculates a value or retrieves data from another system using a web service call.

With these examples, there is not a schema path that can be traversed to provide these values.

You can now write your own custom code for these rule properties. This opens up a whole new avenue for customization.

Dovetail provides an example code project that demonstrates custom function-based rule properties.

This project is freely available at https://dovetailsoftware.github.io/property-extensions/.

That link provides more details, working code examples, and steps on how to build and deploy.

Once your code has been written, and the assembly copied into the application directory, then the property can be defined using the Rule Property UI within Dovetail Agent (Agent version 14 or higher).

Configuration Item Rule Properties

Rule properties are used in a number of places throughout the Dovetail suite, including:

Traditionally, a rule property would traverse a path through the schema, starting from the base object, and ending at a column.

For example, the Contact First Name property for a case would use the path case_reporter2contact:first_name.

However, there are instances where a static value may be desired, and this static value cannot be traversed to via a schema path. In these instances, a Configuration Item Rule Property is useful.

Configuration Items

As a refresher, Configuration Items (commonly referred to as Config Items) are a way to store name/value pairs on a system-wide or user-specific level. They are stored in table_config_itm, and can be managed using Dovetail Admin, or imported via a DAT file.

Configuration Items have a Value Type, which defines the type of value they hold, which would be either String, Integer, or Float.


Usage examples

Business Rule Message

You may wish to have a business rule message that contains a static string, such as a URL to a website. Rather than hard-coding that URL in every business rule, the URL can be stored in a Config Item. This would allow the string to be edited at a later time in one place (in the config item), as opposed to having to modify many business rules.

Here's an example of how this would look in a business rule message:

RE: Action Item [Action Item ID] Assigned
Action Item [Action Item ID] has been assigned to you by [Logger]. The priority is [Priority]. Please take appropriate action.
[ConfigItem.Dovetail Agent URL.String]/action-items/[Action Item ID]
Email Template

A URL could also be used in an email template, such as in the send_email_about_obj com_template which is used when a Log Email is performed on a case.

Here's an example of the action for the send_email_about_obj com_template, showing a config item used for the company logo URL, and for the Selfservice URL.

TO: <FOCUS.recipient>
CC: <FOCUS.cc_list>
FR: <FOCUS.sender>
RE: About Case <ADDITIONAL_INFO> : [Case Title] [Subcase Title]
![Company Logo]([ConfigItem.Company Logo URL.String])
<FOCUS.message>
---
[Check the status and update your case (Case <ADDITIONAL_INFO>) online at the Dovetail SelfService site]([ConfigItem.Dovetail Selfservice URL.String]/case/<ADDITIONAL_INFO>)
Business Rule Condition

You may wish to have a business rule that only fires if this is the production database (as opposed to a test or development database). You could use a business rule condition based on a configuration item's value. The config item would indicate the database type (production, test, development, etc. )

  1. In your production database, create a config item named Database Instance, and set its value to production.
  2. In your test database, create a config item named Database Instance, and set its value to test
  3. Create a business rule property named Database Instance.
    Set its path to be [ConfigItem.Database Instance.String].
    This allows for it to be presented to the user in the Business Rule Condition picker UI.
  4. Create a business rule with a condition of: Database Instance = production

Now that business rule will only fire if it happens in your production database. It will not fire in the test database.

Defining Configuration Item Rule Properties

Configuration Item Rule Properties can be defined in either of two ways

  1. By directly referencing the Config Item using the Configuration Item Reference Syntax.
  2. By creating a business rule property whose path follows the Configuration Item Reference Syntax.

Details on both of these are below.

Configuration Item Reference Syntax

To reference a configuration item, use the following syntax:

[ConfigItem.Configuration Item Name.Configuration Item Value Type]

Notice that there are three parts

  1. a static string (ConfigItem)
  2. the name of your config item
  3. and then its value type

All wrapped in square brackets, similar to other rule properties.

Valid values for Configuration Item Value Type are:

Examples:

Creating a Business Rule Property for a Configuration Item

You can also create a business rule property that resolves to a configuration item.

This is useful when you want to make it available in the UI, such as in a business rule condition.

To do so, create a rule property with the following settings:

Name: A user-friendly name for the property

Path or Function: [ConfigItem.Configuration Item Name.Configuration Item Value Type]

Note: Be sure to include the square brackets

Here is an example of a rule property for a configuration item:

Edit Rule Property

Comparison to Function-based Rule Properties

Function-based Rule Properties allow you to write your own code to determine a value.

You could write your own Function-based rule property for a config item's value, such as MySupportSiteUrlConfigItem, which would query for the MySupportSiteUrl configuration item and return its String value.

But, a Configuration Item Rule Property makes this process much simpler, and eliminates having to write or deploy custom code.