Touchless Interactive Framework
  • Introduction
  • Get Started
    • Overview
    • How it works
      • Create task/stage/flow API
      • Flow
    • Setup Guide
  • ti framework-sdk
    • ti-framework Sdk
  • GUIDE
    • TI-Customer
    • Flow Creation
    • Flow - orchestration
      • Interaction
    • ti-framework design
    • TI-Client App
  • Reference
Powered by GitBook
On this page
  • Motivation
  • Introduction
  • Environment
  • API
  • Design
  • Interfaces
  • CommunicationFactory
  • Events
  • Flow initiation and closure process
  • Error handling

Was this helpful?

  1. GUIDE

ti-framework design

PreviousInteractionNextTI-Client App

Last updated 4 years ago

Was this helpful?

Motivation

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

Introduction

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.

Environment

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.

API

Most of the APIs available are listed . For a full reference, please refer to descriptions for each API method.

Design

Interfaces

CommunicationHandler

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.

Listener

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

TaskPathCalculator

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.

CommunicationFactory

As part of FlowManager creation for client and customer, CommunicationFactory is used to create CommunicationHandler with a chosen mode of Transport.

Events

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.

Flow initiation and closure process

Before SDK can be ready for Flow Orchestration, it needs to configure below.

Flow Manager

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.

Interact Manager

Once a Flow is active, InteractManager is created with InteractionCommunicationHandler and InteractionListener. This is responsible for sending/receiving interaction data.

Error handling

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.

error definitions
here
API , key Interfaces and Classes