Skip to main content
Technical Preview

Overview

Critical Manufacturing MES (CM MES) runs material tracking, dispatch, resources, data collection and quality for complex discrete and semiconductor plants. Every MES service is exposed as REST on the MES host. This connector lets plant logic on MQTT track materials in and out, post machine readings and log machine state changes, without custom code. CriticalManufacturingMesApi (CriticalManufacturingMesRestApi.lot) is one client connector on https://YOUR_CMF_SERVER with 37 events: 2 Security Portal token events, 17 reads and 18 writes. No event deletes, terminates or removes anything.
The events follow CM’s public REST API catalog, which publishes one Swagger 2.0 file per service (for example Material.swagger.json), and the Host API reference for input and business objects. The catalog has 66 services and about 2,000 operations. This app packages the shop-floor slice. To add another operation, copy an event and change the endpoint to /api/<Service>/<Operation>.

Server host

CM MES is installed per customer, on premises or hosted by CM. Replace YOUR_CMF_SERVER with the host of your MES UI, with no trailing slash. REST services live under /api/<Service>/<Operation>. The Security Portal is on the same host under /SecurityPortal. If your Security Portal runs on a different host, copy the two token events into a second connector on that host.

Authentication

A Personal Access Token (PAT) acts as its MES user. Keep PATs and client secrets in Hub secrets, map them in with GET SECRET, and never publish them on a topic other clients can read.
CM MES uses the Security Portal (OAuth 2.0). Pick one of these:
  1. Personal Access Token. In the MES UI, open your User Profile and create an access token for the Coreflux service user. Publish {"tenant": "<TenantName>", "client_id": "MES", "pat": "<PAT>"} on mes/critical-manufacturing-mes/token/create. The Security Portal validates the PAT with the refresh_token grant and returns a Bearer access_token. Use the Security Portal client ID set on your environment (/Cmf/System/Configuration/SecurityPortal/ClientId/, usually MES).
  2. Client credentials. For application-to-application calls with no user, publish {"tenant": "<TenantName>", "client_id": "<id>", "client_secret": "<secret>"} on mes/critical-manufacturing-mes/token-client/create.
Then send "authorization": "Bearer <access_token>" in every other payload. Tokens expire, so request a new one on a timer (the example actions use 30 minutes). A PAT does not work as a Bearer token. CM’s community answer is to send it with Basic authentication instead, as "authorization": "Basic <base64 of <PAT>:>", that is the PAT as user name with an empty password. That form comes from a community answer and has not been tested here. The token flow is the documented path. TenantName is the tenant configured for your environment. Calls run with the MES roles and data groups of the PAT owner or client application. Suggested secrets: CMF_PAT and CMF_TENANT, or CMF_CLIENT_ID and CMF_CLIENT_SECRET.

Payload conventions

  • Body. Almost every service is POST. "body" is sent unchanged as the operation’s input object, with the PascalCase properties from the Swagger file, for example ComplexTrackInMaterialInput has Material, Resource, CurrentDataCollectionPoints and SkipDCValidation.
  • Entity references. Reference materials, resources and other entities by Name (or Id) with a "$type", for example {"$type": "Cmf.Navigo.BusinessObjects.Material, Cmf.Navigo.BusinessObjects", "Name": "MAT-0001"}. Resources use Cmf.Navigo.BusinessObjects.Resource, state models Cmf.Foundation.BusinessObjects.StateModel, Cmf.Foundation.BusinessObjects.
  • Readings. A data collection point is {"$type": "Cmf.Navigo.BusinessObjects.DataCollectionPoint, Cmf.Navigo.BusinessObjects", "TargetEntity": {"$type": "Cmf.Navigo.BusinessObjects.Parameter, Cmf.Navigo.BusinessObjects", "Name": "Temperature"}, "Value": 72.4, "ReadingNumber": 1, "SampleId": "Sample 1"}.
  • Losses. Loss lines are LossBonusAffectedQuantity objects with Reason and ReasonPrimaryQuantity. Hold lines are MaterialHoldReason objects with TargetEntity (the reason) and Comment.
  • Enums. Enums are integers, for example Direction 0 Ascendant / 1 Descendant on GetMaterialGenealogy, and ComplexPerformDataCollectionMode 0 Material, 1 Resource, 2 first material in the resource, 3 all materials in the resource.
  • Query. GetObjectByName and GetObjectById take "query" as the URL query string, for example "query": "Type=Material&Name=MAT-0001&LevelsToLoad=1".
  • Token form. The token body is form-encoded with raw substitution, so keep the tenant, client ID and secret free of & and =.
Two details are not shown in the public Swagger files: the exact Type value GetObjectByName expects (a short name such as Material, or the URL-encoded type name), and whether your host needs "$type" on every reference. The "$type" form matches CM’s Connect IoT workflow samples. Check both against your MES before going live.

Events

Tokens and session

Generic objects and saved queries

Materials, dispatch lists and production orders (read)

Material transactions (write)

Resources (machines)

Data collection (EDC)

Production orders (write)

Every event replies on its topic plus /response.

Example: connector excerpt

Example: plant actions

These actions get a token every 30 minutes, keep it on an internal topic, track a material in and out when the press loads and finishes it, send the press temperature to an ad-hoc data collection, log machine state transitions and poll the dispatch list.

Not packaged

  • Every Delete*, Remove*, Terminate* and Unterminate* operation, by policy.
  • Master data and configuration (Create*, FullUpdate*, Update* of products, flows, recipes, roles and data collections).
  • /api/Security/Login. It is not in the public REST catalog; use the Security Portal token endpoint.
  • Outbound webhooks. CM’s public documentation lists no outbound webhook feature, so no receiver connector is packaged. Pushing MES events to MQTT is a job for Connect IoT or integration entries, configured inside MES.

Status

The connector stays blocked until it is checked against a real CM MES 11.x server with the Security Portal: a token from a PAT, Echo, GetCurrentUser, GetResourceByName and GetMaterialBasicInformation, and a Track-In / Track-Out of a test material.
Last modified on October 21, 2026