Design Center configurations > Resource set configuration > Configuring exception rules > Configuring a rule function

Configuring a rule function
When you configure a rule function, you use the StreamServe script syntax to set up conditions. Depending on metadata values, the conditions are either true or false.
Note:
 
Retrieve metadata values
You must retrieve the metadata values using the GetMetaDataMessage scripting function. By using the scripting function instead of referring directly to the metadata, any external changes made to the metadata are also considered. For example, changes made by a customized web application, developed using the OpenText StreamServe web service SDK. See Example 1 below.
No document definitions available
You can use the IsDocDefAvailable scripting function in the exception rule to pause a Message if no document definitions are available.
*
To discard a Message if no document definitions are available, you can use the AbortMessageOnMissingDocDef scripting function. Note that we recommend you to use this scripting function outside the exception rule.
Prerequisites
To configure a rule function
1
2
Replace MyEvalFunc with a unique name for the rule function.
Note:
3
4
Click Check Syntax to check the rule syntax.
5
Select File > Save to save the rule function.
6
Click OK to close the Rule Editor.
 
Example 1
In this example, an exception rule pauses all documents with the value YOUNG for the metadata CATEGORY. The documents can then be reviewed in Correspondence Reviewer. Documents for other values for CATEGORY are formatted and distributed to the output destination without being paused.
In the resource set, a new rule resource called Category is YOUNG.xml is created. The name (Category is YOUNG) is exposed as the reason for review in Correspondence Reviewer.
In the Rule Editor, the rule function below is created.
Note:
To protect the exception rule from future changes to the metadata name, the metadata GUID (a86199fd-5f5a-4e53-a3af-47c72ae6321f) is used instead of the metadata name (CATEGORY).
 
$Category = GetMetaDataMessage("a86199fd-5f5a-4e53-a3af-47c72ae6321f");
if ($Category = "YOUNG")
   return "true";
else
   return "false";
 
Related topics
GetMetaDataMessage in the Scripting Reference
IsDocDefAvailable in the Scripting Reference
AbortMessageOnMissingDocDef in the Scripting Reference
OpenText StreamServe 5.6 Updated: 2013-03-01