Chapter 5. Hello World rule example

To demonstrate basic features of JBoss BRMS, this example will instruct you on how to set up the Hello World project with a Hello World business rule.
You will be instructed to do the following:
  1. Create a Hello World repository in the Artifact repository.
  2. Create the Hello World Project.
  3. Create the Hello World rule.
  4. Build and deploy the project.

5.1. Creating repository structure

All business assets live in repositories that live in Organizational Units, which are directories in the Artifact repository. By default, the Artifact repository does not contain any organizational units. Therefore to be able to create your own business assets, you need to create an organizational unit in the Artifact repository and a (Git) repository in it. The repository can then contain your Project. A project can contain an arbitrary package structure, which allows you to structure its content into logical "directory" structure. Any package can contain your business assets (for more information on the Artifact repository, refer to the Red Hat JBoss BRMS User Guide).
To create the repository structure, do the following:
  1. Open Business Central in your web browser (if running locally http://localhost:8080/business-central) and log in as a user with the admin role (helloworlduser).
  2. Create an organizational unit in the Artifact repository:
    1. Go to AuthoringAdministration.
    2. On the perspective menu, click Organizational UnitsManage Organizational Units.
    3. In the displayed Organizational Unit Manager view, click Add.
      In the displayed Add New Organizational Unit dialog box, define the unit properties and click OK:
      • Name: helloworld
      • Owner: helloworlduser
  3. Create a new repository in the helloworld organizational unit:
    1. Go to AuthoringAdministration.
    2. On the perspective menu, click RepositoriesNew repository.
    3. In the displayed Create Repository dialog box, define the repository properties:
      • Repository Name: helloworldrepo
      • Organizational Unit: helloworld
  4. Go to AuthoringProject Authoring.
  5. In the Project Explorer in the organizational unit drop-down box, select helloworld, and in the repository drop-down box select helloworldrepo.
    Selecting the helloworldrepo repository in the helloworld organizational unit in Project Explorer

    Figure 5.1. Selecting the helloworldrepo repository in the helloworld organizational unit in Project Explorer

  6. Create a project in the helloworld repository:
    1. On the perspective menu, go to New ItemProject
    2. In the displayed Create new dialog box, define your Project properties:
      • Resource Name (project name): HelloWorld
      • Path: default://master@helloworldrepo/
    3. In the New Project Wizard dialog, define the maven properties of the Project. Press Enter after making each entry:
      • Group ID: org.brms
      • Artifact ID: HelloWorld
      • Version ID: 1.0
    4. Click Finish.