DEPRECATED! -> Migrated to https://github.com/leftshiftone/conveyjs
Convey is a JavaScript Framework for connecting to processes created with G.A.I.A..
The framework ist compatible with all major Browsers and can be used standalone as well as in conjunction with React, Angular or Vue.
In order to add Convey to your project, follow these steps:
In order to integrate with G.A.I.A. two things are required:
- MQTT endpoint: e.g. wss://gaia.local/mqtt
- Identifier of the so called Identity to connect to.
npm i gaia-js-sdk-convey
<html>
<head>
<meta charset="UTF-8"/>
<link rel="stylesheet" href="gaia-js-sdk-convey-std.css"/>
<script src="gaia-js-sdk-convey-std.js"></script>
</head>
<body>
<div class="lto-gaia">
<div class="lto-content"></div>
<div class="lto-suggest"></div>
<input class="lto-textbox"/>
<button class="lto-invoker"/>
</div>
</div>
</body>
</html>
Add the following before the </head>
tag in the HTML file.
<script type="javascript">
new GaiaConvey.Gaia(
new GaiaConvey.ContentCentricRenderer(),
new GaiaConvey.OffSwitchListener()
).connect('wss://DOMAIN_NAME/mqtt', 'IDENTITY_ID')
.then(connection => {
connection.subscribe(ChannelType.CONTEXT, (data) => console.log(data));
connection.reception();
});
</script>
import {Gaia, ContentCentricRenderer, OffSwitchListener, ChannelType} from "gaia-js-sdk-convey";
...
new Gaia(new ContentCentricRenderer(), new OffSwitchListener())
.connect('wss://DOMAIN_NAME/mqtt', 'IDENTITY_ID')
.then(conn => {
conn.subscribe(ChannelType.CONTEXT, (data) => console.log(data));
conn.reception();
});
The communication with G.A.I.A. contains several channels where each one has its own purpose.
Is the main channel and is responsible for exchanging the elements configured in G.A.I.A.. Convey automatically subscribes to this channel. The messages in this channel are rendered to HTML elements.
Each notification configured in the G.A.I.A. BPMN process can be received if subscribed to this channel.
G.A.I.A. sends logs for certain process executions which can be received by subscribing to this channel.
A Renderer defines how elements, arrived in the TEXT channel, are rendered in the HTML DOM tree. Furthermore, a renderer allows for specifying the layout of an integration project.
The classic renderer renders the G.A.I.A. messages in a classic top-down manner.
The content centric renderer tries to maximize the time a content is visible by updating the content if possible or displaying interrupting actions like intent cascading by overlaying the content.
Renderer implementation which is based on the reveal.js library. This renderer supports horizontal as well as vertical navigation.
No-operation dummy renderer. Mainly used for audio only use cases.
A listener provides the functionality to react to certain events. Events can be
- Connected
- ConnectionLost
- PacketSend
- Disconnected
- Error
- Message
Acts as the base listener.
If an input text area should only be visible when a input is required, this is the listener to be used.
The following modules are available:
- std: Contains default modules
- aud: Contains the audio module
- cod: Contains the code reader module (e.g. QRCode)
- map: Contains modules for Open Street Map and Google Maps
- vis: Contains modules for rendering data as charts
- all: Contains all modules
Releases are triggered locally. Just a tag will be pushed to trigger the CI release pipeline.
Run yarn trigger-release:major
locally.
Run yarn trigger-release:minor
locally.
Run yarn trigger-release:patch
locally.