app-workflow_engine Schemas

On this page:

jobsDocument

{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "jobsDocument", "type": "object", "title": "Jobs Document Schema", "required": [ "_id", "name", "tasks", "transitions", "font_size", "created", "created_by", "last_updated", "last_updated_by", "groups", "type", "variables", "watchers", "metrics", "status" ], "definitions": { "jobDefaultTasks": { "$id": "#/properties/tasks", "type": "object", "title": "The Job tasks", "description": "The tasks associated with this Job", "required": [ "workflow_start", "workflow_end" ], "properties": { "workflow_start": { "$ref": "#/definitions/workflowStartTask" }, "workflow_end": { "$ref": "#/definitions/workflowEndTask" }, "error_handler": { "$ref": "#/definitions/errorHandlerTask" } }, "patternProperties": { "[0-9a-f]{1,4}": { "$ref": "jobTaskDocument" } } }, "status": { "$id": "#/properties/status", "type": "string", "title": "The Status", "description": "The status of this job", "enum": [ "error", "complete", "running", "canceled" ], "examples": [ "error", "complete", "running", "canceled" ] }, "jobsAlphaOmegaTask": { "type": "object", "title": "base for workflow_start and workflow_end", "properties": { "groups": { "$id": "#/properties/groups", "type": "array", "title": "User groups" }, "x": { "$ref": "wfEngineCommon#/definitions/x" }, "y": { "$ref": "wfEngineCommon#/definitions/y" }, "status": { "$id": "#/properties/status", "type": "string", "title": "The Status", "examples": [ "complete" ] }, "metrics": { "$ref": "metricsDefault" } } }, "workflowStartTask": { "allOf": [ { "type": "object", "properties": { "name": { "$id": "#/properties/name", "type": "string", "enum": [ "workflow_start" ] } } }, { "$ref": "#/definitions/jobsAlphaOmegaTask" } ] }, "workflowEndTask": { "allOf": [ { "type": "object", "properties": { "name": { "$id": "#/properties/name", "type": "string", "enum": [ "workflow_end" ] } } }, { "$ref": "#/definitions/jobsAlphaOmegaTask" } ] }, "errorHandlerTask": { "allOf": [ { "$ref": "workflowDocument#/definitions/operationTask" }, { "properties": { "name": { "const": "childJob" } } } ] }, "jobStatuses": { "type": "string", "enum": [ "error", "complete", "running", "canceled" ], "examples": [ "error", "complete", "running", "canceled" ] }, "jobTaskFinishState": { "type": "string", "description": "Valid finish states for a job's tasks", "enum": [ "success", "failure", "error", "loop" ], "examples": [ "success", "failure", "error", "loop" ] }, "jobError": { "type": "object", "title": "Job Error ", "description": "A Job Error", "required": [ "task", "message", "timestamp" ], "properties": { "task": { "type": "string", "title": "The task type", "description": "The task type, usually 'job'", "examples": [ "job" ] }, "message": { "type": "string", "title": "The Error Message", "description": "Error message", "examples": [ "No available transitions found from completed task(s)" ] }, "timestamp": { "type": "integer", "title": "The Timestamp ", "description": "the time, in milliseconds since the Unix epoch, that the error occurred", "examples": [ 1555471643117 ] } } }, "variables": { "type": "object", "title": "The Variables for this job", "description": "Any variables that are set for this job", "additionalProperties": { "type": [ "boolean", "object", "string", "number", "integer" ], "examples": [ "string value", 1 ] } } }, "properties": { "_id": { "$ref": "wfEngineCommon#/definitions/mongoObjectId" }, "name": { "$id": "#/properties/name", "type": "string", "title": "The name of the job", "description": "The name of the job", "examples": [ "8917Test2" ] }, "tasks": { "$ref": "#/definitions/jobDefaultTasks" }, "transitions": { "$id": "#/properties/transitions", "type": "object", "title": "The Transitions", "description": "Describes the transitions between the different tasks", "required": [ "workflow_start", "workflow_end" ], "properties": { "workflow_start": { "$id": "#/properties/transitions/properties/workflow_start", "type": "object", "title": "workflow_start transition", "required": [], "properties": { "6a90": { "$id": "#/properties/transitions/properties/workflow_start/properties/6a90", "type": "object", "title": "Documentation task example", "required": [ "type", "state" ], "properties": { "type": { "$id": "#/properties/transitions/properties/workflow_start/properties/6a90/properties/type", "type": "string", "title": "The Type ", "examples": [ "standard" ] }, "state": { "$id": "#/properties/transitions/properties/workflow_start/properties/6a90/properties/state", "type": "string", "title": "The State ", "examples": [ "success" ] } } } } }, "workflow_end": { "$id": "#/properties/transitions/properties/workflow_end", "type": "object", "title": "The workflow_end transition" }, "error_handler": { "$id": "#/properties/transitions/properties/error_handler", "type": "object", "title": "The error_handler transition" }, "6a90": { "$id": "#/properties/transitions/properties/6a90", "type": "object", "title": "Documentation example task", "required": [ "workflow_end" ], "properties": { "workflow_end": { "$id": "#/properties/transitions/properties/6a90/properties/workflow_end", "type": "object", "title": "The workflow_end", "required": [ "type", "state" ], "properties": { "type": { "$id": "#/properties/transitions/properties/6a90/properties/workflow_end/properties/type", "type": "string", "title": "The Type ", "examples": [ "standard" ] }, "state": { "$id": "#/properties/transitions/properties/6a90/properties/workflow_end/properties/state", "type": "string", "title": "The State ", "examples": [ "success" ] } } } } } } }, "font_size": { "$id": "#/properties/font_size", "type": "integer", "title": "The font size ", "examples": [ 12 ] }, "created": { "$id": "#/properties/created", "type": "string", "title": "Creation datetime ", "examples": [ "2018-07-26T19:37:05.000Z" ] }, "created_by": { "$id": "#/properties/created_by", "type": "string", "title": "The Creator user name", "examples": [ "admin@pronghorn" ] }, "last_updated": { "$id": "#/properties/last_updated", "type": "string", "title": "The last updated DateTime", "examples": [ "2018-08-02T15:56:12.912Z" ] }, "last_updated_by": { "$id": "#/properties/last_updated_by", "type": "string", "title": "User that last updated this doc", "examples": [ "5b3496d74da02e9dfa0b2e91" ] }, "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." }, "canvasVersion": { "type": "number", "enum": [ 1, 2 ] }, "groups": { "$id": "#/properties/groups", "type": "array", "title": "The Groups" }, "type": { "$id": "#/properties/type", "type": "string", "title": "The Job type ", "description": "The Job type", "examples": [ "automation" ] }, "variables": { "$ref": "#/definitions/variables" }, "decorators": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": [ "encryption" ] }, "pointer": { "type": "string", "examples": [ "/variables/input" ] } } } }, "ancestors": { "type": "array", "items": { "$ref": "wfEngineCommon#/definitions/mongoObjectId" } }, "watchers": { "$id": "#/properties/watchers", "type": "array", "title": "The Watchers", "description": "The ids of the users watching this job", "items": { "$id": "#/properties/watchers/items", "$ref": "wfEngineCommon#/definitions/mongoObjectId" } }, "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 ] }, "metrics": { "$ref": "metricsDefault" }, "status": { "$ref": "#/definitions/status" }, "error": { "type": "array", "title": "The errors", "description": "Array of errors that occurred during the running of this job", "items": { "$ref": "#/definitions/jobError" } } } }