forked from rstudio/gary-uml
/
sequence_launcher_job.txt
120 lines (99 loc) · 2.91 KB
/
sequence_launcher_job.txt
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
109
110
111
112
113
114
115
116
117
118
119
120
@startuml
header
Start Launcher Job
endheader
box "Gwt"
participant Commands
participant LauncherJobManagerPro
participant JobLauncherDialogPro
participant ClientEvents
end box
box "launcher.js"
participant LauncherUIPro
end box
box "RServer"
participant ServerJobLauncherRpc
endbox
box "Job Launcher"
participant REST
endbox
box "Job"
endbox
box "RSession"
participant SessionJobs
participant ScriptJob << AsyncRProcess >>
participant RProcess
participant JobsApi
participant Job
endbox
Commands -> LauncherJobManagerPro : onLauncherJobRunScript
Commands -> LauncherJobManagerPro : (or) onLauncherJobRunSelection
LauncherJobManagerPro -> JobLauncherDialogPro : shows
activate JobLauncherDialogPro
JobLauncherDialogPro -> LauncherUIPro : load and embed
activate LauncherUIPro
LauncherUIPro -> ServerJobLauncherRpc : job_launcher_rpc/get_info
ServerJobLauncherRpc -> REST : get_info
REST -> LauncherUIPro : cluster info
LauncherUIPro -> JobLauncherDialogPro : launcher settings
deactivate LauncherUIPro
JobLauncherDialogPro -> LauncherJobManagerPro : LauncherJobPro
deactivate JobLauncherDialogPro
LauncherJobManagerPro -> Commands : onActivateJobs (show pane)
LauncherJobManagerPro -> ServerJobLauncherRpc : /job_launcher_rpc/submit_job (LauncherJobPro)
ServerJobLauncherRpc -> REST : submit_job
SessionJobs -> ScriptJob : startScriptJob
activate ScriptJob
ScriptJob -> JobsApi : addJob
JobsApi -> Job : create
activate Job
ScriptJob -> RProcess : start process
activate RProcess
ScriptJob -> ScriptJob : add to ScriptJob list
group Start Running
RProcess -> ScriptJob : stdout count-ESC
ScriptJob -> Job : setProgressMax
ScriptJob -> JobsApi : setJobState (Running)
JobsApi -> Job : setState (Running)
Job -> Job : save started
JobsApi -> ClientEvents : JobUpdated
end
opt Report zero or more named sections
RProcess -> ScriptJob : stdout section-ESC
ScriptJob -> JobsApi : setJobStatus <text>
JobsApi -> Job : setStatus
JobsApi -> ClientEvents : JobUpdated
end
loop ProgressMax times
RProcess -> ScriptJob : stdout statementCount-ESC
ScriptJob -> JobsApi : setJobProgress
JobsApi -> Job : setProgress
JobsApi -> ClientEvents : JobUpdated
end
loop stdout
RProcess -> ScriptJob : onStdout
ScriptJob -> Job : addOutput
Job -> Job : append to log
Job -> ClientEvents : JobOutput (if listening)
end
loop stderr
RProcess -> ScriptJob : onStderr
ScriptJob -> Job : addOutput
Job -> Job : append to log
Job -> ClientEvents : JobOutput (if listening)
end
group Job Finished
RProcess -> ScriptJob : stdout completed-ESC
ScriptJob -> JobsApi : setJobStatus <blank>
JobsApi -> Job : setStatus
JobsApi -> ClientEvents : JobUpdated
end
RProcess -> ScriptJob : onCompleted exitStatus
destroy RProcess
ScriptJob -> JobsApi : setJobState (success/failure)
JobsApi -> Job : setState
Job -> Job : save completed_
JobsApi -> ClientEvents : JobUpdated
ScriptJob -> ScriptJob : remove from ScriptJob list
destroy ScriptJob
@enduml