Skip to main content

1E SDK

Instruction Definition format

An Instruction Definition XML file comprises of an XML document header, an <InstructionDefinition> parent XML element, and various sub-elements describing specific aspects of the definition.

The sub-elements are outlined below, some of which are described in more detail in later sections.

At a high-level, the XML format is as follows:

Instruction Definition XML structure

+-- (XML document header)
+-- InstructionDefinition
    +-- Comments
    +-- Payload
    +-- ParameterJson
    +-- SchemaJson
    +-- AggregationJson
    +-- Workflow
    +-- ResponseTemplateConfiguration
    +-- Resources
    |   +-- Resource
    |       +-- Content
    +-- TaskGroups
    |   +-- TaskGroup
    +-- Signature

Note that child elements of the <InstructionDefinition> element can appear in any order.

The individual elements have the following purposes (elements highlighted in blue are links to more detail further down in the page):

Element

Required

Purpose

Database column

InstructionDefinition

Yes

The parent element in the XML document, including basic properties of the Instruction Definition such as its name, description, type, version.

All other XML elements within the document are child elements of this parent element.

N/A

InstructionDefinition\Payload

Yes

Contains the Instruction Payload, written in the Tachyon Agent Language, that should be sent to the Tachyon Agent(s), including placeholders for any parameter values which are substituted when the Instruction is issued.

The content of this element is typically marked up as CDATA within the XML (to simplify escaping of reserved XML characters).

InstructionDefinition.Payload

InstructionDefinition\Comments

No

Contains optional comments about the Instruction Definition provided by the author.

InstructionDefinition.Comments

InstructionDefinition\SchemaJson

Yes

A JSON representation of the data structure which will be created to store Responses from Tachyon Agents when they reply to this Instruction.

The content of this element is typically marked up as CDATA within the XML.

InstructionDefinition.SchemaJson

InstructionDefinition\AggregationJson

No

A JSON representation of the data structure which will be created to store summarized ("aggregated") Responses from Tachyon Agents, and the grouping and aggregate operations which define how the data should be summarized.

The content of this element is typically marked up as CDATA within the XML.

InstructionDefinition.AggregationJson

InstructionDefinition\ParameterJson

No

A JSON representation of the parameters for this Instruction Definition. Parameters can be supplied by the user at the point that the Instruction is issued.

The content of this element is typically marked up as CDATA within the XML.

InstructionDefinition.ParameterJson

InstructionDefinition\Workflow

No

A JSON representation of the Tachyon Workflow state machine, and other metadata, to be used if the Instruction Definition should not follow the corresponding default approval workflow.

InstructionDefinition.Workflow

InstructionDefinition\ResponseTemplateConfiguration

No

A JSON representation of the logic that Tachyon Consumers may use to provide customized rendering of Responses for the Instruction, such as charts and graphs.

This topic is described in more depth here: Custom Response Visualizations

InstructionDefinition.ResponseTemplateConfiguration and InstructionDefinition.ResponseTemplateId

InstructionDefinition\Resources

No

A container element for one or more <Resource> child elements, which define the content for embedded resources for this Instruction Definition.

N/A

InstructionDefinition\Resources\Resource

Yes

Defines the name of a resource, and contains one or more <Content> child elements.

InstructionDefinitionResource table

InstructionDefinition\Resources\Resource\Content

Yes

Defines the properties and metadata about the (platform-specific) content for an individual resource, and the content itself (represented as base-64 encoded binary).

The content of this element is typically marked up as CDATA within the XML.

InstructionDefinitionResource.Content

InstructionDefinition\TaskGroups

No

A container element for one or more <TaskGroup> child elements.

N/A

InstructionDefinition\TaskGroups\TaskGroup

Yes

Defines the path of a Task Group under which this Instruction Definition should be grouped.

TaskGroups and Task

InstructionDefinition\Signature

No

Contains digital signature information for the XML file.

N/A