{
    "title": "event snapshot",
    "id": "schemas/event/eventSnapshot",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.event.EventSnapshot",
    "type": "object",
    "required": [
        "eventId",
        "path",
        "eventType",
        "objectType"
    ],
    "properties": {
        "eventId": {
            "description": "unique id of an event, monoton increasing, id/1000=milliseconds of UTC time",
            "type": "string"
        },
        "path": {
            "id": "schemas/common/path",
            "description": "absolute path based on live folder of a JobScheduler object.",
            "type": "string",
            "pattern": "/([^/]+/)*[^/]+"
        },
        "eventType": {
            "description": "FileBasedAdded, FileBasedRemoved, FileBasedReplaced, FileBasedActivated, OrderStarted, OrderStepStarted, OrderStepEnded, OrderNodeChanged, OrderFinished, OrderSetback, OrderSuspended, OrderResumed",
            "type": "string"
        },
        "objectType": {
            "id": "schemas/common/type",
            "javaType": "com.sos.joc.model.common.JobSchedulerObjectType",
            "type": "string",
            "enum": [
                "JOB",
                "JOBCHAIN",
                "ORDER",
                "PROCESSCLASS",
                "AGENTCLUSTER",
                "LOCK",
                "SCHEDULE",
                "WORKINGDAYSCALENDAR",
                "NONWORKINGDAYSCALENDAR",
                "FOLDER",
                "JOBSCHEDULER",
                "DOCUMENTATION",
                "OTHER"
            ]
        },
        "nodeId": {
            "description": "comes with events OrderNodeChanged, OrderStepStarted, OrderFinished",
            "type": "string"
        },
        "fromNodeId": {
            "description": "comes with event OrderNodeChanged",
            "type": "string"
        },
        "taskId": {
            "description": "comes with event OrderStepStarted",
            "type": "string"
        },
        "state": {
            "description": "comes with event ...State",
            "type": "string"
        },
        "nodeTransition": {
            "description": "comes with event OrderStepEnded",
            "javaType": "com.sos.joc.model.event.NodeTransition",
            "type": "object",
            "required": [
                "type"
            ],
            "properties": {
                "type": {
                    "javaType": "com.sos.joc.model.event.NodeTransitionType",
                    "type": "string",
                    "enum": [
                        "SUCCESS",
                        "KEEP",
                        "PROCEEDING",
                        "ERROR"
                    ]
                },
                "returnCode": {
                    "description": "if type=ERROR",
                    "type": "integer"
                }
            }
        }
    }
}