Difference between revisions of "Execution engine"
From AMTech WikiDocs
(→Execution feedback and/or errors) |
(→Execution feedback and/or errors) |
||
Line 5: | Line 5: | ||
When an activity is being executed by the execution engine an observationlifecycle type is sent to the ''activity_lifecycle'' topic. Some events are reported through the property '''event''', among this events: | When an activity is being executed by the execution engine an observationlifecycle type is sent to the ''activity_lifecycle'' topic. Some events are reported through the property '''event''', among this events: | ||
+ | * Start of a reasoner (BEGIN) | ||
+ | * End of a reasoner (END) | ||
+ | * Execution errors (ERROR) | ||
− | + | The following example illustrates activity '''producer''' thingsInBoardroom reporting action '''@id''' ReportThingInBoardroom started '''event''' BEGIN | |
− | + | <syntaxhighlight lang="jsonld"> | |
− | + | { | |
+ | "topic": "/activity_lifecycle/thingsInBoardroom", | ||
+ | "guesttenants": [ | ||
+ | "_ALL" | ||
+ | ], | ||
+ | "event": "BEGIN", | ||
+ | "@type": "/amtech/linkeddata/types/composite/observation/observationlifecycle", | ||
+ | "producer": "thingsInBoardroom", | ||
+ | "resourceuri": "/amtech/activities/thingsInBoardroom/reasoners/createThingInBoardroomFromEddystoneBeacon/actions/ReportThingInBoardroom", | ||
+ | "detectiontime": "Tue Apr 26 21:41:09 UTC 2016", | ||
+ | "@id": "/amtech/things/observations/983c488f-c3d4-44ec-85f2-795428d12d83", | ||
+ | "occurrencetime": "Tue Apr 26 21:41:08 UTC 2016" | ||
+ | } | ||
+ | </syntaxhighlight> | ||
− | This is a strong mechanism you can use to trace the execution of your activities if, at a given moment, you think they are not function as intended. | + | ;This is a strong mechanism you can use to trace the execution of your activities if, at a given moment, you think they are not function as intended. |
==Security context== | ==Security context== |
Revision as of 18:08, 26 April 2016
How it works
Execution feedback and/or errors
When an activity is being executed by the execution engine an observationlifecycle type is sent to the activity_lifecycle topic. Some events are reported through the property event, among this events:
- Start of a reasoner (BEGIN)
- End of a reasoner (END)
- Execution errors (ERROR)
The following example illustrates activity producer thingsInBoardroom reporting action @id ReportThingInBoardroom started event BEGIN
{
"topic": "/activity_lifecycle/thingsInBoardroom",
"guesttenants": [
"_ALL"
],
"event": "BEGIN",
"@type": "/amtech/linkeddata/types/composite/observation/observationlifecycle",
"producer": "thingsInBoardroom",
"resourceuri": "/amtech/activities/thingsInBoardroom/reasoners/createThingInBoardroomFromEddystoneBeacon/actions/ReportThingInBoardroom",
"detectiontime": "Tue Apr 26 21:41:09 UTC 2016",
"@id": "/amtech/things/observations/983c488f-c3d4-44ec-85f2-795428d12d83",
"occurrencetime": "Tue Apr 26 21:41:08 UTC 2016"
}
- This is a strong mechanism you can use to trace the execution of your activities if, at a given moment, you think they are not function as intended.
Security context
- The reasoners get executed in the access control selected at reasoner's creation time
- Observation access control
- Entities access control