Exercise 3: Defining another event and building another condition

In this exercise, you define another event called Policy Purchased. You also add another condition to the Add To Marketing Campaign event rule so that the event rule can check whether a policy has already been purchased for the car. If a policy has been purchased, the customer is not added to marketing campaigns unnecessarily. As an application evolves, you might typically find that the event project has to be updated by the IT user occasionally before the business user can continue building the business logic.

Before you begin

Complete the steps in Tutorial: Getting started with event rules.

Before starting this exercise, complete the instructions for Exercise 2. See Exercise 2: Adding conditional logic to the application.

About this task

In this exercise, you add a filter to the Add To Marketing Campaign event rule. The new filter, called Has not purchased a policy, checks for an instance of the Policy Purchased event being received in the past year for the same car registration (as defined by the context relationship in the event rule).

Follow tasks a-e to complete exercise 3.