Wednesday, 13 February 2019

IoT in action

JDE IoT is easy, let's look at a use case and see how you can implement this solution.

Firstly, if you don't know how IoT can help you – think of something that you measure manually and let's automate that.

So, if you need to go and measure the temperature in a control room, then why not use a sensor to do this.  Then you can have that measured all of the time.  What about water quality?  What about lidar to measure the height of a stack of coal?  No worries!

At Fusion5, we've actually been through a process of designing this complete solution.

We have been using particle io boards to send sensor data to JD Edwards, but there is some cool tech in the middle.


We are using the particle 3G boards, like the boron below


but also dabbling with the latest mesh modules that they have released.  These allow us to have less 3G, but more sensors.

This is allowing us to produce any device, using a myriad of sensors and being able to react to the data immediately.



The build at the moment is above, with a remote temp sensor and also a water proof and dust proof housing

Below is a set of devices for a PoC we've completed here in Australia.  We have a couple of production POC's working with our JD Edwards clients.



These devices are waking up and sending temperature data & humidity data every 15 minutes to our particle cloud.  We are using particle as the middleman, as the particle complete device solution (including data plan) is perfect.  Added value is that if the power is disconnected, this also triggers an event that you can use to raise a work order, let's be honest – if the power goes, this is not good.  The device has a battery which allows 2 weeks of disconnected data to be sent.

We are using 3G, as it does not create any holes in the client's networks.  3G also ensures that if the power goes out, we can still send the sensor data out to the cloud and react.  Note that mesh devices can be connected to the 3G board, which extends its range without additional 3G data plans.


Simply, the diagram look like the above, but we need more layers to be future proof, there also needs to be some explanation to the logic layer.  You can see that all of the items are standard and the JDE orchestrations are configuration not code.  The solution is implemented without increasing your technical debt.

The above shows a little more detail of where we are adding strategic value, how this is an enterprise solution -  not a tactical one.  We use JDE for what it is good for – raising work orders or storing central data – it's not good for storing all of the trend data.  We use cheap cloud storage (2.3 c per GB per month, or a massive 28 cents a year).  Even with readings every 15 seconds and saying 256 bytes of data per read [date, time, GPS, temp, humidity], we are only going to store 24x60x4 - 5760 readings per day or 1.4 MB a day or 511MB a year per device.  This means that you can store the data from 200 devices a year for about 28 dollars a year.  You don't want to add 100GB to your JDE database do you?

You can see there are a number of items on this diagram.  We are using public cloud (in many cases AWS lambda) in to run logic over the top of the data, we do this as an initial triage – as we don't want to call orchestrations every time we get a meter reading (read the numbers above).

The data is interpreted in this cloud logic layer, which then can determine whether a business rule has been breached and call and orchestration accordingly.  Once again, the cloud costs of lambda are tiny and this is a cheap solution to run at scale.

Note that the values (actual breach values - high and low temperatures) ARE stored in JDE.  So there is a single place to go to maintain the threshold data.  The lambda functions query this on a scheduled basis – keeping everything fresh and efficient.

You'll also see mention of campfire in the diagram, this is a Fusion5 integration solution for enabling on premise software to be connected to the cloud.  It's our super light middleware, that is no fuss and build on AWS highly available constructs.  Highly available and disaster recoverable integration solution in the cloud!

All of the measurement data is being stored in a bucket (whether this is azure, google cloud storage or s3) to enable training AI down the track.  Imagine pointing quicksight at your data, and extracting insights.

This is a complete solution that can scale to any number of devices.  It delivers TRUE real-time ERP functionality – raising work orders when things get too hot – but also allows for future prediction analysis by providing the training data for AI.  This AI can deliver true actionable insights back into JDE and perhaps raise work orders before something actually gets too hot (based upon all of the training data).

This is all decoupled from the ERP.  This is all getting clients cloud ready.  BUT, JDE is doing all of the things that it is great at!

We have a self service web portal that users can view any of the configured IoT devices:

This can easily be hosted as a cafe1 window and accessible from JDE


You can see from above, that all of the information is at your fingertips from JDE, perfect.


We can drill down to the history too


This is all enabled with a simple orchestration and cafe1 pages. 

You also don't need JDE, we have the capability to call "webhooks" that can really go to anywhere, but also use campfire to call bespoke and on premise functionality.

Fusion5 and the innovation team are plugging in IoT and also the ability to embrace AI into our ERP.  This implementation means clients are not making large capital investments, and you are able to prototype these quickly and easily.

Devices are costing $150 each, data subscriptions are around $5 a month and then cloud costs (logic and website hosting) are costing another $5 a month.  Sure, the consulting might cost something, but you can see that the ongoing investment is minimal!

If you want to plug IoT into your JDE in a strategic way, Fusion5 would love to help!

Wednesday, 6 February 2019

Fraud detection in JDE using AI and orchestration

Okay, I’ve posted about it a number of times, but we all just need to admit it – orchestration is cool for JD Edwards.  Yeah, AIS was good, but it’s just got better and better.  This really is a challenge for us (the community that thrives on JD Edwards) to extend the use of JD Edwards beyond the traditional boundaries.  I’d like to challenge people to look outside of the square when they are solving business problems.   I’m going to step you through and really simple example of big gains from small investments using AI, Cloud and orchestration.

