Correcting errors using Quick Fix

You can use the Eclipse Quick Fix feature in the Intellirule Editor, the decision table editor, and the decision tree editor. Quick Fix messages offer suggestions to automatically correct detected errors.

About this task

The Quick Fix feature in the Intellirule editor is supported only in the English version of the product.

In some cases, Quick Fix messages let you make the following changes:

  • Replace one element by another

  • Remove incorrect elements

  • Declare new variables in the definitions part of the rule

  • Add elements to the BOM

In the decision table editor and the decision tree editor, Quick Fix can also detect and let you add missing domain values.

To access the proposed quick fixes, click the light bulb icon Light bulb icon denoting quickfix or place your cursor on the error and press CTRL-1. The messages provide a list of possible corrections from which you can select the appropriate fix.

Procedure

To auto-correct an error from the quick fix message:

  1. Put your cursor on the error indicator to display the error messages.
    Intellirule error message
  2. Click the light bulb icon or move your cursor to the error in the rule, and then press CTRL-1 to open the quick fix message.
    Intellirule error showing quick fix message

    In this example, the customer object does not have an age attribute, so it must be added to the BOM in order for it to be used in the rule.

    Note: To access quick fixes, you must correct errors in the order in which they appear.
  3. From the list of suggestions, click the appropriate fix.

    In this example, selecting Add a new navigation phrase ‘age’ on customer opens the Add New Phrase wizard. In the wizard, you can choose to create a navigation phrase or an action phrase for the new element when you add it to the BOM.

    Add New Phrase wizard

    Once you have finished with the wizard, the error should be resolved and you can continue building your rule.