Processes as Links between User Interface and Business Logic
As we said in the Business Rules as Carriers of Business Logic section business logic of an application Aware IM is encapsulated in business rules, which get triggered whenever business objects are created or modified. Let us now have a look at when these creations and modifications take place.
The initial trigger that leads to the creation or modification of a business object is almost always some external request to the system usually from a user who sends this request via the system’s User Interface. The user can perform this request in two ways – she can explicitly ask the system to create a new instance of a business object or edit an existing instance. More often though a user asks the system to start a process, which will then create or modify a business object(s).
A process usually consists of actions that are executed in a pre-defined order. These actions usually create business objects or find the existing business object and modify it. As a result business rules are triggered. These rules may start a chain reaction of other modifications, which take place until there are no more actions to execute. After data processing has been completed the process usually communicates the results back to the user.
Therefore a process represents a link between the User Interface and business rules – it triggers business rules in response to the request from the User Interface by performing initial creation or modification of a business object and then communicates the result back to the User Interface. This is shown on the diagram below:
note
Even though a process itself usually consists of rules it is not supposed to implement any business logic other than triggering the initial change as described above.note
A process may be started not just by the User Interface but also by other forms of external requests – for example, a request from other software system through a service (see Communication with Other Systems)The illustration below shows the make up of a process transferring funds between two accounts.
Note that the process is very small and is mainly concerned with allowing the user to enter necessary details and presenting the results of the operation to the user. All the business logic behind the funds transfer operation (such as checking whether there are sufficient funds in the source account, calculation of fees for the transfer operation etc) is expressed in business rules related to the object FundsTransfer
(they are not shown here). Aware IM evaluates these rules as soon as the user enters the data for the FundsTransfer
object (between “Display funds transfer form” and “Check for transfer success” operations).
Configuration of processes is discussed in detail in the Adding/Editing Processes section.