2.7. Project Editor

2.7.1. The Project Editor

The Project Editor helps a user to build and deploy projects. This view provides access to the various properties of a Red Hat JBoss BRMS Project that can be edited via the Web interface. Properties like Group artifact version, Dependencies, Metadata, Knowledge Base Settings and Imports can be managed from this view. The Project Editor is accessible from the menu bar ToolsProject Editor. The editor shows the configuration options for the current active project and the content changes when you move around in your code repository.

2.7.2. Project Settings

Project General Settings

The Project settings screen allows a user to set the Group, Artifact, and Version ID's for a project. It edits the pom.xml setting file since we use Maven to build our projects.

Project Editor - Project Settings

Figure 2.5. Project Editor - Project Settings

Dependencies

The Dependencies option allows you to set the dependencies for the current project. You access the dependencies by using Project SettingsDependencies option. You can add dependencies from the Artifact repository by clicking the Add from repository button or by entering the Group ID, Artifact ID and Version ID of a project directly by clicking on the Add button.

Project Editor - Project Dependencies

Figure 2.6. Project Editor - Project Dependencies

Metadata

The Metadata screen displays the generic data and version history of a project. It allows a user to edit other metadata details, add descriptions, and participate in discussions which are specific to a selected asset. You can assign categories to assets by clicking the plus icon next to the MetadataCategories option. By opening an asset, you will see a list of the categories it currently belongs to. If you edit the asset, you will need to save your changes for future execution. Within the Categories section is a list of attributes:

  • by - Who made the last change.
  • Note - Comment from the last asset update.
  • Created on - The date and time the asset was created.
  • Created by - The name of the original asset author.
  • Format - Short format name of the asset type.
  • URI - Unique identifier of the asset.

The other metadata options provide Subject, Type, External Link and Source options for the asset.

2.7.3. Knowledge Base Settings

Knowledge Bases and Sessions

The Knowledge Base Settings allows the user to create the KIE bases and sessions using the kmodule.xml project descriptor file of your project. Accordingly, it edits the kmodule.xml project setting file.

The Knowledge bases and sessions page lists all the knowledge bases by name. It contains the Add, Rename, Delete, and Make Default options above the list. Only one knowledge base can be set as default at a time.
A screenshot of the BRMS Project Editor - Knowledge Base and Session Settings Screen

Figure 2.7. Project Editor - Knowledge Base Settings

The Included Knowledge Bases section displays the models, rules, and any other content in the included knowledge base. It will only be visible and usable by selecting the knowledge base from the Knowledge Base list to the left. You can Add and Delete content from this list.
The Packages section allows users to Add and Delete packages which are specified to the knowledge base.
The Equals Behavior section allows the user to choose between Identity or Equality assertion modes.
  • Identity uses an IdentityHashMap to store all asserted objects.
  • Equality uses a HashMap to store all asserted objects.

Note

Please refer to the kbase attributes section of the Red Hat JBoss BRMS Development Guide for further details about Identity and Equality assertion modes.
The Event Processing Mode section allows the user to choose between Cloud and Stream processing modes.
  • Cloud processing mode is the default processing mode. It behaves in the same manner as any pure forward-chaining rules engine.
  • Stream processing mode is ideal when the application needs to process streams of events.

Note

Please refer to the kbase attributes section of the Red Hat JBoss BRMS Development Guide for further details about Cloud and Stream processing modes.
The Knowledge Sessions table lists all the knowledge sessions in the selected knowledge base. By clicking the Add Icon button, you are able to add a new knowledge session to the table.
  • The Name field displays the name of the session.
  • The Default option can only be allocated to one of each type of session.
  • The State drop-down allows either Stateless or Stateful types.
  • The Clock drop-down allows either Realtime or Pseudo choices.
  • Clicking the Pencil Icon opens a pop-up that displays more properties for the knowledge session.
Metadata

Please refer to Section 2.7.2, “Project Settings” for more information about Metadata.

A screenshot of the BRMS Project Editor - Metadata Screen

Figure 2.8. Knowledge Base Settings - Metadata

2.7.4. Imports

Import Suggestions

The Import suggestions specify a set of imports used in the project. Each asset in a project has its own imports. The imports are used as suggestions when using the guided editors the workbench offers; accordingly, this makes it easier to work with the workbench as there is no need to type each import in every file that uses it. By changing the Import settings, the project.imports setting files are edited.

A screenshot of the BRMS Project Editor - Imports Screen

Figure 2.9. Project Editor - Imports

To add a fact model to the imports section, press the New Item button. This displays a pop-up dialog to Add Import information. Once the Import Type has been entered, press OK.
To remove a fact model from the imports section, select the fact and click the Remove Icon button.

Note

The imports listed in the import suggestions are not automatically added into the knowledge base or into the packages of the workbench. Each import needs to be added into each file.
Metadata

Please refer to Section 2.7.2, “Project Settings” for more information about Metadata.

A screenshot of the BRMS Project Editor - Metadata Screen

Figure 2.10. Imports - Metadata