Skip to content

Execution

Business Rules feature is currently composed by three high level modules, the most crucial being the Business Rules Executor, whose responsibility is clearly enough defined by its name.

The executor takes high profit of the MassTransit Courier framework out-of-the-box features in order to fulfill its purpose. As a baseline, it will retrieve all defined business rules and perform the activation process for each one of them.

Building

The executor will perform nicely as long as activities and business rules are configured properly, which makes the building process critical (perhaps the most important one in this section.)

Take special care when building your itinerary and make sure that each activity will receive the information it requires to perform its task. Matching outputs and arguments correctly is key in order to achieve this.

Activation

Activation process consists of arranging all required components for the business rule to become fully functional once it is triggered. For each rule, a consumer will be registered and bound to the triggering message address.

Executing the business rule

When a message is published and received by a business rule consumer the execution process begins. By making use of the rule's itinerary activities and the parameters provided by the triggering event, a courier is created and put into work. The courier will then execute the first activity in the itinerary, and then be forwarded to the next one in the list until each activity has completed. More info about MassTransit Courier can be found here.