Model Import

Model Import can be used to create a model from a custom JSON payload, an existing Input, or an OPC UA Node Set. It can be performed by pressing Import Model from the Model list page. Existing Models are replaced when an existing Model with the same name as the imported Model(s) already exists.

List Page

Input Reference

To import from an existing Input Reference, set the Import Type to Input and Input Type to Input Reference. Use the Reference Panel to select the desired input, optionally specify other model configuration, and press Next. During import, the specified input reference is read and a new model is created based on the data returned by the input. The input must return an object in order for a model to be created. The Path may be used to a specific element of the data returned by the input.

Input Reference

JSON Payload

To import from a custom JSON payload, set the Import Type to Input and Input Type to JSON Payload. Paste the JSON payload, optionally specify other model configuration, and press Next. A new model will be created using the specified JSON payload. Only objects are supported.

JSON Payload

OPC UA Node Set

To import using OPC UA Node Set XML, set the Import Type to OPC UA. Use Choose Files to select the Node Set XML files that define the OPC UA Information Models (and dependencies), optionally specify other model configuration, and press Next.

During import from an OPC UA Node Set, a Model will be created for all Object and Variable types defined in the Node Set XML files.

OPC UA

JSON Schema

To import from a JSON Schema, set Import Type to JSON Schema. There are two formats which can be used to import schemas which can be chosen between via the Input Type option.

  • File: Press the Choose Files button to select the JSON Schema files that defines the models and dependencies you would like to import.

  • JSON Payload: Copy and paste a JSON Schema into the provided text box.

After a mode has been selected and the JSON Schema(s) have been input, optionally specify other model configuration, then press Next. Both the top level object and all dependency objects listed under definitions tags will be imported and a Model will be created for all applicable objects and modeled def dependencies in the Schema(s) that have been imported. Additionally, Schema’s which are in an invalid format or which are missing dependencies may generate errors at this point.

JSON Schema

Review

After configuration of any of these imports a review stage will follow where you can view:

  • A summary of all the models to be imported
  • Any models that may fail to import due to errors
  • and select which models from the set of generated models you would like to continue to import.

Review

Some subset of the imported models may fail to fully import. This will usually occur due to missing dependencies. Models with critical issues will be marked with a red error symbol and will not be importable. Models with incomplete information will be market with a yellow warning symbol, but will remain importable.

At this point if there is at least one importable model the Import button can be pressed to import all selected models (by default all proposed models that aren’t in error). Additionally, it is possible to navigate back at any time via the Previous button to change the configuration of the import, add additional information, or resolve errors.