Home » Java » Enterprise Java » JBoss BPM Suite Quick Guide – Import External Data Models to BPM Project

About Eric Schabell

Eric is Red Hat’s Portfolio Architect Director. He's renowned in the development community as a speaker, lecturer, author, and baseball expert. Follow on https://www.schabell.org.

JBoss BPM Suite Quick Guide – Import External Data Models to BPM Project

tips-and-tricksYou are working on a big project, developing rules, events and processes at your enterprise for mission critical business needs.

Part of the requirements state that a certain business unit will be providing their data model for you to leverage.

This data model will not be designed in the JBoss BPM Suite Data Modeler but you need to have access to it while working on your rules, events and processes from the business central dashboard.

For this article we will be using the JBoss BPM Travel Agency demo project as a reference, with it’s current data model built externally to the JBoss BPM Suite business central. The external data model is called the acme-data-model and is found in the project directory:

Screen Shot 2015-06-17 at 3.21.56 PM

This data model is built during installation and provides you with an object data model as a Java Archive (JAR) file which is installed into the JBoss BPM Suite business central component by placing it into the following location:

jboss-eap-6.4/standalone/deployments/business-central.war/WEB_INF/lib/acmeDataModel-1.0.jar

Authoring --> Artifact repository.

Authoring –> Artifact repository.

This way of deploying the data model means that it is available to all projects you work on in JBoss BPM Suite business central, something that might not always be preferable. What we need is a way to deploy external data models into JBoss BPM Suite and then selectively add them to projects as needed.

Within JBoss BPM Suite there is an Artifact Repository that is made just for this purpose. We can upload through the business central dashboard UI all our models and then pick and choose from the repository artifacts (your data model is one artifact) on a per project basis.

This gives you absolute control over the models that a project can access.

Choose external data model file.

Choose external data model file.

There are a few steps involved that we will take you through here to change the current installation of JBoss BPM Travel Agency where the acmeDataModel-1.0.jar file will be removed from the previously mentioned business central component and uploaded into the Artifact Repository and added to the Special Trips Agency project.

Here is how you can do it yourself:

  • obtain and install JBoss BPM Travel Agency demo project
  • remove current data model from global business central application:
    $ rm ./target/
    jboss-eap-6.4/standalone/deployments/business-central.war/WEB_INF/lib/acmeDataModel-1.0.jar
Upload external model jar file.

Upload external model jar file.

  • start JBoss BPM Suite server after installation as stated in the installation instructions
  • login to JBoss BPM Suite at http://localhost:8080/business-central with:
    • u: erics
    • p: bpmsuite1!
  • go to AUTHORING –> ARTIFACT REPOSITORY
  • go to UPLOAD –> CHOOSE FILE… –> projects/acme-data-model/target/acmeDataModel-1.0.jar –> click button to UPLOAD
    • this puts the external data model into the JBoss BPM Suite artifact repository

artifacts

  • got to AUTHORING –> PROJECT AUTHORING –> OPEN PROJECT EDITOR 
  • in project editor select GENERAL PROJECT SETTINGS –> DEPENDENCIES
  • in dependencies select ADD FROM REPOSITORY -> in pop-up SELECT entry acmeDataModel-1.0.jar
     
    artifact-list

This will result in the external data model being added only to the Special Trips Agency project and not available to other projects unless they add this same dependency from the JBoss BPM Suite artifact repository.

final-view

If you build & deploy the project, run it as described in the project instructions you will find that the external data model is available and used by the various rules and process components that are the JBoss BPM Travel Agency.

As a closing note, this works exactly the same for JBoss BRMS projects.

Do you want to know how to develop your skillset to become a Java Rockstar?

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!

 

1. JPA Mini Book

2. JVM Troubleshooting Guide

3. JUnit Tutorial for Unit Testing

4. Java Annotations Tutorial

5. Java Interview Questions

6. Spring Interview Questions

7. Android UI Design

 

and many more ....

 

Receive Java & Developer job alerts in your Area

I have read and agree to the terms & conditions

 

Subscribe
Notify of
guest

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

0 Comments
Inline Feedbacks
View all comments