Back Forward How to enter a Java identifier

To type a Java identifier into a Process Commander rule form, work object form, or other form:

Background

Process Commander uses Java identifiers in generated Java code. Java identifiers in Process Commander are identical to true Java language identifiers, except:

Where you need Java identifiers

These facilities require use of Java identifiers:

1. A key part of rules of many rule types must be a valid Java identifier. This requirement applies to all rule types for which the Show Java toolbar button (Show Java ) appears, including:

Activities (Rule-Obj-Activity)

Connect rules (Rule-Connect-*)

Edit input rules (Rule-Edit-Input)

Edit validate rules (Rule-Edit-Validate)

Rule types derived from Rule-Stream, including HTML, HTML fragment, XML, Harness, Section, Property, Paragraph and Flow Action

Function rules (Rule-Utility-Function)

Libraries (Rule-Utility-Library)

Map values (Rule-Obj-MapValue)

Model rules (Rule-Obj-Model)

Section rules (Rule-HTML-Section)

Service rules (Rule-Service-*)

2. For Value Group and Page Group properties, each subscript value must be valid Java identifiers. The following are acceptable:

StateCapital("VT")
ZipCode(Customer)
Domaine(Entre-Deux-Mers-2005)

The quotes are optional.

NoteYou can't use a value that starts with a digit as an a subscript. The following are not correct, where the property is a Value Group or Page Group.

StateCapital(8)
ZipCode(02138)
Domaine(4X4)

3. In activities, the names of parameters and local variables must be valid Java identifiers.

5. In flow rules, list value rules, summary value rules, and section rules, the names of parameters must be valid Java identifiers.

In some case, Process Commander may accept other formats, but follow these guidelines to avoid problems. Internally, Process Commander converts any characters other than letters and digits in these fields to an underscore character; this can cause unintended duplicates. SR-190

Full definition

A Javaidentifier is sequence of Java letters and Java digits, the first of which must be a Java letter, that is not a Java keyword.

Letters and digits can be drawn from the full Unicode character set. A Java letter is a character for which the method Character.isJavaIdentifierStart(int) returns true.

Java letters include uppercase and lowercase ASCII Latin letters A-Z and a-z, and underscore (\u005f). (The dollar sign is allowed but reserved for generated Java code.)

See linkjava.sun.com/docs/books/jls/third_edition/html/lexical.html for a precise formal definition of Java identifiers.

Property values

To restrict a Single Value property to hold only Java identifier values:

Standard function

In an expression, call the standard function rule ValidateJavaIdentifier( ) to test whether a property contains a valid Java identifier. B-21033

Related topics Choosing good rule and data instance names

UpTechnical category