{ "$id": "workflowDocument", "title": "workflow document", "description": "A workflow document", "type": "object", "properties": { "_id": { "$ref": "wfEngineCommon#/definitions/mongoObjectId" }, "name": { "$ref": "#/definitions/workflowName" }, "type": { "type": "string", "default": "automation" }, "description": { "oneOf": [ { "type": "null" }, { "type": "string" } ] }, "preAutomationTime": { "$id": "#/properties/preAutomationTime", "type": "integer", "title": "Pre automation time of automation", "description": "Time (milliseconds) automation would have taken someone to complete without using IAP.", "examples": [ 5000, 250000 ] }, "tasks": { "type": "object", "properties": { "workflow_start": { "type": "object", "properties": { "name": { "type": "string", "pattern": "^workflow_start$" }, "summary": { "type": "string", "pattern": "^workflow_start$" }, "groups": { "$ref": "#/definitions/groups" }, "x": { "$ref": "wfEngineCommon#/definitions/x" }, "y": { "$ref": "wfEngineCommon#/definitions/y" } } }, "workflow_end": { "type": "object", "properties": { "name": { "type": "string", "pattern": "^workflow_end$" }, "summary": { "type": "string", "pattern": "^workflow_end$" }, "groups": { "$ref": "#/definitions/groups" }, "x": { "$ref": "wfEngineCommon#/definitions/x" }, "y": { "$ref": "wfEngineCommon#/definitions/y" } } }, "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" } }, "required": [ "workflow_start", "workflow_end" ], "additionalProperties": false }, "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" }, "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 automations with canvasVersion = 1, this field will refer to the version of Workflow Builder. For automations with canvasVersion = 2, this field will refer to the version of Automation Studio." }, "tags": { "type": "array", "items": { "type": "string" } }, "canvasVersion": { "type": "number", "enum": [ 1, 2 ] }, "encodingVersion": { "type": "integer", "enum": [ 1 ] } }, "additionalProperties": false, "required": [ "name", "type", "tasks", "transitions", "groups" ], "definitions": { "workflowName": { "type": "string", "examples": [ "My Workflow" ] }, "ObjectId": { "type": "string", "pattern": "^[0-9a-f]{24}$" }, "groups": { "type": "array", "items": { "$ref": "#/definitions/ObjectId" } }, "user": { "$ref": "#/definitions/ObjectId" }, "taskBase": { "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": "" } }, "required": [ "incoming", "outgoing", "error" ] }, "deprecated": { "type": "boolean" }, "scheduled": { "type": "boolean" }, "groups": { "$ref": "#/definitions/groups" }, "x": { "$ref": "wfEngineCommon#/definitions/x" }, "y": { "$ref": "wfEngineCommon#/definitions/y" } }, "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" }, "sla": { "$id": "#/properties/sla", "type": "integer", "title": "Task SLA", "description": "Service level agreement for time (milliseconds) that should be spent working manual task.", "examples": [ "3600000" ] } }, "required": [ "type", "view", "groups" ] } ] }, "automaticTask": { "allOf": [ { "$ref": "#/definitions/taskBase" }, { "type": "object", "properties": { "type": { "type": "string", "const": "automatic" }, "actor": { "type": "string", "pattern": "^Pronghorn|\\$var\\.job\\.[a-zA-Z_0-9]{1,}|\\$var\\.[0-9a-f]{1,4}\\.[a-zA-Z_0-9]{1,}$" }, "retrySettings": { "$ref": "wfEngineCommon#/definitions/retrySettings" } }, "required": [ "type", "actor" ] } ] }, "operationTask": { "allOf": [ { "$ref": "#/definitions/taskBase" }, { "type": "object", "properties": { "type": { "type": "string", "const": "operation" }, "retrySettings": { "$ref": "wfEngineCommon#/definitions/retrySettings" } }, "required": [ "type" ] } ] }, "anyTask": { "oneOf": [ { "$ref": "#/definitions/manualTask" }, { "$ref": "#/definitions/automaticTask" }, { "$ref": "#/definitions/operationTask" } ] } } }