{
    "title": "forkJoin",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.inventory.model.instruction.ForkJoin",
    "type": "object",
    "required": [
        "branches"
    ],
    "extends": {
        "javaType": "com.sos.inventory.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",
                    "ExpectNotice",
                    "ImplicitEnd",
                    "AddOrder",
                    "Cycle"
                ]
            },
            "position": {
                "description": "Actually, each even item is a string, each odd item is an integer",
                "type": "array",
                "items": {
                    "anyOf": [
                        {
                            "type": "integer"
                        },
                        {
                            "type": "string"
                        }
                    ]
                }
            },
            "positionString": {
                "type": "string",
                "pattern": "^[^<>]*$",
                "maxLength": 255
            }
        },
        "additionalProperties": false
    },
    "description": "instruction with fixed property 'TYPE':'Fork'",
    "properties": {
        "branches": {
            "type": "array",
            "minItems": 2,
            "items": {
                "type": "object",
                "javaType": "com.sos.inventory.model.workflow.Branch",
                "required": [
                    "id",
                    "workflow"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "maxLength": 10,
                        "minLength": 1
                    },
                    "workflow": {
                        "type": "object",
                        "javaType": "com.sos.inventory.model.workflow.BranchWorkflow",
                        "required": [
                            "instructions"
                        ],
                        "properties": {
                            "instructions": {
                                "type": "array",
                                "minItems": 1,
                                "items": {
                                    "javaType": "com.sos.inventory.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",
                                                "ExpectNotice",
                                                "ImplicitEnd",
                                                "AddOrder",
                                                "Cycle"
                                            ]
                                        },
                                        "position": {
                                            "description": "Actually, each even item is a string, each odd item is an integer",
                                            "type": "array",
                                            "items": {
                                                "anyOf": [
                                                    {
                                                        "type": "integer"
                                                    },
                                                    {
                                                        "type": "string"
                                                    }
                                                ]
                                            }
                                        },
                                        "positionString": {
                                            "type": "string",
                                            "pattern": "^[^<>]*$",
                                            "maxLength": 255
                                        }
                                    },
                                    "additionalProperties": false
                                }
                            },
                            "result": {
                                "description": "a map for arbitrary key-value pairs",
                                "javaType": "com.sos.inventory.model.job.Environment",
                                "type": "object",
                                "additionalProperties": {
                                    "type": "string"
                                }
                            }
                        },
                        "additionalProperties": false
                    }
                },
                "additionalProperties": false
            }
        },
        "joinIfFailed": {
            "type": "boolean",
            "default": false
        }
    },
    "additionalProperties": false
}