Action rule editing errors and warnings

Rule Designer searches for problems when you edit an action rule. Errors and warnings are displayed in the Problems view.

The types of errors and warnings that Rule Designer reports when you edit an action rule, where the error or warning is reported, and the remedial steps you can take are described in the following sections.

Lexical errors

Lexical errors occur when a word in the rule is not recognized and are reported when you type a rule in the Intellirule editor.

Modify the text of the rule to follow the syntax specified by the language grammar and by the vocabulary defined in the application. Error messages may help, but not all times. Code completion and vocabulary use may be used to learn the exact syntax of phrase of the vocabulary.

If you have lexical errors in your rules, you will not be able to use the guided editor.

Syntactic errors

Syntactic errors are reported when a rule statement is not well formed as soon as you type a rule in the Intellirule editor.

Modify the text of the rule to follow the syntax specified by the language grammar and by the vocabulary defined in the application. Error messages may help, but not all times. Code completion and vocabulary use may be used to learn the exact syntax of phrase of the vocabulary.

If you have syntactic errors in your rules, you will not be able to use the guided editor.

Semantic errors

Semantic errors are reported when the text of the rule is syntactically correct but its interpretation is wrong as soon as you type a rule in the Intellirule editor.

For semantic errors, you should consider revising the text of the rules to comply with the language semantics and with semantic rules that may have been set up (for example, BOM domains).

Consistency errors

Consistency errors are reported by the consistency checker at build time. For example, a consistency error is raised if a rule contains incompatible tests, or a test that is always false.

You can disable the consistency checker in the Rule Designer build preferences.

Ambiguities

Ambiguities can occur in the following cases:

The following tables list error messages that you can see when editing an action rule.

Table 1. Action rule editing errors quick reference
Message Description
A ruleset parameter <parameter name> is already declared.

Ruleset Parameter Already Declared

A declared variable has the same name as a ruleset parameter declared on a type.

A ruleset variable <variable name> is already declared.

Ruleset Variable Already Declared

A declared variable has the same name as a ruleset variable declared on a type.

Ambiguous sentence.

Ambiguous Sentence

Part of the rule has at least two interpretations that are semantically correct. Use parentheses, intermediate variables, or punctuation if available in the statement.

There are two identical terms or phrases in the vocabulary. Change one of the terms or phrases in the vocabulary.

An automatic variable <variable name> is already declared.

Automatic Variable Already Declared

A declared variable has the same name as the automatic variable declared on a type.

Can't specify else clause without if clause.

Else Without If

An else part has been specified, but there is no if part in the rule.

Invalid cardinality <cardinality>, it is incompatible with <cardinality>

Invalid Cardinality

The given cardinality (single or multiple) is not compatible with the one requested.

Invalid type <type name>, it is not assignable from type <type name>

Not Assignable From

A given type is cannot be assigned from a requested type. For example:

  • the title of a CD is one of {1}
  • The requested type to be assigned String (the title of a CD) cannot be assigned from Number (1).
Invalid value (<type name>) <value text>

Invalid Value

An error on the value has been reported by a value descriptor associated to the value type (checking of value).

Invalid variable <variable name> for expected type <a type>.

Invalid Variable

The type of a variable is not compatible with the requested type.

Number must be integer.

Non Integer Value

An integer value must be specified.

Value is not in domain.

Value Not In Domain

A BOM domain has been specified and the value used in the rule is violating this domain.

Value is out of the range A range BOM domain has been specified and the value used in the rule is out of this range.
Only values are expected.

Invalid Expression

Expressions such as sentences, variables and grammar constructions are not valid. Only value expressions are accepted.

Incompatible sentence, due to incompatible precedence

Some operators are incompatible with the types used in the sentence.

For example, in the sentence print "Hello world!" +2 -3, the operators are incompatible, because "Hello world!" +2 is evaluated as a String, and the operator - is incompatible with the String type. To solve the problem, use explicit parentheses: print "Hello world!" + (2 - 3)".

Origin type: <type name> is not a super type of target type: <type name>.

Not Super Type Of

A type is not a subtype of the requested type. For example:

the name of the customer is 3

The requested type is String (the name of the customer) and the given type is Number (3). String is not a super type of Number.

The variable <variable name> cannot be used, a variable of that type is already declared.

