Define Document Schemas, Mappings and Simulator Templates

As part of configuring the Intelligent Track and Trace, founder defines the structure of the documents which gets ingested into the network.

As a founder, you can either use pre-seeded document types in the Intelligent Track and Trace, or can define your own customized document types. Each document type consists of five essential parts, which are document schema, metadata template, metadata schema, simulator template, and presentation template. You can provide multiple definitions or variants for a single document type where each definition or variant will have the five essential parts. The five essential parts are described as follows:

  • Document Schema: Defines the structure of the document in the standard JSON format. Intelligent Track and Trace is currently complaint with JSON Schema Draft 5. Intelligent Track and Trace provides JSON schema for the preseeded document types. For more information, see Define Document Schema JSON. However, as a founder, you can upload your own raw JSON schema if the preseeded document types does not suit the needs of your supply chain network. Intelligent Track and Trace validates the syntax of the uploaded JSON schema and throws exception in case of any error.
  • Metadata Template: Defines the type mapping which enables the Intelligent Track and Trace application to process the incoming documents and extract key pieces of information. Metadata template is essentially a set of key value pairs, which maps the JSON schema to the application schema. This mapping is important for Intelligent Track and Trace to understand the structure of the document described in the JSON schema, and ingest information which is then written to the ledger. This extracted data is used for tracking, tracing, and calculating analytics and insights. For the preseeded document types, out-of-the-box mapping is provided. For customized document types, founder decides which key pieces of information are important, and provides the mapping. Only mapped information extracted from the document is written to the ledger, and the document is stored in Oracle Storage Cloud in encrypted form. The document in Storage Cloud is linked to the corresponding entry in the ledger by adding the location and the hash of the document to the ledger entry. For more details, see Define Metadata Template.
  • Metadata Schema:

    Defines user-definable attributes that extends the system-defined normalized data structure. You may have a requirement to track attributes in addition to the ones already mapped. These attributes can be added as a list of key value pairs under the Metedata Template section. For Intelligent Track and Trace to understand the document data, the user needs to define the data type of each of the field specified. For example, if the user has defined a field named "buyername" in the Metadata Template, then in Metadata Schema tab you have to define the data type of "buyername", it can be a String, an array of Strings, measure type etc. For more details, see Define Metadata Schema.

  • Simulator Template: are used for generating synthetic transactions during simulation. Simulations is one of the key functionality which lets you test the multiple what-if scenarios in your business network. For testing these scenarios you need data which is part of the flow which you want to test. Simulator template defines how you can simulate a document (such as purchase order), and the attributes in the document which will be used for the simulation. In the template you provide either constant values or value generating expressions such as random number, random strings and references to other documents in the flow. This template is then used by the simulator to generate transactions for testing various business scenarios. For more details, see Define Simulator Template.
  • Presentation Template: The incoming source document, ingested by Intelligent Track and Trace, is received in raw JSON format as defined in the document schema. This source document may be difficult to interpret by the end user due to the complex JSON schema structure. Intelligent Track and Trace enables you to define a HTML presentation template, which is used to display the incoming source document in a human readable rich text format. The pre-seeded document types already have pre-defined presentation templates. For more details, see Define Presentation Template. For any new documents types defined, you as a founder should also define a presentation template.

After the document structure is defined, document ingestion process begins and the document type schema is used for incoming document processing.

For a detailed information on how to define a document type JSON, metadata template, metadata schema and simulator template, see Define Document Schema and Templates.