Skip to content

eaxscada example check and the rules an example must pass

eaxScadaReferenceStarterProEnterpriseView as Markdown
Terminal window
eaxscada example check <zip>

Checks an example project’s zip as an import does, without a server: the zip rules, the manifests and hashes, the tag fence, the write fence, no equipment connection and no server-wide setting. Nothing is written. It checks as for a fresh server of the full edition, where nothing exists yet: the checks that depend on your server (a taken PLC id, a taken tag root or project name, the parts your edition skips) are made by the import’s preview.

Exit code Meaning
0 The example would be imported.
1 Refused. Every problem is listed.
2 Usage error: no zip given, or the file cannot be read.

An accepted zip prints its id, version, tag root, example PLC and SHA-256, then the counts of what it adds:

OK eaxware-example-bottling-line-1.0.0.zip: example bottling-line 1.0.0, tag root Examples/Bottling, PLC ex-bottling, sha256 <sha256>
<n> screens, <n> components, <n> alarms, <n> local tags, <n> recipes, <n> dashboards, <n> historian configurations

A refused zip prints REFUSED <zip> (<id> <version>, sha256 <sha256>): and one line per problem, <entry>: <rule>: <reason>. A zip that cannot be read as an example prints REFUSED <zip>: and its problems. A zip over 16 MB is refused before it is read. Lines that start with warning: do not refuse the zip: for example, an eaxScada build that is not a release version does not check the example’s minimum version.

The eaxPLC part has its own check: plc-server example check <zip> (see Run a simulated PLC).

The import checks everything on Preview and again on Import, before anything is written. One problem refuses the whole example: 422 with "status": "refused" and the plan, nothing written. Each problem names its rule:

Rule What it refuses
zip A zip over 16 MB, over 64 MB unpacked, with over 1000 entries, an entry over 8 MB, a compression ratio over 100:1, a symlink, a directory entry, a duplicate, or a compression other than stored or deflated.
entry An entry name outside the example layout (below), with .., an absolute path, a backslash, or more than 4 path levels.
json An entry that is not UTF-8 or not valid JSON.
manifest example.json, scada/manifest.json or plc/example-plc.json that does not follow its schema; a dashboard with the id of one of the example’s screens (screens and dashboards share one id space).
hash An entry missing from the files list of example.json, listed but missing from the zip, or whose SHA-256 differs.
format A newer example format, or an example that needs a newer eaxScada.
tag_fence A tag outside the example’s tag root Examples/<Name>, named by a screen, alarm, script, recipe, dashboard or any other part. Reading System/Health/ is allowed.
write_fence A write target outside the tag root: a button, faceplate, script, recipe parameter, alarm handshake tag or dashboard command. A target computed at run time is checked at run time, as for any screen; one whose fixed start already leaves the root is refused here. A command to the plant emergency-stop signal is refused.
equipment A driver channel or device, an address of another host, a fieldbus that opens a port, or a component the example does not carry.
server_wide A server-wide setting, such as users, roles, the licence, the genealogy settings or the production switches.
script A script that writes outside the root, or reaches files or the network.
plc An eaxPLC part that does not follow the example layout. The PLC’s own installer checks the rest.
plc_identity The example PLC id is already known to this server: a PLC, an edge PLC, an imported example, a key file, or a PLC heard on the bus. An example never takes over a PLC.
tag_root Tags already live under the example’s tag root.
project A project with the example’s name exists. An import never changes another project.

Two more rule names appear on skipped rows only, never on refusals: edition (a part the server’s edition does not include) and not_allowed.

The zip holds exactly these entries, each listed with its SHA-256 in example.json:

Entry
example.json The example: id, version, name, industry, tag root, the product versions it needs, the edition it runs fully on, its PLC (id, uns_prefix, writable_lists, studio_port) and the files list.
README.md, LICENSE.txt Required.
scada/manifest.json Required. The project name and the start screen.
scada/alarms.json, scada/eaxtags.json, scada/scripts.json, scada/recipes.json, scada/historian.json, scada/production.json, scada/genealogy.json, scada/pages.json, scada/styles.json The eaxScada parts.
scada/screens/*.json, scada/components/*.json, scada/dashboards/*.json, scada/reports/designs/*.json, scada/reports/datasets.json, scada/reports/schedules.json Screens, components, dashboards and reports.
scada/i18n/ Translations, one file per language.
plc/example-plc.json Required. The eaxPLC part, with plc/tasks.json, plc/trendsets.json, plc/fieldbus.json, plc/watchdog.json, plc/pous/* and plc/tagdoc/*.json.
shots/*.webp Screenshots.
Route Who What it does
POST /api/dev/examples/preview Lead_Engineer, Administrator Body application/zip. The plan: every item with its status and reason, the needs, the two PLC commands. Writes nothing.
POST /api/dev/examples/apply?sha256=&reason= Lead_Engineer, Administrator, signed-in session Body application/zip, the previewed file (another SHA-256: 409). &accept=1 from an Administrator also accepts the example PLC. Answers the items, the new project id, the start screen, the needs and the PLC commands.
GET /api/dev/examples Lead_Engineer, Administrator The imported examples, with their PLC’s state and whether its values are accepted.
POST /api/dev/examples/accept Administrator, signed-in session {plc_id, reason}: accepts an imported example’s PLC (404 for any other PLC).
POST /api/dev/examples/pending Lead_Engineer, Administrator, signed-in session {plc_id}: adds the parts waiting for the example PLC, once its values arrive.

A change (apply, accept, pending) is refused with an API token and for the AI co-pilot (403), and every route is refused through an eaxCloud remote session. A reason is required for apply and accept (400 reason_required).

Record When
EXAMPLE_IMPORT Before anything is written: the example’s id and version, the SHA-256 and the reason. Not written: nothing is imported (503 AUDIT_NOT_WRITTEN).
EXAMPLE_IMPORT_DONE, EXAMPLE_IMPORT_FAILED After the import, with every item. Each item also has its own record, as when it is saved by hand.
EXAMPLE_PLC_IDENTITY_CREATED The example PLC’s broker identity, with the path of its key file. The key itself is never in an answer or a log.
PLC_SIM_ACCEPT_EXAMPLE An Administrator accepted the example PLC, with the reason; written before config.yaml is changed.
EXAMPLE_IMPORT_PENDING The parts that waited for the PLC were added.

The Free edition has no audit trail: there, the import writes no record.