Business Logic

We have built a model where a process waits in states and moves forward through transitions. The next question is practical: when a transition finishes, how does the process decide what to do next?

This chapter answers that question. It explains what we mean by business logic in the context of business process programming.

Where Decisions Appear in a Process

The diagram below shows the dental clinic receptionist process in more detail. Some parts are straightforward, and some parts require a decision.

Detailed activity diagram of a dental clinic receptionist process

Notice the difference between these two situations:

Business logic is needed exactly in the second case: when the process must choose between multiple target states.

Business Logic as a Choice

After a transition completes its work, business rules evaluate the outcome and determine the next state.

The small diagram below shows this idea at a glance:

Business rules and business logic selecting a target state from a current state

Business logic is where a process chooses its direction.

A Concrete Example

During patient identification, one activity is “Searching patient’s data”. After this activity finishes, the system must decide which state to enter next.

A simple business rule could be:

The diagram below shows this fork: the same transition can lead to different target states.

Example fork to 'data found' or 'data not found' states

Definition

With this context, we can define business logic very simply:

Business logic is the decision-making that selects the next (target) state of a business process based on the data available and the business rules that apply.

Business logic does not have to be complicated. Sometimes it is a single if-statement. Sometimes it is a chain of rules. The important point is always the same: it chooses the next state.

In the next chapter, we will separate decision-making from the work that produces data, and introduce the idea of data processing logic.

Table of Content Introduction into Business Process Previous: States and Transitions Next: Data Processing Logic