Blog Posts BPMN DMN

An object model marshaller for all occasions

Blog: Drools & jBPM Blog

Scorecards

We have a new Scorecard editor.

It needs to load PMML XML and save it. Great. It’d be less than useful if it could not.

We also support evaluation of PMML XML models. Super. It’s nice to be able to actually execute models too.

The problem

An object model marshaller for all occasions.

Our Scorecard example illustrates the problem clearly:

Two technologically disparate teams needing the same functionality yet duplicating effort.

"Back-end" developers choose their technology of choice and "front-end" developers choose theirs.

The end result is two code bases performing the same function.

Both needing maintenance and both at risk of diverging.

An object model marshaller for all occasions; divergence meter
https://steins-gate.fandom.com/wiki/Divergence_Meter

Enter an object model marshaller for all occasions.

There is a better way!

We have been working on an approach to generate source code from an XSD.

We are able to generate source code for both the class model, a deserlializer to load it and serializer to save it.

The source code is then compiled for different target environments where it executes.

Single source. Single maintenance branch. No divergence.

The approach

We use XJC with a Maven Plugin to generate JAXB annotated classes from the XSD.

In our working prototype we have chosen to generate both interfaces and concrete classes. The idea being that we can write further code against the interfaces but have concrete implementations to load and save different versions of the model. We then use the mapper-xml Maven Plugin to generate source code from the JAXB annotations to handle loading and saving.

We have a working prototype for PMML v4.4.

Finally we can:

The post An object model marshaller for all occasions appeared first on KIE Community.

Leave a Comment

Get the BPI Web Feed

Using the HTML code below, you can display this Business Process Incubator page content with the current filter and sorting inside your web site for FREE.

Copy/Paste this code in your website html code:

<iframe src="https://www.businessprocessincubator.com/content/an-object-model-marshaller-for-all-occasions/?feed=html" frameborder="0" scrolling="auto" width="100%" height="700">

Customizing your BPI Web Feed

You can click on the Get the BPI Web Feed link on any of our page to create the best possible feed for your site. Here are a few tips to customize your BPI Web Feed.

Customizing the Content Filter
On any page, you can add filter criteria using the MORE FILTERS interface:

Customizing the Content Filter

Customizing the Content Sorting
Clicking on the sorting options will also change the way your BPI Web Feed will be ordered on your site:

Get the BPI Web Feed

Some integration examples

BPMN.org

XPDL.org

×