Enterprise Java

How To Import Any JBoss BRMS Example Project

This tips & tricks comes to you after I have been asked the following repeatedly over the last few weeks by users of the JBoss BRMS demos:

“How can I import the projects associated with the various JBoss BRMS demo projects into my own existing installation?”

What this means is that users want to have an example project in their personal installation of the product without using the projects installation process. This is certainly possible but not totally obvious to everyone.

Below I will walk you through how the various example projects for JBoss BRMS are setup, how the actual rules projects are loaded into JBoss BRMS when you set them up and why. After this I will show you how to extract any of the available rules projects for importing in to any previously installed JBoss BRMS server.

Screen Shot 2016-06-21 at 1.54.07 PM
Figure 1: In JBoss BRMS open the Administration perspective with menu options, Authoring -> Administration.

Background on how it works

The normal installation of a JBoss BRMS demo project that I have provided uses a template. This template ensures that the process is always the same; download, unzip, add products and run the installation script. After doing this, you are done, just fire up the JBoss BRMS for the adjusted experience where you open up the Authoring perspective to a pretty process designer with the demo project displayed for you to kick off a demo run.

These projects have a demo template that provides some consistency and you can read about how it works in a previous article.  For the initial installation run of any of these demo projects, a folder is copied from support/brms-demo-niogit to the installation at the location target/jboss-eap-{version}/bin/.niogit. 

Figure 2: To import a new project, open the Clone repository from the menu Repositories. This will allow you to bring in any rules project to your JBoss BRMS.
Figure 2: To import a new project, open the Clone repository
from the menu Repositories. This will allow you to bring
in any rules project to your JBoss BRMS.

This folder contains all of the project and system Git repositories that are formatted for the version of the project you have downloaded. By installing this directory or complete repository, when JBoss BRMS starts up the first time, it will pick up the state I left it in when designing the experience around you using this demo project.

Get your hands on a specific rules project

The problem I want to help you with in this article is to show you how to extract only the rules project from one of these examples and import this into your own installation of JBoss BRMS.

Figure 3: Cloning a repository is how you import an existing project, which requires the information shown.
Figure 3: Cloning a repository is how you import an
existing project, which requires the
information shown.

The following list is the order you do the tasks, after which I will explain each one:

  1. Download any JBoss BRMS demo project and unzip (or clone it if you like).
  2. Log in to your own JBoss BRMS and open Administration perspective via menu: Authoring -> Administration.
  3. Setup the new rules project you want to import: Repositories -> Clone repository -> fill in details including import project URL
  4. Explore the new project in the Authoring perspective: Authoring -> Project Authoring

I am going to assume you can find a JBoss BRMS demo project of your liking from the link provided in step 1 and download or clone to your local machine.

I will be using the JBoss BRMS Cool Store Demo as the example project you want to import into your current JBoss BRMS installation instead of leveraging the standalone demo project.

In your current installation where you are logged in,  open the Administration perspective as shown in figure 1 by menu options Authoring -> Administration. This allows you to start importing any existing rules project. We will be importing the Cool Store rules project by using the feature to clone existing projects found in menu options, Repositories -> Clone repository as shown in figure 2.

Figure 4: Once the project has been imported (cloned), you will receive this message in a pop-up.
Figure 4: Once the project has been imported (cloned), you
will receive this message in a pop-up.

This will produce a pop-up that asks for some information about the project to be imported, which you can fill in as listed below and shown in figure 3:

  • Repository Name: retail
  • Organizational Unit: Demos    (select whatever org you want to use from your system)
  • Git URL: file:///Users/erics/demo-projects/brms/brms-coolstore-demo/support/brms-demo-niogit/coolstore-demo.git

Figure 5: Explore your newly imported rules project in the authoring perspective within your JBoss BRMS installation.
Figure 5: Explore your newly imported rules project in the
authoring perspective within your JBoss BRMS installation.

Now you can explore the new imported project in your authoring perspective and proceed as you desire with this project as shown in figure 5. This will work for any project I have put together for the field that is based on the standard template I use.The most interesting bit here is the Git URL, which is normally something hosted online, but this project we want to import is positioned locally in our filesystem, so we use a file based URL to point to it. Click on Clone button to import the project and you should see a pop-up that looks like figure 4 stating that you have successfully imported your project.

I hope this tips & tricks helps you to explore and enjoy as many of the existing rules examples offered in the current collection of demo projects.

Eric Schabell

Eric is Chronosphere's Director Technical Marketing & Evangelism. He's renowned in the development community as a speaker, lecturer, author and baseball expert. His current role allows him to coach the next generation of technical marketers & evangelists helping the world to understand the challenges with cloud native observability. He brings a unique perspective to the stage with a professional life dedicated to sharing his deep expertise of open source technologies and organizations. Follow on https://www.schabell.org.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Back to top button