Creating a context definition

You can create a context definition to associate related events and actions with a context for complex event processing.

About this task

A context definition is a list of events, each with an associated context ID, that is used as a group for complex event processing. You can associate a context definition with the events, event rules, and actions in your event project, and then use the context to correlate the related assets over time. For example, you can use a context definition to track all actions that correspond to a customer transaction (event) during a 24-hour interval. By default, a new event project does not include a context definition. You can add a context definition to the event project, and then associate events and event rules with the context definition.

Procedure

  1. In the Event Explorer view, right-click the event project name, then click New > Context Definition. If your event project is organized into multiple folders, you can right-click a folder and create a context definition in that folder.
  2. In the New Context Definition wizard, enter the name of the context definition, and confirm that the parent folder is set to project_name/assets or project_name/folder_name, then click Next.
  3. Select an event, or multiple events, that you want to associate with the context definition.
    1. Click an event name to select a single event.
    2. To select more than one event, press and hold Ctrl while clicking multiple event names. To select a range of events, press and hold Shift while clicking the first event name and the last event name in the range.
  4. Click Finish. The context definition opens in the Context Definition editor. You can modify the conditions in the context definition to add or remove events, or specify the context termination and retention. See Modifying context definition conditions.

Results

The Context Definition editor displays a warning message because you did not associate an event rule with the context definition. See Associating the system context or a context definition with a rule.

The context definition asset appears under the assets folder and the context definitions asset category in the Event Explorer view, as shown in the following example. In this example, the LoanContext context definition includes the LoanMessage and LoanRejected events.

LoanContext asset in the flows asset category

What to do next

Using the Context editor, you can modify the conditions and settings in the context definition such as the event list, default verbalization, termination settings, and context information retention time. See Modifying context definition conditions.