{
    "title": "OrderItem",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.controller.model.order.OrderItem",
    "type": "object",
    "properties": {
        "id": {
            "type": "string"
        },
        "arguments": {
            "description": "a map for arbitrary key-value pairs",
            "javaType": "com.sos.inventory.model.common.Variables",
            "type": "object",
            "additionalProperties": true
        },
        "workflowPosition": {
            "javaType": "com.sos.controller.model.workflow.WorkflowPosition",
            "type": "object",
            "required": [
                "workflowId",
                "position"
            ],
            "properties": {
                "workflowId": {
                    "javaType": "com.sos.controller.model.workflow.WorkflowId",
                    "type": "object",
                    "required": [
                        "path"
                    ],
                    "properties": {
                        "path": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255
                        },
                        "versionId": {
                            "type": "string",
                            "pattern": "^[^<>]*$",
                            "maxLength": 255
                        }
                    },
                    "additionalProperties": false
                },
                "position": {
                    "description": "Actually, each even item is a string, each odd item is an integer",
                    "type": "array",
                    "items": {
                        "anyOf": [
                            {
                                "type": "integer"
                            },
                            {
                                "type": "string"
                            }
                        ]
                    }
                }
            },
            "additionalProperties": false
        },
        "state": {
            "javaType": "com.sos.controller.model.order.OrderState",
            "type": "object",
            "properties": {
                "TYPE": {
                    "type": "string"
                }
            },
            "additionalProperties": false
        },
        "attachedState": {
            "javaType": "com.sos.controller.model.order.OrderAttachedState",
            "type": "object",
            "properties": {
                "TYPE": {
                    "description": "Attaching, Attached, ...",
                    "type": "string"
                },
                "agentName": {
                    "type": "string"
                }
            },
            "additionalProperties": false
        },
        "historicOutcomes": {
            "type": "array",
            "items": {
                "type": "object",
                "javaType": "com.sos.controller.model.workflow.HistoricOutcome",
                "properties": {
                    "position": {
                        "description": "Actually, each even item is a string, each odd item is an integer",
                        "type": "array",
                        "items": {
                            "anyOf": [
                                {
                                    "type": "integer"
                                },
                                {
                                    "type": "string"
                                }
                            ]
                        }
                    },
                    "outcome": {
                        "javaType": "com.sos.controller.model.common.Outcome",
                        "type": "object",
                        "required": [
                            "TYPE"
                        ],
                        "properties": {
                            "TYPE": {
                                "description": "Succeeded, Failed, Disrupted, Cancelled, Killed, TimedOut",
                                "type": "string"
                            },
                            "namedValues": {
                                "description": "a map for arbitrary key-value pairs",
                                "javaType": "com.sos.inventory.model.common.Variables",
                                "type": "object",
                                "additionalProperties": true
                            },
                            "outcome": {
                                "description": "outcome-schema.json"
                            }
                        },
                        "additionalProperties": false
                    }
                },
                "additionalProperties": false
            }
        },
        "scheduledFor": {
            "type": "number",
            "format": "utc-millisec",
            "minimum": 0
        },
        "isSuspended": {
            "type": "boolean"
        },
        "removeWhenTerminated": {
            "type": "boolean"
        }
    },
    "additionalProperties": false
}