Automation System Overview
Automation system diagram
This will probably become a UML diagram; this one is for development (faster updates). @todo add some annotations and explanations on the diagram. |

Automation system components
Corredor server
-
scans all search paths from configuration (
.env
) and load all scripts, -
scans all
package.json
files in all search paths, and install additional packages, -
runs file-change watchers for automation script reloading,
-
runs file-change watchers for
package.json
files for dependency reloading.
Corteza server
-
connects to Corredor server and loads all server and client scripts,
-
creates event handlers from server script triggers and registers them in the event bus,
-
configures the scheduler system to trigger both
onTimestamp
andonInterval
events once per minute at the minute.
-
dispatches event through the event bus,
-
checks for registered events with compatible constraints,
-
requests Corredor server to execute the relevant scripts.
-
raises a specific event (
onSomething
,beforeSomethingElse
,afterSomethingElse
) and dispatches it through the event bus, -
checks for registered events with compatible constraints,
-
requests Corredor server to execute the relevant scripts.
/sink
endpoint-
raises a
onRequest
event and dispatches it through the event bus, -
checks for registered events with compatible constraints,
-
requests Corredor server to execute the relevant scripts.
Corteza web application
-
fetches appropriate automation scripts from the Corteza server in the form of a bundle,
-
registers client scripts from the bundle in the event bus and the ui hooks.
-
raises an event from the given configuration and the invocation context (related resource, user, custom arguments, …),
-
checks for registered events with compatible constraints,
-
requests the script’s execution inside the browser context (client-side execution).
-
raises an event from the given configuration and the invocation context (related resource, user, custom arguments, …),
-
checks for registered events with compatible constraints,
-
requests Corredor server to execute the relevant scripts via the Corteza server.
-
raises a specific event (
onSomething
,beforeSomethingElse
,afterSomethingElse
) and dispatches it through the event bus, -
checks for registered events with compatible constraints,
-
requests the script’s execution inside the browser context (client-side execution).