You will often find yourself happily creating your workflows in the same way you would do the task if you were manually doing the task. This is not always the most efficient way to build a workflow. When working with a workflow you want to take a look at your overall process, whether that is in a tree or routine and look for those parts of the process that
- can or will be repeated
- may need to be rerun separately from the rest of the process
- may need to be versioned separately from the rest of the process
And these are the components you will want to make into routines that you will leverage in your main workflow.
Repeating processes can be from something as simple as a two node combination used to send a notification or assign a ticket to a full approval process. Note that these repeating processes might have repeating processes within them as well. This also applies to repeating the same processes across workflows. As a general rule, if I find myself putting the same two (or more) nodes more than once, I stop and reconsider if what I'm doing should be made into a routine.
Say you have a process that connects out to a system that is not particularly reliable and you are more likely to have to retry things associated with this system. Isolating these things into a routine gives you the power to pause the routine if necessary, rerun the routine if necessary, or version it if necessary without affecting anything else in the workflow.
Even if processes are not being re-used, they may be appropriate for a routine. For example, if you have an approval routine that is being used (repeated), it may have routines used within it for group approval and individual approval. Since everywhere approval is used, the approval routine is called, the group and individual approval routines aren't themselves used repeatedly. However, having them as separate routines allows them to be managed, supported, and versioned separately.