Flowstorm
Product Site
Flowstorm App
Android App
iOS App
Search…
What is Flowstorm
Basic principles
Quick Start Guide
Video Tutorials
How To
Sign Up & Login
Design a Dialogue
Create an Application
Analyze Conversations
Tips for Conversation Design
Flowstorm Studio
Working Space
User Settings
Account Management
Keyboard Shortcuts
Flowstorm Assistant
Clients and Channels
Introduction to Clients
Client Configuration
Standalone Application
Android Application
iOS Application
Web client
Amazon Alexa
Google Assistant App
Phone Calls via Twilio.com
Flowstorm Project
About Project
Core Library
Core Application
Channels
NLP Services
Project Setup
Deployment
Boilerplate Project
Development System
Introduction
Dialogue Design
DialogueScript
Data Types
Initialization Code
Programmable Nodes
Attributes
Parameters
User Input
Data Properties
Data Processing
Data to Speech
Contextual Logging
External API Calls
Client Integration
Organization
Platform Continuous Delivery Process
How to publish Core artifacts into Maven Central repository
Powered By
GitBook
Data Properties
Data properties are declared in initialisation code of dialogue model.
First, define some data class to play with
1
data
class
Country
(
val
name
:
String
,
val
region
:
String
)
Copied!
Static definition
You can define your data inside initialisation code
1
val
countries
=
listOf
(
Country
(
"Germany"
,
"Europe"
),
Country
(
"United States"
,
"North America"
))
Copied!
Loading from external source
To load data into model data property from external source, use delegate
loader
.
Example of loading data from external URL providing resource of type JSON with known structure defined as
data class
1
val
countries
by
loader
<
List
<
Country
>>
(
"https://core.flowstorm.ai/file/assets/data/CountryByRegionList.json"
)
Copied!
If you don't know the exact structure, you can work with data as with
Map
objects
1
val
countries
by
loader
<
List
<
Map
<
String
,
Any
>>>
(
"https://core.flowstorm.ai/file/assets/data/CountryByRegionList.json"
)
Copied!
You can also load lists of primitive values, e.g. of type
String
1
val
countryNames
by
loader
<
List
<
String
>>
(
"hhttps://core.flowstorm.ai/file/assets/data/countries.json"
)
Copied!
You can also use
File Assets
of type JSON. Just upload your file to it and get asset URL from its detail.
Previous
Entities
Next
Data Processing
Last modified
1yr ago
Copy link
Contents
Static definition
Loading from external source