I do tend to talk a little more technical than most, unashamedly to be honest.  What I’m promoting in this post is to get the nitty gritty of web-hooks and API’s.  Understand that this is all really easy technology, easy to find and easy to implement.  Let’s say that you wanted a super simple solution that ripped the text of ANY attachment in JDE – no matter if it was a picture, PDF or anything.  You could then create a simple table in JDE and store the text in some sort of text search field (this can be implemented in so many ways, generally triggers over tables  etc etc).  This table could index the text in EVERY attachment.  Therefore every scanned PO, WO, every PDF attachment, every special instruction, every hand written note that was a photo could be converted to the TEXT value and be made searchable.  WOW, that would be great. 

I can only imagine finding a vendors part number or special notes of a PO from a couple of years ago could really save your bacon at some stage.  Being able to search attachments to work orders for serial numbers would be amazing for so many clients.  What if I said that something like this could be cobbled together < 1 week?  Treating your ERP like a searchable DMS – wow!

What if you were to look at an amazing extension of this idea to prevent fraud (I have to thank a good contributor Matthew S for this extension).  What if I took a hash of the resulting text from the scan of every document and looked for duplicate invoices (or fraud).  What if I could search for duplicate anything (let’s not get right into locality sensitive hashing https://en.wikipedia.org/wiki/Locality-sensitive_hashing), but there are some really amazing things that you could do.  This would be a complete bolt on solution that uses orchestration and some “APIs”.  We will talk about said API’s later.

Fusion5 have gone a long way to make this a reality.  We’ve created public facing API’s that are capable of many different interactions with a media object, for example:

  • Custom AI algorithm to recognize particular objects that you have trained the algorithm with
  • Character recognition algorithm that can turn something like this:
Into this  (My mind boggles that I can do such deep analysis of a photo like this.)

700N $99 TCOME E $45 $66 EACH 57 20% 20 PARTICIPATING BEER, PRE-MIX AND CIDER OFF 1 LITRE Vad Cruiser Captain Morgan Spiced Gold Rum, Smirnoff Red Vodka OR Canadian Club 700mi Whole team over? Covered. Baron Samedi Spiced Rum OR Jack Daniel's Old No 7 700ml HAHN Bombay Sapphire Gin 1 Litre 2 FOR BUY 2 OR MORE CASES OR 10 $28 CASE CASES OR 10 PACKS $41 CASE SA $10 EACH Coron "Extra SEST SERVED OVER VI Dew MAVE UP TO CASE DE PORTO ΚXXX XX GOLD GOLD CERVER MA BOURBON HAHN Heineken WHISKEY MIXED WITH PREMIUM CIDE MERCURY 4 LITRES PERON STRO AZZU Aceand hotely CERVECERIA MODELO, S.A MEXICO, D.F. PREMIUM Cola KOPPARBERI 'BUILT TO LAST 22. SIZ ITU TELS ASTUNDA perDry EST RUM 18 PREMIUM Scotch 700m De Bortoll Premium 4 Litre Casks Excludes fortified Apple IRON JACK 6.3% LARD CIDEI ORIGINAL XXXX Gold Bottles or Cans 24x375ml 24 PACK 6.9% ALC/VOL & COLA 190 mL 45% ALCNVOL HISP AUSTRALIAN LAGER EST 1911 HODART, TAS Heineken Premium Lager Bottles 24x330ml OR Coopers Premium Lager Bottles 24x355ml SUPER Peroni Nastro Azzurro Bottles 24x330ml 10 CANS 24 PACK SUPER SAVER S SUPER SAVER 10 CANS CANS SUPER SAVER SUPER SAVER EACH EACH SA EACH EACH EACH S BREW OOPERS HRB WERY TOOHEYS VODKA COOPERS PURE CI SAD BLONDE Um Low Carb Logo LOW CARU DRY VELVE ARK AL WOODSTOCK CRUISER BOURBON ORCHARD AND COLA THIEVES RASPBERRY Special - FACE GAMUN BOKLESS CARBOHYDRATES Houghton Classic Shingleback Red Knot AUS Twelve New Zealand Pinot Noir CLEAN CRISP TASTE APPLE CIDER Hardys HRB 2750 46% ALCANO Mumm Cordon Rouge Champagne NV 24 6.0 PACK 30 CANS IN-STORE @ your local BWS PICK UP Shop online. Collect instore. WITH YOUR GROCERIES @ woolworths.com.au/bws SIMPLY SHOP, SCAN AND SAVE with Woolworths Rewards at BWS rewards 17" We support the responsible service of alcohol. Available in SA from Wednesday 11 April until Tuesday 17 April 2018 unless sold out prior Savings are based on offers apply to the quantity advertised only. Limit rights reserved. Specials may not be available in all stores including Alice Springs. "Standard local call charges y by store. Wine is 750ml unless otherwise stated. At this great price no further discounts apply Casks not available in Adelaide City or Rundle Mall. See www.woolworthsrewards.com.au for terms and conditions Selected cases may not be available in all stores. WC110418/SA Page 35

  • Standard object detection
  • Landmark detection

We’ve embodied this in a simple to use GUI, to allow for interactive discovery (before plugging it in).

So all of these options can be plugged into ANY analysis in JD Edwards and scheduled using orchestration.  Extracting more value from the plain old photos.

In action:

My use case is is simply to find duplicate invoices, okay – this is going to be easy.

  1. I create my custom table (F55DUPINV) and view combo in my “database of choice” that is going to hold the text retrieved out of any attachment.  Note that there is going to be smarts here, because the text will be long.
  2. I create an orchestration that takes a parameter of MO data structure name and calls my API (webhook) via a connection.  This retrieves the text and then inserts this into a JDE form (or via a database connector if too big)
  3. This orchestration will also hash the text to a unique value for quick uniqueness checks.
  4. I can then have another scheduled orchestration that looks for new duplicates (or fuzzy logic like) and sends an email to the fraud officer of the instance, with a link to the actual transactions.

4 steps which can extract the text out of every attachment in JDE, compare them and automate the delivery of exceptions to your business rules.

I have not changed a single line of standard code, I’ve not contributed to my technical debt.  I’ve got actionable results from the implementation of a couple of nice orchestrations, some smart database features and some scheduling of orchestrations with notifications.

Although similar to a previous post, this shows real transactions and data going into JD Edwards in a different way.  I guess the perspective is more business focused.

Fusion5 are in the API & orchestration space.  If you’d like to trial some of this technology at your site – please do not hesitate to reach out.  We can get demo’s like this running in no time and allow you to harness the power of orchestrations at your organisation to extract real business value.  We can provide you a key to use our API’s and orchestrations that are ready to go.


Monday, 4 February 2019

Orchestration enhancements - SFTP

We hear about enhancements in orchestration studio, and sometimes just …yawn… because we think there is not much in it.  I’ve been looking into 9.2.2.4 (I know, behind the times) and the functionality is great.
Below is a sample connector defined to a free ftp server (that did not work, keep reading)…  but this is available from the tools menu in orchestration studio. 
That’s pretty simple.  Shame I cannot use key’s for authentication, that might be coming in subsequent releases?
But, when you go to use this connection in a service request, there is some magic.  You have a bunch of options (not just put and get) for your file IO needs. 
That is really neat.  You can get files easy enough and use variables for filenames, as you can see from below, just use the ${variable} syntax and they can be passed into the service request.
This is really functional (and unexpected), that you can get the native output from a UBE (or CSV or OSA).  This is a native get.  Also get the BIP output

Note that this will grab the output of the UBE and FTP the file in one fell swoop .  Then schedule it using the AIS scheduler .  Imagine what might have been lots of modifications and scripts is now a single operation orchestration studio that can be completed by a simpleton like me.   Once again, an amazing use case of UDO’s and orchestration working hard to reduce clients technical debt.  We all just need to start the process of converting the old ways we do things.

I tried a couple of free FTP servers on the internet to get this working, with various success.  The rebex.net one above had a problem negotiating security algorithms.  You cannot pass options into the FTP command with the interface that has been provided, so you might need to ensure that they play nice.  Of course there are work arounds to add items to the java.security files for the JRE that is running AIS, but it might be easier to change the server (or not).

I ended up being able to test everything with the following connection details:
goto this link to find the password, they need some credit for providing this! https://www.wftpserver.com/onlinedemo.htm 

You can upload and download, which is cool.  I got both of them working immediately (thanks JDE)
I then had a crack at the GetUBEOutput, which I thought was a bit of a joke initially, but it’s really good.
As I stated before, 1 SR, 1 schedule and 1 orchestration could launch a job then send the output from the job to a remote SFTP server.  It’s that easy.  How many mods are we going to save with this alone?
The return JSON is nice and informative too:
{
  "Connectors" : [ {
    "reportName" : "R0004C",
    "reportVersion" : "XJDE0001",
    "jobNumber" : 24,
    "executionServer" : "F5ENT",
    "jobStatus" : "D",
    "objectType" : "UBE",
    "user" : "SM00001",
    "environment" : "JPLAY920",
    "submitDate" : "20181030",
    "lastDate" : "20181030",
    "submitTime" : "174358",
    "lastTime" : "174400",
    "oid" : "R0004C_XJDE0001",
    "queueName" : "QBATCH",
    "fileName" : "/upload/R0004C_XJDE0001_24_PDF.pdf"
  } ]
}
In summary, the SFTP worked out of the box first time.  Created a connection, created an SR – wrapped the SR in an orchestration and boom!  I was able to sftp files from anywhere to anywhere.  Making this parameter driven is easy and then submitting the same to cURL is also easy – so that you could EASILY call this orchestration from a BSFN (see B98ORCH) you probably need 9.2.3 for this.
jdeOrchestrationManager *orchMgr = (jdeOrchestrationManager *)jdeOrchestrationManagerInit(lpBhvrCom);
The magic exists in the function pointer above





Extending JDE to generative AI