forked from demisto/content
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplaybook-listExecutedCommands-Test.yml
243 lines (243 loc) · 4.95 KB
/
playbook-listExecutedCommands-Test.yml
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
id: listExecutedCommands-Test
version: -1
name: listExecutedCommands-Test
starttaskid: "0"
tasks:
"0":
id: "0"
taskid: f5cc5846-bdd4-4ea1-8301-21379f6db67c
type: start
task:
id: f5cc5846-bdd4-4ea1-8301-21379f6db67c
version: -1
name: ""
iscommand: false
brand: ""
nexttasks:
'#none#':
- "1"
view: |-
{
"position": {
"x": 50,
"y": 50
}
}
"1":
id: "1"
taskid: 6252dc54-69d4-4bcf-8011-1cd06170dbb8
type: regular
task:
id: 6252dc54-69d4-4bcf-8011-1cd06170dbb8
version: -1
name: Print Hello World
description: Prints text to war room (Markdown supprted)
scriptName: Print
type: regular
iscommand: false
brand: ""
nexttasks:
'#none#':
- "2"
scriptarguments:
value: Hello World
view: |-
{
"position": {
"x": 50,
"y": 195
}
}
"2":
id: "2"
taskid: c3b4845e-c9fd-4847-8d27-730db1b1a77f
type: regular
task:
id: c3b4845e-c9fd-4847-8d27-730db1b1a77f
version: -1
name: Get list of manual commands
scriptName: listExecutedCommands
type: regular
iscommand: false
brand: ""
nexttasks:
'#none#':
- "3"
scriptarguments:
source: Manual
view: |-
{
"position": {
"x": 50,
"y": 370
}
}
"3":
id: "3"
taskid: bc5eb7ee-ace6-4541-8f41-ecff7c043efe
type: regular
task:
id: bc5eb7ee-ace6-4541-8f41-ecff7c043efe
version: -1
name: Save response to context
description: "Takes the comments of a given entry ID and stores them in the
incident context, under a provided context key. \nFor accessing the last executed
task's comments, provide ${lastCompletedTaskEntries.[0]} as the value for
the entryId input parameter."
scriptName: commentsToContext
type: regular
iscommand: false
brand: ""
nexttasks:
'#none#':
- "4"
scriptarguments:
contextKey: noData
entryId: ${lastCompletedTaskEntries}
listSeperator: ""
view: |-
{
"position": {
"x": 50,
"y": 545
}
}
"4":
id: "4"
taskid: 8629b4dc-1921-401a-8315-2ac29b4504d1
type: condition
task:
id: 8629b4dc-1921-401a-8315-2ac29b4504d1
version: -1
name: Check that we didn't get any commands
scriptName: AreValuesEqual
type: condition
iscommand: false
brand: ""
nexttasks:
"yes":
- "5"
scriptarguments:
left: ${noData=val.trim()}
right: No commands found
results:
- AreValuesEqual
view: |-
{
"position": {
"x": 50,
"y": 719
}
}
"5":
id: "5"
taskid: 28c54813-8890-461e-8839-d70962f93a2e
type: regular
task:
id: 28c54813-8890-461e-8839-d70962f93a2e
version: -1
name: Get playbook commands
scriptName: listExecutedCommands
type: regular
iscommand: false
brand: ""
nexttasks:
'#none#':
- "6"
scriptarguments:
source: Playbook
view: |-
{
"position": {
"x": 50,
"y": 895
}
}
"6":
id: "6"
taskid: 5fd8f086-ce66-47c0-8677-5802caf863b6
type: regular
task:
id: 5fd8f086-ce66-47c0-8677-5802caf863b6
version: -1
name: Save response to context
scriptName: commentsToContext
type: regular
iscommand: false
brand: ""
nexttasks:
'#none#':
- "7"
scriptarguments:
contextKey: withData
entryId: ${lastCompletedTaskEntries}
listSeperator: ""
view: |-
{
"position": {
"x": 50,
"y": 1069
}
}
"7":
id: "7"
taskid: 4d15e900-cce0-4f9e-815b-4a01bea70368
type: condition
task:
id: 4d15e900-cce0-4f9e-815b-4a01bea70368
version: -1
name: Check that we got commands
scriptName: AreValuesEqual
type: condition
iscommand: false
brand: ""
nexttasks:
"no":
- "8"
scriptarguments:
left: ${withData=val.trim()}
right: No commands found
results:
- AreValuesEqual
view: |-
{
"position": {
"x": 50,
"y": 1245
}
}
"8":
id: "8"
taskid: 194b2ce3-61d1-4a90-8a06-fe272eb1d017
type: regular
task:
id: 194b2ce3-61d1-4a90-8a06-fe272eb1d017
version: -1
name: Close
scriptName: CloseInvestigation
type: regular
iscommand: false
brand: ""
scriptarguments:
notes: ""
reason: ""
view: |-
{
"position": {
"x": 50,
"y": 1420
}
}
view: |-
{
"linkLabelsPosition": {},
"paper": {
"dimensions": {
"height": 1465,
"width": 380,
"x": 50,
"y": 50
}
}
}
inputs: []