Xentara v2.0.4
User Manual
JSON Format for Execution Pipelines

The Pipeline Object

A JSON object describing an execution pipeline has the following syntax:

{
"@Pipeline": {
"name": "Pipeline 1",
"UUID": "2c9bade7-c22a-41e2-a9d6-266ad8e511b7",
"ACL": { ... },
"triggers": [
"Loading Dock B.Main Door.Closed.changed",
"Loading Dock B.Side Door.Closed.changed",
"Loading Dock B.Security Timer.expired"
],
"checkpoints": [
{},
{}
],
"segments": [
...
]
}
}

An execution pipeline must always be a child of an execution track.

Object Members
nameA string value containing the name of the pipeline. The name is used to construct the pipeline’s primary key.
UUIDA string value containing the unique UUID of the pipeline.
ACLAn optional JSON object containing the element ACL of the pipeline. The format of the object is described under JSON Format for ACLs.
triggers

An optional JSON array containing the triggers that should trigger the execution of the pipeline. The array must contain string values with the primary keys of the events. Each value must conatin one of the following:

If you do not specify any triggers, the pipeline will never be triggered in regular execution, but will perform special maintenance tasks when the operational stage changes. Such pipelines are used by some skills to perform actions for initialization and cleanup. Please refer to the documentation of the individual skills for information on when such a pipeline should be used.

checkpointsA JSON array containing the check points of the pipeline. Since the check points do not have any properties of their own, each check point is represented by an empty JSON object ({}). The array can contain as many check points as desired, but there must be at least two.
segmentsA JSON array containing the segments of the pipeline.

Pipeline Segment Objects

A JSON object describing a pipeline segment of an execution pipeline has the following syntax:

"segments": [
{
"start": 0,
"end": 1,
"tasks": [
{
"function": "Loading Dock B.Front Lights.on"
},
{
"function": "Loading Dock B.Front Camera.record"
}
]
},
{
"start": 0,
"end": 1,
"tasks": [
{
"function": "Loading Dock B.Rear Lights.on"
},
{
"function": "Loading Dock B.Rear Camera.record"
}
]
}
]

The array can contain as many segments as desired, but there must be at least one.

Object Members
startAn integer value containing the index of the starting check point of the segment. The index is 0-based, so that the first check point has index 0, and the last checkpoint has index (number of checkpoints) - 1. If the pipeline has four check points, for example, then indices must be between 0 and 3.
endAn integer value containing the index of the ending check point of the segment. The index must be higher than the start index.
tasksA JSON array containing the tasks to be executed. The array can contain as many tasks as desired, but there must be at least one.
functionA string value describing the actual Xentara element task to be executed for each task entry. The string value must contain the primary key of the task.
Note
Pipeline segments are not normal Xentara elements and hence do not use the double layer of JSON objects used for normal elements.

Full Example

Here is an example of a complete execution pipeline:

{
"@Pipeline": {
"name": "Pipeline 1",
"UUID": "2c9bade7-c22a-41e2-a9d6-266ad8e511b7",
"triggers": [
"Loading Dock B.Main Door.Closed.changed",
"Loading Dock B.Side Door.Closed.changed",
"Loading Dock B.Security Timer.expired"
],
"checkpoints": [
{},
{}
],
"segments": [
{
"start": 0,
"end": 1,
"tasks": [
{
"function": "Loading Dock B.Front Lights.on"
},
{
"function": "Loading Dock B.Front Camera.record"
}
]
},
{
"start": 0,
"end": 1,
"tasks": [
{
"function": "Loading Dock B.Rear Lights.on"
},
{
"function": "Loading Dock B.Rear Camera.record"
}
]
}
]
}
}