Open Dexagod opened 3 years ago
I believe @phochste and I came to a similar conclusion: all triggers should be available to the rule language as notifications. How resource/scheduled triggers are implemented is indeed up to the orchestrator.
Big side-remark though: if Rulebooks are meant to be shared, then they need to include a description of the scheduled trigger at hand.
Case: a university's rulebook declares that new artefacts should be announced to a specific index every month. Two researchers implement this rulebook. How can their orchestrators know what to schedule and how do you ensure they schedule the same?
See also #2
So a while ago I took a look at the possibility of using SPARQL Construct to create rules. Below an example of mellon scenario 5.1.
When using SPARQL Construct in this way, a set of triples is constructed according to the Construct clause, based on the matching data found in the WHERE clause. This has the advantage that it is easy to reuse data specified in the WHERE clause in the Construct Clause.
In case the WHERE clause finds no match in the input, the Construct clause has no results.
The resulting set of triples then form the actions that have to be taken by the orchestrator, which has to interpret these actions itself from these resulting triples.
HOWEVER this approach does not really provide an inherent way to model scheduled triggers and resource-based triggers. Scheduled triggers could make use of dates in SPARQL, but this would make repeating triggers ever hour rather difficult (also because the script would have to be run at set time intervals to check for this). So these cases would then best be handled through other means (websocket, cron, ...), and have a dummy notification be sent to the inbox to trigger certain actions.