{ "$id": "automationImport", "title": "workflow import payload", "description": "A workflow import payload, that has expanded users and groups for transportation between environments", "type": "object", "properties": { "_id": { "type": "string", "pattern": "^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$" }, "name": { "$ref": "#/definitions/workflowName" }, "type": { "type": "string", "default": "automation" }, "description": { "type": [ "null", "string" ] }, "preAutomationTime": { "type": "number" }, "sla": { "type": "number" }, "tasks": { "type": "object", "properties": { "workflow_start": { "type": "object", "properties": { "name": { "type": "string", "pattern": "^workflow_start$" }, "summary": { "type": "string", "pattern": "^workflow_start$" }, "groups": { "type": "array" }, "x": { "type": "number" }, "y": { "type": "number" } } }, "workflow_end": { "type": "object", "properties": { "name": { "type": "string", "pattern": "^workflow_end$" }, "summary": { "type": "string", "pattern": "^workflow_end$" }, "groups": { "type": "array" }, "x": { "type": "number" }, "y": { "type": "number" } } }, "error_handler": { "allOf": [ { "$ref": "#/definitions/operationTask" }, { "properties": { "name": { "const": "childJob" } } } ] } }, "patternProperties": { "^[0-9a-f]{1,4}$": { "$ref": "#/definitions/anyTask" } }, "required": [ "workflow_start", "workflow_end" ], "additionalProperties": false }, "transitions": { "type": "object", "properties": { "workflow_start": { "type": "object" }, "workflow_end": { "type": "object" }, "error_handler": { "type": "object" } }, "patternProperties": { "^[0-9a-f]{1,4}$": { "type": "object" } }, "additionalProperties": false }, "errorHandler": { "type": [ "null", "object" ], "properties": { "type": { "type": "string" }, "name": { "type": "string" } } }, "font_size": { "type": "integer", "default": 12, "minimum": 6, "maximum": 24 }, "groups": { "$ref": "#/definitions/groups" }, "created": { "type": "string", "format": "date-time" }, "created_by": { "$ref": "#/definitions/user" }, "createdVersion": { "type": "string" }, "last_updated": { "type": "string", "format": "date-time" }, "last_updated_by": { "$ref": "#/definitions/user" }, "lastUpdatedVersion": { "type": "string", "description": "This value represents the semantic version of the application that last modified it. For workflows with canvasVersion = 1, this field will refer to the version of Workflow Builder. For workflows with canvasVersion = 2, this field will refer to the version of Automation Studio." }, "tags": { "type": "array", "items": { "$ref": "#/definitions/tag" } }, "canvasVersion": { "type": "number", "enum": [ 1, 2 ] }, "inputSchema": { "type": "object" }, "outputSchema": { "type": "object" }, "outputData": { "type": "object" }, "decorators": { "$ref": "#/definitions/decorators" }, "migrationVersion": { "type": "integer" } }, "additionalProperties": false, "required": [ "name", "type", "tasks", "transitions", "groups" ], "definitions": { "tag": { "type": "object", "properties": { "_id": { "type": "string", "pattern": "^[0-9a-fA-F]{24}$" }, "name": { "type": "string" }, "description": { "type": "string" } }, "required": [ "_id", "name", "description" ] }, "workflowName": { "type": "string", "examples": [ "My Workflow" ] }, "groups": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "provenance": { "type": "string" } }, "required": [ "name", "provenance" ] } }, "user": { "oneOf": [ { "type": "object", "properties": { "username": { "type": "string" }, "provenance": { "type": "string" } }, "required": [ "username", "provenance" ] }, { "type": "null" } ] }, "taskPosition": { "x": { "type": "number", "description": "Stores the x coordinate used by canvasType = 1 workflows" }, "y": { "type": "number", "description": "Stores the y coordinate used by canvasType = 1 workflows" }, "gridCoordinate": { "type": "object", "description": "Stores the coordinates used by canvasType = 2 workflows", "properties": { "x": { "type": [ "number", "null" ] }, "y": { "type": [ "number", "null" ] } } } }, "decorators": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "encryption" ] }, "pointer": { "type": "string", "format": "json-pointer" } } } }, "pendingTask": { "allOf": [ { "$ref": "#/definitions/taskPosition" }, { "type": "object", "properties": { "name": { "const": "pending" }, "summary": { "type": "string" }, "description": { "type": "string" }, "groups": { "type": "array" } } } ] }, "taskBase": { "allOf": [ { "$ref": "#/definitions/taskPosition" }, { "type": "object", "properties": { "name": { "type": "string" }, "summary": { "type": "string" }, "description": { "type": "string" }, "app": { "type": "string" }, "variables": { "type": "object", "properties": { "incoming": { "type": "object" }, "outgoing": { "type": "object" }, "error": { "type": "string", "pattern": "" }, "decorators": { "$ref": "#/definitions/decorators" } }, "required": [ "incoming", "outgoing" ] }, "deprecated": { "type": "boolean" }, "scheduled": { "type": "boolean" }, "groups": { "$ref": "#/definitions/groups" } }, "required": [ "name", "summary", "description", "app", "variables", "groups", "x", "y" ] } ] }, "manualTask": { "allOf": [ { "$ref": "#/definitions/taskBase" }, { "type": "object", "properties": { "type": { "type": "string", "const": "manual" }, "view": { "type": "string" }, "groups": { "$ref": "#/definitions/groups" } }, "required": [ "type", "view", "groups" ] } ] }, "automaticTask": { "allOf": [ { "$ref": "#/definitions/taskBase" }, { "type": "object", "properties": { "type": { "type": "string", "const": "automatic" }, "actor": { "type": "string" } }, "required": [ "type", "actor" ] } ] }, "operationTask": { "allOf": [ { "$ref": "#/definitions/taskBase" }, { "type": "object", "properties": { "type": { "type": "string", "const": "operation" } }, "required": [ "type" ] } ] }, "anyTask": { "oneOf": [ { "$ref": "#/definitions/pendingTask" }, { "$ref": "#/definitions/manualTask" }, { "$ref": "#/definitions/automaticTask" }, { "$ref": "#/definitions/operationTask" } ] } } }