Automatic Variable Bound

Cannot use the automatic variable of a type, where there is a global variable of that type already declared.

The variable <variable name> is not assignable.

Variable Not Assignable

The variable cannot be assigned.

The word <word> is expected in place of <word>.

Token Mutation

A word in the rule is wrong, and the error recovery mechanism suggests another one.

The word <word> is missing.

Missing Token

A word is missing in the rule.

The word <word> is not required.

Inserted Token

A word has been inserted in the wrong place in the rule.

Unknown word: <word>.

Unknown Token

A word is not recognized. This usually occurs with a malformed value.

The phrase <phrase> is not required.

Not Implemented

A complete phrase is in the wrong location and must be removed to correct the rule.

The phrase <phrase> is missing.

Not Implemented

A complete phrase is missing in the text. Complete the phrase to correct the rule.

No term <term> found.

Term Does Not Exist

There is a reference to a term that is not in the vocabulary.

No navigation phrase <phrase> (of subject <subject>) found on term <term>. Navigation sentence on a given term does not exist in the vocabulary.
No action phrase <phrase> (of subject <subject>) found on term <term>. Action sentence on a given term does not exist in the vocabulary.
No automatic variable <variable> found. The automatic variable is not declared automatic on a term, or a term does not exist in the vocabulary.
Too may errors. Can not recover from errors. The rule contains too many errors to correct.
Invalid value for <value>: <value>

Invalid Value

Invalid value for the Guided Editor.

Invalid variable name: <variable>, the characters: <character> are not allowed.

Invalid Name/Character

The variable name is invalid and contains one or more of the following invalid characters:

' " \n \r \t / ( ) , ;

Unknown phrase, did you mean: <phrase>?

Unknown Phrase

A sentence in the text is incorrect but similar to an existing correct sentence. The message suggest the correct sentence.

Value (<value type>) <value text> is incorrect. <a message>

Value Error

An error on the value has been reported by a value info associated to a role in the phrase (checking of value). If the value is used in a place where a BOM domain is defined, this error is generated if the value violates the BOM domain.

Variable <variable name> already declared.

Variable Already Declared

A variable of that name is already declared.

Variable <variable name> is not declared.

Variable Not Declared

A reference to a variable that it is not declared.

The following table lists the most current warnings you may see when editing an action rule.

Table 2. Action rule editing warnings quick reference
Message Description
<an element> is deprecated

Deprecated Element

A deprecated element (type, constant or phrase) has been used in the rule. Deprecated is a property defined on a business element.

Can not bind value types. A value type such as number, string, and so on cannot be used in a binding.
Category(ies) (<categories>) defined on phrase <a phrase> does not match the rule category filter.

Invalid Phrase Category

The phrase is not intended to be used on the rule, because the categories of that phrase do not match the rule category filter.

Category(ies) (<categories>) defined on term <a term> does not match the rule category filter.

Invalid Term Category

The term is not intended to be used on the rule, because the categories of that term do not match the rule category filter.

Category(ies) (<categories>) defined on type of variable <variable name> does not match the rule category filter.

Invalid Variable Category

The variable is not intended to be declared on the rule, because the categories of the variable type do not match the rule category filter.

Category(ies) (<categories>) defined on value <a constant> does not match the rule category filter.

Invalid Constant Category

The constant is not intended to be used on the rule, because the categories of that constant do not match the rule category filter.

Predicate not applicable to value types.

Predicate Not Applicable

The predicate is not applicable to the value type, such as number, string, and so on.

The construct <construct> is deprecated.

Construct Deprecated

A deprecated grammar construct (issued from the XML schema definition of the language) has been used in the rule.

The (part of the) rule execution may be unsafe: <message>.

Rule Execution Server

The rule tries to set an attribute to a value outside its domain.

The (part of the) rule is never applicable because <message>. The rule never applies because its conditions can never be met. This is usually caused by simple logic errors in the rule.
The rule is incomplete, fill all the placeholders.

Incomplete Rule

A rule has at least one empty placeholder.

Value (<value type>) <value text> is incorrect. <a message>

Value Warning

A warning on the value has been reported by a value info associated to a role in the phrase (checking of value).

Variable <variable name> is not used.

Variable Not Used

A variable is declared but not used.