{
    "title": "AddOrder",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.sign.model.instruction.AddOrder",
    "type": "object",
    "required": [
        "orderId",
        "workflowPath"
    ],
    "extends": {
        "javaType": "com.sos.sign.model.instruction.Instruction",
        "type": "object",
        "required": [
            "TYPE"
        ],
        "properties": {
            "TYPE": {
                "javaType": "com.sos.inventory.model.instruction.InstructionType",
                "type": "string",
                "enum": [
                    "Execute.Named",
                    "If",
                    "Try",
                    "Fork",
                    "ForkList",
                    "Finish",
                    "Fail",
                    "Retry",
                    "Lock",
                    "Prompt",
                    "PostNotice",
                    "PostNotices",
                    "ExpectNotice",
                    "ExpectNotices",
                    "ConsumeNotices",
                    "ImplicitEnd",
                    "AddOrder",
                    "Cycle",
                    "StickySubagent",
                    "Options",
                    "Break",
                    "CaseWhen",
                    "Sleep"
                ]
            },
            "label": {
                "type": "string"
            }
        },
        "additionalProperties": false
    },
    "description": "instruction with fixed property 'TYPE':'AdOrder'",
    "propertyOrder": [
        "TYPE",
        "orderId",
        "workflowPath"
    ],
    "properties": {
        "orderId": {
            "description": "'#' ++ now(format='yyyy-MM-dd', timezone='Antarctica/Troll') ++ \"#I$js7EpochSecond-$orderName\"",
            "type": "string"
        },
        "workflowPath": {
            "alias": "workflowName",
            "type": "string"
        },
        "arguments": {
            "description": "a map for arbitrary key-value pairs",
            "javaType": "com.sos.inventory.model.common.Variables",
            "type": "object",
            "additionalProperties": true
        },
        "deleteWhenTerminated": {
            "type": "boolean",
            "default": true
        },
        "startPosition": {
            "anyOf": [
                {
                    "description": "Actually, each even item is a string, each odd item is an integer",
                    "type": "array",
                    "minItems": 1,
                    "items": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "string"
                            }
                        ]
                    }
                },
                {
                    "type": "string",
                    "pattern": "^[^<>]*$",
                    "maxLength": 255,
                    "minLength": 1
                }
            ]
        },
        "stopPositions": {
            "alias": "endPositions",
            "type": "array",
            "items": {
                "anyOf": [
                    {
                        "description": "Actually, each even item is a string, each odd item is an integer",
                        "type": "array",
                        "minItems": 1,
                        "items": {
                            "anyOf": [
                                {
                                    "type": "integer"
                                },
                                {
                                    "type": "string"
                                }
                            ]
                        }
                    },
                    {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255,
                        "minLength": 1
                    }
                ]
            }
        },
        "innerBlock": {
            "alias": "blockPosition",
            "anyOf": [
                {
                    "description": "Actually, each even item is a string, each odd item is an integer",
                    "type": "array",
                    "items": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "string"
                            }
                        ]
                    }
                },
                {
                    "type": "string",
                    "pattern": "^[^<>]*$",
                    "maxLength": 255,
                    "minLength": 1
                }
            ]
        },
        "forceJobAdmission": {
            "type": "boolean"
        }
    },
    "additionalProperties": false
}