View on GitHub

SHOP4CF Data Models

Documentation of FIWARE data models used in SHOP4CF

Task

Task is a manufacturing operation that is to be executed. This data model is considered indivisible, although in the real world, it may be a complex multi-step operation. Task references Task Definition that specifies how to perform the work in detail.

Example for a task is given below. The task consists of the two steps:

It is assumed that there is a Task Definition already defined that describes such a hybrid transportation work, but yet without parameter values such as how, how many, what, where from, where to.

{
    "id": "urn:ngsi-ld:Task:company-xyz:im834wyoen78w37",
    "type": "Task",
    "isDefinedBy": {
        "type": "Relationship",
        "object": "urn:ngsi-ld:TaskDefinition:company-xyz:hybrid-transportation-x"
    },
    "involves": {
        "type": "Property",
        "value": [
            {
                "type": "Relationship",
                "object": "urn:ngsi-ld:Device:company-xyz:agv-5"
            },
            {
                "type": "Relationship",
                "object": "urn:ngsi-ld:Person:company-xyz:person-x"
            },
            {
                "type": "Relationship",
                "object": "urn:ngsi-ld:Material:company-xyz:pallet"
            }
        ]
    },
    "happensAt": {
        "type": "Property",
        "value": [
            {
                "type": "Relationship",
                "object": "urn:ngsi-ld:Location:company-xyz:storage",
                "locationFunction": {
                    "type": "Property",
                    "value": "source"
                }
            },
            {
                "type": "Relationship",
                "object": "urn:ngsi-ld:Location:company-xyz:production-line-6",
                "locationFunction": {
                    "type": "Property",
                    "value": "target"
                }
            }
        ]
    },
    "workParameters": {
        "type": "Property",
        "value": {
            "materialAmount": 8
        }
    },
    "status": {
        "type": "Property",
        "value": "pending",
        "observedAt": "2020-12-01T11:23:19Z"
    },
    "outputParameters": {
        "type": "Property",
        "value": {
            "materialsAlreadyTransported": 0,
            "percentageCompleted": 0
        },
        "observedAt": "2020-12-01T11:23:19Z"
    },
    "@context": [
        "https://smartdatamodels.org/context.jsonld",
        "https://raw.githubusercontent.com/shop4cf/data-models/master/docs/shop4cfcontext.jsonld"
    ]
}

Required attributes are: id, type, isDefinedBy, status.

Further notes on the attributes: