Link Search Menu Expand Document

RG-NMG-001 Workflow verb-noun naming convention

Description

RG-NMG-001 ensures that each workflow in a project uses a VERB-NOUN naming convention.

The VERB part of the name identifies the action that the workflow 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 workflow names must comply with.

Default Naming Pattern

Upper Camel Case: ^([A-Z])([A-Z]|[a-z]|[0-9])*$

Valid names: NavigateScreen, NavigateScreen1

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

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 workflow names must start with.

Default Value:
Close;Get;Init;Initalise;Kill;Launch;Main;Navigate;Perform;Process;Set;Take

Impact

Inconsistent workflow naming

Difficulty in locating like workflows

Unclear workflow purpose

Mitigation

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

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

This ensures consistency in project workflow structure and clearly identifies the Action and Entity that the workflow processes.

Further Reading

  • regex101 - build, test, and debug regex