Over the years of working with TRIRIGA one thing I've always done is to try and constantly improve my craft. I'm always interested in how I can automate something or do something better, faster, more efficient, etc. As part of that process I have further refined and developed the TRIRIGA naming convention. I was even able to get some of the changes I've made into the TRIRIGA documentation while I worked at IBM. Those changes that were documented were the bringing of the naming convention down to the workflow task level.
The naming convention for the workflow tasks really just boils down to prefixing the label with cst if it is a new custom task or prefixing the label with cst- if the task is an out of the box task that is being modified. This simple changes makes it a lot easier to understand what was done to a workflow as one can simply tell just by looking at a workflow which tasks are out of the, which are customized out of the box, and which are pure custom. This idea of bringing the naming convention down to the workflow tasks was born out of an application upgrade that I was performing at the time. The sheer amount of analysis for workflows was incredible, especially with there being no easy way to compare workflows at the time. If the naming convention I proposed had been followed prior to my performing the application upgrade a lot less analysis would have been required. Thus the cost of the application upgrade would have been reduced.
As I've continued to develop and modify workflows I've realized that the naming convention I used was not sufficient for workflow variable tasks (Assignment and Declaration). The whole point of having a naming convention is to convey information in order to make things easier to understand as well as making things uniform. However, just prefixing a variable with cst does nothing to clear up any confusion as to how the variable is being used. Also after working on many workflows that make use of variable tasks, it appears that every developer has their own way of naming them. I've seen prefixes of VAR, Variable, In Var, Out Var, and many others. So I set about to figure out a naming convention that would convey how a variable is being used in order to give a better understanding of what the workflow is doing. Doing this will help me get back up to speed quicker if it’s been a long time since I looked at the workflow and also it’ll make things easier for whoever comes after me.
My analysis of how variable declaration tasks are used let me to believe that variables are only used a few different ways. The first way variables are used is as an input variable. This is a variable that is setup as a parameter on the workflow to receive in a record set of the specified type. The second way is as an output variable, which is a variable that is used to pass a record set out of the workflow. There are two different types of output variables. A return type which is setup as a parameter on the workflow and is used to pass a record set back to the calling workflow. The second is as a generic output type which is used to pass a record set to a called workflow. To further complicate things some variables get used as a combination of input, output, and return. The last way a variable is used is as an internal variable. This is a variable that is just used within the body of the workflow.
Variable assignment tasks are only used in two possible ways. The first way is to assign or set the record set of a variable to a record set of another task. The second way is to append the record set of another task to the record set of the variable task. Variable assignment tasks should be named with a prefix that implies what the task does followed by the meaningful name of the variable it is updating. In those cases where doing this will cause a duplicate name, additional information should be added to differentiate the tasks so that they can be identified easily in the workflow task dropdown of another task.
The following is what I’ve decided to standardize on for the naming convention of the variable assignment and variable declaration tasks. Feel free to use them if you find them useful. Additionally I’m always open to learning new and better ways of doing things so if you have a recommendation for improvement then please let me know.
Variable Declaration Tasks
IInput: cstVAR_IN (Example: cstVAR_IN People To Notify)
Output: cstVAR_OUT (Example: cstVAR_OUT Contractor Orgs)
Return: cstVAR_RET (Example: cstVAR_RET Eligible People)
Input and Output: cstVAR_IO (Example: cstVAR_IO People Notified)
Input and Return: cstVAR_IR (Example cstVAR_IR Available Buildings)
Input, Output, and Return: cstVAR_IOR (Example: cstVAR_IOR Eligible Employees)
Internal: cstVAR (Example: cstVAR Preposed Properties)
Output and Return: cstVAR_OR (Example: cstVAR_OR Potential Spaces)
Variable Assignment Tasks
Set: cstVAR_SET or cstVAR_ASGN (Example: cstVAR_SET People To Notify)
Append: cstVAR_APND (Example: cstVAR_APND People To Notify)