Workflow Packages

tasks.json

Workflow packages contain an interface.json file of the following schema:

{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "definitions": {
        "task_input_source": {
            "type": "object",
            "properties": {
                "mode": {
                    "description": "The mode of input parameter source.",
                    "$ref": "xfp_tasktype_interface.json#/definitions/source_mode_name"
                }
            },
            "oneOf": [
                {
                    "description": "Always set this input parameter to `null`.",
                    "properties": {
                        "mode": {
                            "const": "none"
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "mode"
                    ]
                },
                {
                    "description": "Set this input parameter to a fixed value. Only supported for types `Int`, `Float`, `String` and `Bool`.",
                    "properties": {
                        "mode": {
                            "const": "fixed"
                        },
                        "fixed_value": {
                            "type": [
                                "integer",
                                "number",
                                "string",
                                "boolean"
                            ]
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "mode",
                        "fixed_value"
                    ]
                },
                {
                    "description": "Connect this input parameter to the output parameter of an earlier task.",
                    "properties": {
                        "mode": {
                            "const": "output"
                        },
                        "task": {
                            "description": "The 0-based index of the earlier task in the `tasks` array.",
                            "type": "integer"
                        },
                        "key": {
                            "description": "The name of the output parameter.",
                            "type": "string"
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "mode",
                        "task",
                        "key"
                    ]
                },
                {
                    "description": "This input parameter is defined by the template. If the template is not defined yet it will be defined by the first job being executed.",
                    "properties": {
                        "mode": {
                            "const": "define_on_first"
                        },
                        "template": {
                            "description": "The template for this parameter. It is `null` initially and replaced by the first job.",
                            "type": "null"
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "mode",
                        "template"
                    ]
                },
                {
                    "description": "This input parameter is defined by the interactive UI.",
                    "properties": {
                        "mode": {
                            "const": "ui"
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "mode"
                    ]
                }
            ]
        },
        "workflow_package_tasks": {
            "description": "tasks.json of a Workflow package",
            "type": "object",
            "properties": {
                "tasks": {
                    "type": "array",
                    "items": {
                        "type": "object",
                        "properties": {
                            "type": {
                                "description": "The Task Type Package name.",
                                "$ref": "xfp_metadata.json#/definitions/package_name"
                            },
                            "version": {
                                "description": "The Task Type Package version.",
                                "$ref": "xfp_metadata.json#/definitions/package_version"
                            },
                            "inputs": {
                                "type": "array",
                                "items": {
                                    "type": "object",
                                    "properties": {
                                        "key": {
                                            "description": "The name of the input parameter.",
                                            "type": "string"
                                        },
                                        "source": {
                                            "$ref": "#/definitions/task_input_source"
                                        }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                        "key",
                                        "source"
                                    ]
                                }
                            },
                            "metadata": {
                                "description": "Additional metadata for the task.",
                                "$ref": "xfp_metadata.json#/definitions/workflow_package_task_metadata"
                            }
                        },
                        "additionalProperties": false,
                        "required": [
                            "type",
                            "version",
                            "inputs"
                        ]
                    }
                }
            },
            "additionalProperties": false,
            "required": [
                "tasks"
            ]
        }
    }
}