ISA-95 / B2MML
When the destination of an integration is an MES, an ERP or a data lake that speaks ISA-95 (IEC 62264), the work is not technical — it is about format. The payload leaving the line already has everything: equipment, order, good quantity, scrap, start and end. What is missing is dressing it in the structure the other side expects, with the right element names, nested in the right order.
The ISA-95 / B2MML pack delivers that half ready-made: Transformers whose output side is already in the standard. You only point at where each field comes from in your payload.
This pack is marked as a draft: the models follow the public structure of B2MML / ISA-95, but have not yet been checked against a real B2MML destination. Validate the result on the target system before using it in production — and confirm with your organisation the terms of use that apply to these formats.
A pack with no Interface, Collection or Delivery
Every other CMS pack installs a whole integration. This one does not: it is a model library. Installing it creates Transformers only, which you then pick on the Definition you already have.
The reason is what ISA-95 is. It does not describe where the data comes from — your Collection is still yours, be it SAP, database, MQTT or file. It describes how the data is said. Creating Interfaces alongside would invent a flow you never asked for.
What is inside
| Model | Direction | Output format |
|---|---|---|
| Production confirmation → ProductionPerformance | Delivery | JSON |
| Production confirmation → ProductionPerformance | Delivery | B2MML (XML) |
| Production order → ProductionSchedule | Delivery | JSON |
| ProductionSchedule B2MML → flat object | Collection | Input: B2MML XML |
| Produced lot → MaterialLot | Delivery | JSON |
The fourth is the way back: a ProductionSchedule that arrives as B2MML and has to become a flat
object for the rest of the CMS to work with.
Installing
The pack is installed from the Packs assistant, on the Applications screen — the purple boxes icon on the Application row. The assistant asks for three values:
| Field | What it is for |
|---|---|
| Name prefix | Prefixes the name of every Transformer created. Suggested: the Application code |
| Enterprise | The Enterprise level of the ISA-95 hierarchy |
| Site | The Site level of the ISA-95 hierarchy |
The prefix is not decoration. A Transformer’s name is the natural key for import/export and has no uniqueness constraint in the database: installing the pack where a Transformer of the same name exists would match the wrong record.
The Packs button shows up on any Application that has an installable pack — and since this one depends on no connection at all, it is available everywhere, including on an HTTP Application. On the assistant’s first step, a pack requiring an External Connection the Application does not have is dimmed, with the reason.
After installing
Every Transformer created carries a MAPA block at the top of the script — the only part you edit:
/* ISA-95 / B2MML - ProductionPerformance (apontamento de producao)
* O CMS entrega ao destino um objeto no formato ISA-95. So o bloco MAPA muda por cliente:
* aponte cada campo para o SEU payload de entrada. O resto ja esta no padrao.
*/
var m = JSON.parse(payload);
// ---- MAPA: a unica parte que voce edita ---------------------------------
var MAPA = {
ordem: m.ordem, // ordem de producao -> ProductionRequestID
operacao: m.operacao, // operacao / fase -> SegmentResponse.ID
equipamento: m.recurso, // maquina que executou -> EquipmentActual
inicio: m.inicio, // ISO 8601
fim: m.fim, // ISO 8601
// ...
};On the left is the ISA-95 field; on the right, where it comes from in your payload. Nothing below MAPA needs touching — that is what builds the structure.
Once mapped, pick the Transformer on your Delivery Definition (or Collection, for the inbound model) like any other. See Transformers.
The B2MML (XML) inbound model uses xmlToJsonRaw on purpose: order numbers, material codes and
batches often carry leading zeros, and automatic conversion to a number would destroy them
silently.