Workflow Activity Naming Guidelines
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
Consistent naming practices are important for predictability and discoverability. Authors should replace the default names for activities with names that are more descriptive. The activity names that Microsoft Visual Studio 2005 generates are made up of the activity type followed by an incrementing number; for example, StatementActivity1. An automatically generated name such as this is only marginally descriptive and gives little information about the purpose of the activity.
Guidelines
The following guidelines strike a balance between descriptiveness and conciseness in activity names:
- All activities in a given workflow must have a unique name.
- For each activity, remove the word Activity and any numeric suffix from the automatically generated name.
- For each type of activity shown in the following table, rename as shown.
Examples
The following table provides naming examples for many of the workflow activities used in speech projects.
Activity Type | Naming Scheme | Example |
---|---|---|
CodeActivity |
verb + noun |
createTables |
command |
help, mainMenu, repeat |
|
scopedActivity + NoInputs |
askConcertChooserNoInputs, getPinNoInputs |
|
scopedActivity + NoRecos |
askTicketsNoRecos, getPizzaSizeNoRecos |
|
scopedActivity + Silences |
askSecretQuestionSilences |
|
Custom Activities |
verb + noun |
askShirtSize, makeOutboundCall |
get + noun |
getCreditCard, getPizzaSize, getDestinationCity |
|
goto + target activity (+ From + referring object) |
gotoMainMenu, gotoMainMenuFromAskSize |
|
IfElseActivity |
verb + condition |
isNewUser, mustVerifyAccount, hasAccountNumber |
IfElseBranchActivity |
condition |
PINValid, PINInvalid, NewSubscriber, ExistingSubscriber |
choose + noun |
chooseArtist, chooseApplication, chooseArrivalCity |
|
browse + noun |
browseMovieTitles, browseDrivingDirections |
|
QuestionAnswerActivity (typical case) |
ask + noun |
askSize, askPhoneNumber, askPIN |
QuestionAnswerActivity (with response confirmation) |
confirm + noun |
confirmSize, confirmPhoneNumber, confirmPIN |
record + noun |
recordMessage, recordName, recordMovieTitle |
|
record + noun |
recordGreeting, recordAlbumTitle |