Why do we need persistence and transactions?
So far, we've dealt with very short-lived processes. Running inside a JUnit test, process instances last very few milliseconds, and having them in memory is sufficient for those environments. However, in real-life situations, we don't usually create interactions between systems and humans without having long wait states in between. This is especially relevant for the case of processes with human tasks, where users backed up with too much work might have a pending task assigned to them for hours, days, or even more. For each of the processes in your environment, you should be able to determine whether it should be a persistent or a nonpersistent process depending on how long-lived each of its process instances will be. From this perspective, you will find these two top-level categories:
In-memory processes
Long running processes (also known as persistent processes)
In-memory processes are usually short-lived processes that perform entirely automatic...