{
    "title": "when",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.sign.model.instruction.When",
    "type": "object",
    "required": [
        "predicate",
        "then"
    ],
    "properties": {
        "predicate": {
            "type": "string",
            "minLength": 1
        },
        "then": {
            "type": "object",
            "javaType": "com.sos.sign.model.instruction.Instructions",
            "required": [
                "instructions"
            ],
            "properties": {
                "instructions": {
                    "type": "array",
                    "minItems": 1,
                    "items": {
                        "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"
                                ]
                            }
                        },
                        "additionalProperties": false
                    }
                }
            },
            "additionalProperties": false
        }
    },
    "additionalProperties": false
}