Got my head around the interplay of 4D’s Object type variables and JSON construction. Succeeded in building a job representation which includes nesting arrays of products and production routing with materials. This will form the basis for the api into the erp.
Although it can be published directly from 4D’s webserver, the plan is to utilize this as a fall back during server or network outages. JSON files of jobs will be triggered by changes at hq and written to a dropbox that Node will watch so new arrivals get inserted into mongodb hosted at the plant. Node will then listen for ajax calls from a single page web app that can stand in for the normal eBag screen. In similar fashion the production schedule can be published.