Chapter 1. Inter-process Communication
Welcome to our exploration of some of the advanced topics in BPMN. When we set out to write this book, we chose the areas where we see the most confusion and difficulty in understanding how to use BPMN. Over the next five chapters, we will look at how process instances can communicate, how exceptions are handled and propagated, and how to deal with data in arrays. We will present theory and also build practical exercises together so that you can see how the theory is applied. Let's start our journey by building an understanding of inter-process communication.
Inter-process communication refers to the ability for instances of processes to communicate with other instances of the same process, with instances of other processes, and with services. Such communication is usually implemented so that process instances can work collaboratively to achieve a given goal. Common scenarios when this may occur include:
When common logic is extracted from a number of processes into a reusable "utility" process
When the occurrence of an event in one process means that another, perhaps separate, process needs to be started—this is often seen where the second process is an audit or investigation process
Where a process has a set of data, needs to run a common set of logic over each item in that data set, and then consolidate the results
Through normal decomposition of a business process into various levels of granularity, resulting in the need for the process to invoke one or more sub-processes to accomplish its work
There are different mechanisms available for processes to communicate with each other. In this chapter, we will explore the options and when we should employ each.