Skip to main content

Business systems

Business systems connect the plant to the IT systems around it. A connector reads products and production orders from an ERP, MES or maintenance system, and sends work orders there after a person approves them. The plant system stays the owner of process data. Business systems never receive process values from this page.

Business systems page with a REST connector and its streams
Business systems page with a REST connector and its streams

The page is Connectivity → Business systems. Its lead reads "Reads products and production orders from ERP, MES or maintenance systems and sends work orders there after approval. The plant system stays the owner of process data."

Enterprise licence and master key

Business systems need an Enterprise licence. Without one, existing connections can be looked at, rejected and deleted, but nothing runs. The Console host also needs MI_MASTER_KEY set, so credentials can be stored encrypted.

How it works​

  • A connection has a type, a schedule and a list of streams ("Data to read"). Each stream says where the data is and how its fields map to a product or an order.
  • Reading is pull: the Console reads on a schedule, or on demand with Run now.
  • Records that come in land in an inbox with an outcome before they are applied. You see what would be created or changed before it is.
  • Work orders go the other way, and only after approval by a second person.

Connector types​

There are two generic connectors. There is no SAP-specific or database connector.

TypeUse
REST (JSON over https) (generic.rest)A system with an HTTPS JSON API.
CSV files (generic.csv)A system that exports files to a folder on the Console server.

Step by step​

  1. Open Connectivity → Business systems and add a connection.
  2. Choose the type and fill Name, Switched on, Read every (seconds) and, if the system takes work orders, Send approved work orders.
  3. Add one or more streams under Data to read. For each: Name of this data, Source and Fields mapping. Becomes is Products or Production orders. List products before orders so products are read first.
  4. Enter the credentials in the dialog "Credential: name". See Credentials.
  5. Click Preview. It reads the first page and shows what would happen. It stores nothing.
  6. Check the records. Fix the mapping until the outcomes look right.
  7. Click Run now, or wait for the schedule.

Field mapping​

Each stream maps source fields to target fields.

FieldMeaning
Identifier thereThe key in the other system.
Changed at (optional)A change time, for incremental reads.
Deleted mark (optional)A field that marks a deleted record.
each target fieldColumn or path (where to read it) or Fixed value.

Under More:

SettingMeaning
Translate valuesthere=here, one per line. Values not listed are held back.
Decimal sign. or ,.
Time layoutA layout such as 02.01.2006 15:04 (the Go reference layout).
Time zoneZone of the source times.

Further options: Take over records here that have the same code (otherwise the same code is a conflict) and Treat records that disappear there as deleted with After how many complete passes (0: 2) and Read everything every (hours, 0: 24). A mass disappearance is held back until you confirm it (Confirm deletions for).

REST settings​

SettingMeaning
Address (https)Base URL.
TimeoutSeconds. 0 means 30, at most 60.
Sign-innone, user and password (basic), token (bearer), or token in a header (you give the header name).
Per stream: Path, QueryThe path and name=value lines. No secrets in the query.
Path of the list in the answerWhere the array is in the JSON.
Pagesnone, next (address of the next page), token, or offset (Page parameter, Size parameter, Page size). Path of the total is optional.
Incremental readChanged-since parameter, Changed-since text, with {since}, layout, Path of the change time, zone and Overlap (s, 0: 300).
Work order pushPath; Document (remote.path=field, or =text for a constant); Path of the new identifier in the answer; Header against duplicates and How long it is remembered (s); Field that stores the key; and a search (path, parameter, path of the list, path of the identifier).

The body limit is 8 MiB.

CSV settings​

SettingMeaning
Folder on the serverWhere the files appear.
Wait after the last change (s, 0: 5)Wait until a file stops growing.
Per stream: File, Delimiter (empty: ,)The file name and delimiter.
Marker file (optional)A file the exporter writes last, so the connector knows the data file is complete. It may hold the SHA-256 of the data file.
Work order pushFolder for new files, Columns, separated by commas, Folder of processed files (optional).

Limits: file size 64 MiB, page size 500.

Credentials​

Click the credential button of a connection. The dialog "Credential: name" asks for User and Password, or a Token, and an optional Valid until.

  • The credential is stored encrypted and is never shown again.
  • It is used only for the address it was entered for. It is deleted if the address or folder changes.
  • Never put passwords or keys in the connection form.
  • If the system refuses the sign-in, the connection stops with "sign-in refused" and is not retried, so the account is not locked. After you fix the credential click Try once more.

Records and work orders​

Per connection: Edit, Preview, Run now (reads everything once and sends approved work orders), Records and Delete.

Records show the inbox and the outcomes: applied, no change, conflict, waiting, not usable, would be created, would be changed, would be cancelled.

Work orders​

On the Work orders tab click New work order: Title, Description, Machine (optional), Priority, Type and Connection.

StatusMeaning
waiting for approvalProposed.
approvedApproved by someone else.
being sentIn transit.
deliveredThe other system took it.
rejected, held back, needs a personNot sent.
  • Four-eyes rule: "Someone else must approve it before it is sent." You see "You proposed it, so someone else must decide."
  • Actions: Approve, Reject (with a reason), Send again ("Only if you checked that this work order does not exist there"), and "It exists there" (enter the external identifier).
  • A work order without a machine has no known origin. It may leave the plant only if data of unknown origin may leave (governance egress policy).

Example for the demo plant​

Read the production orders of Line 1 from an ERP REST API:

SettingValue
Nameerp-orders
TypeREST (JSON over https)
Address (https)your ERP's API address (illustrative: https://erp.example.com/api)
Sign-intoken (bearer)
Read every (seconds)300
Stream 1Name products, Path /products, Becomes Products
Stream 2Name orders, Path /orders, Becomes Production orders

Click Preview first. Then check the orders on the Production page.

Limits and good practice​

  • Start with Preview. Nothing is stored by it.
  • Map a stable identifier. Never use a name that people edit.
  • Use a service account with the least rights in the other system.
  • Keep the schedule slow (minutes). Orders change slowly.
  • Never let one side delete in bulk without a look: the deletion hold exists for that.
  • Process data stays in the plant. Do not use Business systems to export tag values. Use Uplinks.

Troubleshooting​

SymptomCauseFix
Nothing runsNo Enterprise licence.Install the licence. See Licensing.
Credential cannot be savedMI_MASTER_KEY not set on the Console host.Set it and restart the Console.
"sign-in refused"Wrong or expired credential.Fix the credential, click Try once more.
Records show "conflict"Same code exists here.Enable Take over records here that have the same code or change the code.
Records show "not usable"Mapping or format wrong.Check the mapping, decimal sign, time layout.
Values are held backA value is not in Translate values.Add it.
Many records "deleted" held backMass disappearance protection.Check the source, then confirm the deletions.