-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathsequenceDiagram.plantuml
76 lines (59 loc) · 2.2 KB
/
sequenceDiagram.plantuml
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
@startuml
skinparam ParticipantPadding 10
skinparam BoxPadding 5
actor User
box "Head"
participant Chat
participant QiChatbot
endbox
box "Tablet"
participant DialogflowChatbot
participant DialogflowAgent
participant StandardReplyReaction
participant DialogflowChatbotReaction
participant Say
endbox
box "Internet"
participant Dialogflow
endbox
User -> Chat: "are we free ?"
activate Chat
Chat -> QiChatbot: replyTo("are we free ?")
activate QiChatbot
Chat -> DialogflowChatbot: replyTo("are we free ?")
note left of QiChatbot: The QiChatbot has no rule\nin its topic that \ncorresponds to this\nuser utterance
activate DialogflowChatbot
DialogflowChatbot -> DialogflowAgent : answerTo("are we free ?")
activate DialogflowAgent
DialogflowAgent ->> Dialogflow : send an asynchronous query containing "are we free ?" to the online agent
activate Dialogflow
Chat <-- QiChatbot: return StandardReplyReaction(ChatbotReaction, FALLBACK))
deactivate QiChatbot
DialogflowAgent <-- Dialogflow : return an AIResponse containing "The concept of liberty is a rather hazy one."
deactivate Dialogflow
DialogflowChatbot <-- DialogflowAgent : return the AIReponse
deactivate DialogflowAgent
create DialogflowChatbotReaction
DialogflowChatbot -> DialogflowChatbotReaction : create a DialogflowChatbotReaction with "The concept of liberty is a rather hazy one."
create StandardReplyReaction
DialogflowChatbot -> StandardReplyReaction : create a ReplyReaction with (ChatbotReaction + priority)
deactivate QiChatbot
Chat <-- DialogflowChatbot: return StandardReplyReaction(DialogflowChatbotReaction, FALLBACK))
deactivate DialogflowChatbot
activate Chat
note right of Chat: Choose the FALLBACK since no NORMAL response was provided
Chat -> DialogflowChatbotReaction: runWith(SpeechEngine)
deactivate Chat
activate DialogflowChatbotReaction
create Say
DialogflowChatbotReaction -> Say: SayBuilder.with(speechEngine).build()
DialogflowChatbotReaction ->> Say: async().run()
activate Say
Say -> User : "The concept of liberty is a rather hazy one."
DialogflowChatbotReaction -> Say: get() on the enclosing Future
Say --> DialogflowChatbotReaction
deactivate Say
DialogflowChatbotReaction --> Chat
deactivate DialogflowChatbotReaction
deactivate Chat
@enduml