Using PMML models in your Business Processes

Running predictive models natively in an InterSystems IRIS Business Process has of course always been the goal of our PMML support, but somehow never made it into the kit because there were a few dependencies and choices that needed addressing and answering. Anyhow, thanks to some pushing and code kindly provided by @Amir Samary (Thanks again Amir!), we finally got it wrapped in a GitHub repo for your enjoyment, review and suggestions.

The repo contains both a generic Business Operation that works with any PMML model, using an array to pass in model inputs, and a utility that will generate a BO for your PMML class. The latter is an extra step (one-liner) while setting up, but it will generate dedicated request and response objects, which will be a lot more convenient wiring properties in the request builder when dealing with complex models.

Next to the utility code, there's also a sample Production that leverages both approaches. 

Let us know what you think and with the right feedback we can choose the best way to eventually include in the kit. Of course, always happy to hear if and how you have been using PMML models to date!

  • + 1
  • 3
  • 176
  • 2

Comments

Nice feature to have.

One note about the code: if you have a BO that accepts only one type of messages, you can (I myself prefer to - as it immediately notifies the reader that this BO works with only one  type of messages, and not just a small BO in development) remove Message map altogether and define an OnRequest method, which would process these messages. Pull request.