ti-framework design
Last updated
Was this helpful?
Last updated
Was this helpful?
TI-Framework SDK is designed to help anyone that wants to implement a client/customer app for Touchless Interactive solutions, without worrying about complexities of design, and implementation for data models, interfaces etc
ti-framework provides APIs that you can use in your application/services to do every operation from creating Flows to running an active communication with TI-server.
The current implementation has full support for developing your apps(client/customer) in angular. SDK incorporates useful technologies like containers, web sockets, and good design patterns.
Most of the APIs available are listed . For a full reference, please refer to descriptions for each API method.
This interface controls the mode of exchanging information between SDK and Server independent of the underlying technologies like WebSockets, MQTT, RabbitMQ etc. For the sake of this demo, we implemented a SocketHandler that brings up a WebSocket each for Active Flow/Session and Interaction.
EventListener
interface declares how SDK will process updates from TI-Server. As SDK is used by both client and customer apps, we have ClientServerEventListener
and CustomerServerEventListener
implementing this interface
After we get updates on whether a Task is completed etc form TI-Server, Customer app needs to determine how to navigate to the next in order Task in the Flow. TaskPathCalculator
addresses the need hereby declaring utility methods like calculateNextTask. RouteHandler
class implements this interface in our SDK.
As part of FlowManager
creation for client and customer, CommunicationFactory
is used to create CommunicationHandler
with a chosen mode of Transport
.
All the data exchanged between either Customer and Server or Client and Server will have a message Event attached to it. Based on this event, any payload is processed at their respective ends.
Server Events
are used to acknowledge connections, or any task update requests and to inform client and customer about completion of Task/Stage/Flow.
Client Events
are used to request initiation of Flow, update Server when Flow is established, and more.
Customer Events
are used to request connection to Flow, send upadtes when Task has started, or when requesting Server that Task is ready to be completed.
Before SDK can be ready for Flow Orchestration, it needs to configure below.
FlowManager
is created for Client when Flow is being initiated, and the same is created for Customer when 4 digit invite code is sent to register for that Flow. FlowManager is equipped with a container with all the Session info, a FlowListener
, EventListener
, CommunicationHandler
is created, which is used for all Flow Orchestration related operations. In addition, FlowManager provides useful utility methods to sendTAskPayloadToServer
and update listeners sent from client/customer app that flowIsComplete
.
Once a Flow is active, InteractManager
is created with InteractionCommunicationHandler
and InteractionListener
. This is responsible for sending/receiving interaction data.
TiSdkError and several other error classes extending it are defined to raise exceptions or make better sense of every important step that might fail in Flow Orchestration. Please refer to for more information.