Context-aware rule definition

This sample demonstrates how to filter the completion menu of a BOM member based on the rule context.

Time required

10 minutes

Prerequisites

You must have Rule Designer installed to import and run this sample.

This sample installs a custom rule model that replaces the default rule model. To avoid conflicts with other rule projects in your default workspace, import the sample into a separate workspace.

Description

When you edit a rule definition, the list of proposed and authorized completion values changes depending on the value of a property that is set on the rule or its package. You use the valueinfo provider and checker, which is associated with the BOM member.

The sample covers the following operations:
  • Using a Rule Designer API to develop an Eclipse plug-in.
  • Using information from the rule context with the valueinfo provider and checker.
  • Filtering the information that rule authors see.
  • Controlling the interdependence of conditions.
  • Using the Business Rule model extension to add custom properties.
  • Using an impact handler to propagate changes after modification of a resource.