Link Search Menu Expand Document

RG-NMG-002 Activity verb-noun naming convention

Description

RG-NMG-002 ensures that each activity in a workflow uses a VERB-NOUN naming convention.

The VERB part of the name identifies the action that the activity performs.

The NOUN part of the name identifies the entity on which the action is performed.

This rule is configurable to cater for different naming patterns and controlled VERB lists.

img alt text

Regex - Naming Pattern:

The regular expression pattern that defines the structure activity names must comply with.

Default Naming Pattern

Two or more words separated by white space: ([\w\d]+\s?\b){2,}

Valid names: Navigate Screen

Alternate Naming Patterns

Camel Case

The camel case convention specifies that each word in the middle of the name begins with a capital letter, with no intervening spaces or punctuation.

Example of Regex expression: ([A-Z]|[a-z]|[0-9])+([A-Z]|[a-z]|[0-9]). Valid names: NavigateScreen, navigateScreen, NavigateScreen1.

Pascal Case

The Pascal case naming convention specifies that the name must contain concatenated capitalized words.

Example of Regex expression: ([A-Z]|[0-9])+([A-Z]|[a-z]|[0-9]). Valid names: NavigateScreen1, NavigateScreen, Navigate1Screen.

Snake Case

The Snake case naming convention replaces spaces between words with underscores.

Example of Regex expression: ([a-z]|[A-Z]|[0-9])([\w_]+)+([a-z]|[A-Z]|[0-9]) Valid names: Navigate_Screen1, Navigate_Screen, navigate1_Screen.

Kebab Case

The Kebab case naming convention is similar to the Snake case, except that it replaces spaces with hyphens rather than underscores.

Example of Regex expression: ([a-z]|[A-Z]|[0-9])([\w-]+)+([a-z]|[A-Z]|[0-9]) Valid names: Navigate‐Screen1, Navigate-Screen.

Controlled Verb List:

The controlled VERB list is a semi-colon (;) separated list of words that activity names must start with.

Default Value:
Add;Alert;Append;Ask;Assign;Attach;Build;Bulk Add;Clear;Click;Close;Compress;Copy;Delay;Delete;Deserialize;Do;Double Click;Download;Execute;Extract;For Each;Filter;Format;Generate;Get;Highlight;Hover;If;Insert;Invoke;Join;Kill;Left Click;List;Load;Log;Lookup;Merge;Move;Navigate;Open;Output;Perform;Pop;Postpone;Push;Raise;Read;Refresh;Remove;Replace;Reply;Report;Request;Right Click;Save;Scrape;Search;Select;Select;Send;Serialize;Set;Show;Sort;Start;Stop;Take;Test;Throw;Trigger;Try;Type;Upload;Wait;While;Write

Impact

Inconsistent activity naming

Mitigation

Activities in the project must follow a specific naming convention to make it easier to understand and maintain the project.

Activity names must use a VERB-NOUN structure and start with one of the controlled Verbs.

This ensures consistency and clearly identifies the Action and Entity that the activity processes.

Further Reading

  • regex101 - build, test, and debug regex