Setting up the xRules sample

To run the xRules sample, you must import the sample project into your Eclipse workspace.

About this task

You import xRules into Eclipse, and configure Eclipse to run the sample application. The source code for the application is in the samples/com.ibm.rules.sdk.samples.documentrules directory.

Procedure

  1. Start Eclipse.
  2. Click File > Import.
  3. Select General > Existing Projects into Workspace, and click Next
  4. In Import Projects, browse to <InstallDir>/rules-sdk/samples/com.ibm.rules.sdk.samples.documentrules
  5. Select com.ibm.rules.sdk.samples.documentrules, and click Finish to load the project. After you load the project, the Problems view lists several errors. You must add Business Rules Embedded runtime plug-ins to compile the application.
  6. Click Window > Preferences.
  7. Select Plug-in Development > Target Platform > Running Platform, and click Edit
  8. In Target Content, click Add, select Directory, and click Next.
  9. Browse to <InstallDir>/rules-sdk/lib/osgi, and click Finish to add new plug-ins to the target platform.
  10. Click Finish in Target Content, and OK in Preferences After Eclipse builds the project, the Problems view is empty. In the event that errors persist, clean and rebuild the project.
  11. Expand com.ibm.rules.sdk.samples.documentrules in Package Explorer.
  12. Double-click plugin.xml.
  13. In Overview, under Testing, click Launch an Eclipse application.

Results

The xRules sample application opens in its own window.