forked from BotBuilderCommunity/botbuilder-community-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
StorageSample.dialog
108 lines (108 loc) · 2.9 KB
/
StorageSample.dialog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
{
"$kind": "Microsoft.AdaptiveDialog",
"$designer": {
"$designer": {
"name": "StorageSample",
"description": "",
"id": "IE1t04"
}
},
"autoEndDialog": true,
"defaultResultProperty": "dialog.result",
"triggers": [
{
"$kind": "Microsoft.OnConversationUpdateActivity",
"$designer": {
"id": "376720"
},
"actions": [
{
"$kind": "Microsoft.Foreach",
"$designer": {
"id": "518944",
"name": "Loop: for each item"
},
"itemsProperty": "turn.Activity.membersAdded",
"actions": [
{
"$kind": "Microsoft.IfCondition",
"$designer": {
"id": "641773",
"name": "Branch: if/else"
},
"condition": "string(dialog.foreach.value.id) != string(turn.Activity.Recipient.id)",
"actions": [
{
"$kind": "Microsoft.SendActivity",
"$designer": {
"id": "859266",
"name": "Send a response"
},
"activity": "${SendActivity_Welcome()}"
}
]
}
]
}
]
},
{
"$kind": "Microsoft.OnUnknownIntent",
"$designer": {
"id": "3X4m1u"
},
"actions": [
{
"$kind": "Microsoft.SetProperty",
"$designer": {
"id": "a7Z5go",
"name": "Initialize item key"
},
"property": "dialog.itemKey",
"value": "=concat(turn.activity.from.id, \":count\")"
},
{
"$kind": "BotBuilderCommunity.ReadStorageItem",
"$designer": {
"id": "eoiVKn",
"name": "Read item from storage"
},
"itemKey": "=dialog.itemKey",
"resultProperty": "dialog.item",
"initialItem": {
"count": 0
}
},
{
"$kind": "Microsoft.SetProperty",
"$designer": {
"id": "SuWz4I",
"name": "Increment count"
},
"property": "dialog.item.count",
"value": "=dialog.item.count + 1"
},
{
"$kind": "BotBuilderCommunity.WriteStorageItem",
"$designer": {
"id": "hRperx",
"name": "Save updated item to storage"
},
"item": "=dialog.item",
"itemKey": "=dialog.itemKey"
},
{
"$kind": "Microsoft.SendActivity",
"$designer": {
"id": "VuIY1U"
},
"activity": "${SendActivity_VuIY1U()}"
}
]
}
],
"$schema": "https://raw.githubusercontent.com/microsoft/BotFramework-Composer/stable/Composer/packages/server/schemas/sdk.schema",
"generator": "StorageSample.lg",
"id": "StorageSample",
"recognizer": "StorageSample.lu.qna"
}