Monday, July 18, 2016

Simple event-driven automations with Event hub and MEC - overview

At Inforum 2016 this year I presented a simple pattern we'd developed across multiple projects to automate and apply business rules when transactions occur in the M3 business engine.

Historically we have used JScripts to achieve this within Smart Office, but a number of factors have driven us away from this approach.  These include:
  • the increased maturity of the H5 client;
  • the inclusion of the H5 enterprise features within the foundation client as of Infor Xi;
  • an increasing diversity of data input mechanisms across our customer base (M3WM, custom applications, data feeds from PLCs etc.); and 
  • the problems inherent to applying business rules at the UI level that could be bypassed by users.
While JScripts still have their place, for set and forget application of business rules along the lines of "if this then that", there are better approaches now available.

We first investigated Infor's Ming.le a couple of years back, but when we started looking into Ming.le our assessment was that it was not mature enough to meet out needs.  Note that this has now changed, we have used Ming.le on a few projects and we are very excited by the possibilities offered by Ming.le within the Infor Xi stack.

Nonetheless, while at the time we were not convinced that Ming.le was appropriate for our needs, the technology underpinning Ming.le was of interest.  Specifically Event hub which monitors all transactions within M3 and allowed us to capture:
  • Start and stop of M3 programs including batch programs;
  • Create, Update and Delete transactions on M3 tables; and
  • Current and Prior values of records in M3 tables.
Many, if not most, of the processes we wished to automate occur when one of the transactions above occurs.  For example we wanted to:
  • Notify upstream planners for supply chain order connected orders when requested delivery date on CO, MO, PO line changes;
  • Update customer agreement / bulk order when quote changed;
  • Reclassify, move, or write off balance ID when goods were received into a location;
  • Load payment when a POS sale is invoiced;
  • Write to a log when a M3 program is started;
  • Export planned orders when the MRP run completed.
What we found was that Event hub existed within the M3 ecosystem as shown below:

Event hub is one of the technologies underpinning the M3 ION BODs and is responsible for creating the initiator message, much like a MBM, that instructs MEC to create the BOD and pass to ION for action.

One of the great things about Event hub is that it is available in all M3 10.1+ installations that have the business engine on the Grid.  So for sites that are on the Grid, but don't yet have ION, we can still leverage the functionality that Infor has delivered to support ION to build automations as described here.

The pattern we developed for creating a simple automation has three main parts:
  1. Create the Event hub subscription;
  2. Create the MEC subscription to Event hub; and
  3. Build the automation in MEC.
Over the next few days I'll detail how each of these steps work and how, with minimal MEC skills, simple event-driven automations can be built.

Saturday, July 16, 2016

Inforum 2016

Inforum 2016 in New York was a great opportunity to meet colleagues and friends, learn what's coming in the new versions of the Infor product suite, hear from thought leaders in a number of areas and enjoy the Maroon 5 concert :)