Orchestrators
- optional
A Template Package can include one or more Orchestrator configurations to be deployed to Twinit by configuring the manifests orchestrators array.
Each entry in the orchestrators array must be a valid orchestrator definition.
// manifest.json
"orchestrators": [
{
"_name": "",
"_description": "",
"_userType": "",
"_schemaversion": "2.0",
"_params": {
"tasks": [ ]
}
}
]
Options
- ifExists - each orchestrator configuration can have an optional ifExists option set. Valid values for IfExists are
defaultandrecreate.- default: the same as not including ifExists. The
defaultbehavior is to skip creating a orchestrator if an orchestrator with the same name already exists. - recreate: will first delete any orchestrators with the same name before creating a nw orchestrator.
- default: the same as not including ifExists. The
Complete Example:
// manifest.json
{
"Template Name": "Water Treatment Operations Digital Twin",
"Template Version": "1.0.5",
"orchestrators": [
{
"ifExists": "recreate",
"_name": "Import BIMPK Models",
"_description": "Orchestrator to import model from BIMPK file",
"_userType": "bimpk_importer",
"_schemaversion": "2.0",
"_params": {
"tasks": [
{
"_orchcomp": "default_script_target",
"_name": "Import Model from bimpk File",
"_actualparams": {
"userType": "importHelper",
"_scriptName": "importModel"
},
"_sequenceno": 1
},
{
"_orchcomp": "default_script_target",
"_name": "Post Process Imported Model",
"_actualparams": {
"userType": "importHelper",
"_scriptName": "createModelDataCache"
},
"_sequenceno": 2
},
{
"_orchcomp": "default_script_target",
"_name": "Migrate File Item Relations",
"_actualparams": {
"userType": "importHelper",
"_scriptName": "migrateFileItemRelations"
},
"_sequenceno": 3
}
]
}
},
{
"_name": "Orchestrator 2",
"_description": "Orchestrator 2",
"_userType": "orch_2",
"_schemaversion": "2.0",
"_params": {
"tasks": [
{
"_orchcomp": "default_script_target",
"_name": "Another script",
"_actualparams": {
"userType": "anotherScript",
"_scriptName": "doSomething"
},
"_sequenceno": 1
}
]
}
}
]
}
// Package Zip File
Water Treatment Template.zip /
|
|-- manifest.json
Note: Orchestrators rely on scripts having been deployed to the Twinit project or workspace. If deploying an orchestrator, you will also want to deploy scripts.
Deploying Orchestrators
When the Template Package is deployed, if the defined orchestrator does not exist it will be created. If an orchestrator with the same _name already exists, the orchestrator will be skipped unless ifExists is set o recreate.