Eric D. Schabell: JBoss BPM Suite Quick Guide - Import External Data Models to BPM Project

Friday, June 26, 2015

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

You 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:

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:


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.
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:
$ rm ./target/jboss-eap-6.4/standalone/deployments/business-central.war/WEB_INF/lib/acmeDataModel-1.0.jar
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 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

Select dependencies to add to project.
  • in project editor select GENERAL PROJECT SETTINGS --> DEPENDENCIES
  • in dependencies select ADD FROM REPOSITORY -> in pop-up SELECT entry acmeDataModel-1.0.jar

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.

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.
Looking to Automate your business?

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

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.