-
Notifications
You must be signed in to change notification settings - Fork 0
/
JSON+Elements+-+Control+structures.doc
531 lines (499 loc) · 23.9 KB
/
JSON+Elements+-+Control+structures.doc
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
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
Message-ID: <1924461285.16702.1540846007999.JavaMail.confluence@ps2pr028231.express-scripts.com>
Subject: Exported From Confluence
MIME-Version: 1.0
Content-Type: multipart/related;
boundary="----=_Part_16701_1341797344.1540846007999"
------=_Part_16701_1341797344.1540846007999
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Content-Location: file:///C:/exported.html
<html xmlns:o=3D'urn:schemas-microsoft-com:office:office'
xmlns:w=3D'urn:schemas-microsoft-com:office:word'
xmlns:v=3D'urn:schemas-microsoft-com:vml'
xmlns=3D'urn:w3-org-ns:HTML'>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8=
">
<title>JSON Elements - Control structures</title>
<!--[if gte mso 9]>
<xml>
<o:OfficeDocumentSettings>
<o:TargetScreenSize>1024x640</o:TargetScreenSize>
<o:PixelsPerInch>72</o:PixelsPerInch>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
<w:WordDocument>
<w:View>Print</w:View>
<w:Zoom>90</w:Zoom>
<w:DoNotOptimizeForBrowser/>
</w:WordDocument>
</xml>
<![endif]-->
<style>
<!--
@page Section1 {
size: 8.5in 11.0in;
margin: 1.0in;
mso-header-margin: .5in;
mso-footer-margin: .5in;
mso-paper-source: 0;
}
table {
border: solid 1px;
border-collapse: collapse;
}
table td, table th {
border: solid 1px;
padding: 5px;
}
td {
page-break-inside: avoid;
}
tr {
page-break-after: avoid;
}
div.Section1 {
page: Section1;
}
/* Confluence print stylesheet. Common to all themes for print medi=
a */
/* Full of !important until we improve batching for print CSS */
@media print {
#main {
padding-bottom: 1em !important; /* The default padding of 6em is to=
o much for printouts */
}
body {
font-family: Arial, Helvetica, FreeSans, sans-serif;
font-size: 10pt;
line-height: 1.2;
}
body, #full-height-container, #main, #page, #content, .has-personal-sid=
ebar #content {
background: #fff !important;
color: #000 !important;
border: 0 !important;
width: 100% !important;
height: auto !important;
min-height: auto !important;
margin: 0 !important;
padding: 0 !important;
display: block !important;
}
a, a:link, a:visited, a:focus, a:hover, a:active {
color: #000;
}
#content h1,
#content h2,
#content h3,
#content h4,
#content h5,
#content h6 {
font-family: Arial, Helvetica, FreeSans, sans-serif;
page-break-after: avoid;
}
pre {
font-family: Monaco, "Courier New", monospace;
}
#header,
.aui-header-inner,
#navigation,
#sidebar,
.sidebar,
#personal-info-sidebar,
.ia-fixed-sidebar,
.page-actions,
.navmenu,
.ajs-menu-bar,
.noprint,
.inline-control-link,
.inline-control-link a,
a.show-labels-editor,
.global-comment-actions,
.comment-actions,
.quick-comment-container,
#addcomment {
display: none !important;
}
/* CONF-28544 cannot print multiple pages in IE */
#splitter-content {
position: relative !important;
}
.comment .date::before {
content: none !important; /* remove middot for print view */
}
h1.pagetitle img {
height: auto;
width: auto;
}
.print-only {
display: block;
}
#footer {
position: relative !important; /* CONF-17506 Place the footer at en=
d of the content */
margin: 0;
padding: 0;
background: none;
clear: both;
}
#poweredby {
border-top: none;
background: none;
}
#poweredby li.print-only {
display: list-item;
font-style: italic;
}
#poweredby li.noprint {
display: none;
}
/* no width controls in print */
.wiki-content .table-wrap,
.wiki-content p,
.panel .codeContent,
.panel .codeContent pre,
.image-wrap {
overflow: visible !important;
}
/* TODO - should this work? */
#children-section,
#comments-section .comment,
#comments-section .comment .comment-body,
#comments-section .comment .comment-content,
#comments-section .comment p {
page-break-inside: avoid;
}
#page-children a {
text-decoration: none;
}
/**
hide twixies
the specificity here is a hack because print styles
are getting loaded before the base styles. */
#comments-section.pageSection .section-header,
#comments-section.pageSection .section-title,
#children-section.pageSection .section-header,
#children-section.pageSection .section-title,
.children-show-hide {
padding-left: 0;
margin-left: 0;
}
.children-show-hide.icon {
display: none;
}
/* personal sidebar */
.has-personal-sidebar #content {
margin-right: 0px;
}
.has-personal-sidebar #content .pageSection {
margin-right: 0px;
}
.no-print, .no-print * {
display: none !important;
}
}
-->
</style>
</head>
<body>
<h1>JSON Elements - Control structures</h1>
<div class=3D"Section1">
<p>Hub Framework has a capability to execute group steps by making =
certain decision. It supports below three type of decision making steps.</p=
>
<p><br></p>
<ul>
<li>Simple if - It executes group of steps if only the condition is sa=
tisfied.</li>
<li>if-else - it executes the group of steps if condition is satisfied=
, if not it executes other set of steps which is available in the else blo=
ck.</li>
<li>if ladder - it executes the group of steps if condition is satisfied , =
like if, we can have multiple condition based block . if non of t he =
condition satisfied it executes other set of steps which is available in th=
e else block. else step is not mandatory it is an optional. it will execute=
only one set of steps among the multiple group of steps.</li>
</ul>
<p><br></p>
<p><br></p>
<p><br></p>
<p><strong>Syntax</strong></p>
<p><br></p>
<p><br></p>
<div class=3D"table-wrap">
<table class=3D"relative-table wrapped confluenceTable" style=3D"width: 97.=
37%;">
<colgroup>
<col style=3D"width: 26.54%;">
<col style=3D"width: 36.16%;">
<col style=3D"width: 37.32%;">
</colgroup>
<tbody>
<tr>
<th class=3D"confluenceTh"><p>Simple If:</p><p> // If block</p><p>&nbs=
p; &=
nbsp; <span style=3D"color: rgb(153,51,0);"><=
em>{ "if": {</em></span></p><p><span style=3D"color: rgb(153,51,0);">=
<em>  =
; &n=
bsp; "expression": ""<span style=3D"color: rgb(153,51,0);"><em>=
</em></span></em></span></p><p><span style=3D"color: rgb(153,51,0);"><em><=
span style=3D"color: rgb(153,51,0);"><em> &nbs=
p; &=
nbsp; &nbs=
p; }</em></span></em></span></p><p><span style=3D"color: rgb(153,51,0=
);"><em><span style=3D"color: rgb(153,51,0);"><em> &=
nbsp; &nbs=
p; <span style=3D"color: rgb(153,51,0);"><em><span style=3D"color: rg=
b(153,51,0);"><em> }</em></span></em></span></em></span></em></span></=
p><p><span style=3D"color: rgb(153,51,0);"><em><span style=3D"color: rgb(15=
3,51,0);"><em><span style=3D"color: rgb(153,51,0);"><em><span style=3D"colo=
r: rgb(153,51,0);"><br></span></em></span></em></span></em></span></p><p><s=
pan style=3D"color: rgb(153,51,0);"><em><span style=3D"color: rgb(153,51,0)=
;"><em><span style=3D"color: rgb(153,51,0);"><em><span style=3D"color: rgb(=
153,51,0);">.................... CAN HAVE LIST STEPS WHICH SUPPOSED TO EXEC=
UTE IF THE CONDITION IS SATISFIED</span></em></span></em></span></em></span=
></p><p><span style=3D"color: rgb(153,51,0);"><em><span style=3D"color: rgb=
(153,51,0);"><em><span style=3D"color: rgb(153,51,0);"><em><span style=3D"c=
olor: rgb(153,51,0);"><br></span></em></span></em></span></em></span></p><p=
><span style=3D"color: rgb(153,51,0);"><em><span style=3D"color: rgb(153,51=
,0);"><em><span style=3D"color: rgb(153,51,0);"><em><span style=3D"color: r=
gb(153,51,0);"><br></span></em></span></em></span></em></span></p><p> =
&nb=
sp; <span style=3D"color: rgb(153,51,0);"> { "endif": {</s=
pan></p><p><span style=3D"color: rgb(153,51,0);"> &n=
bsp;  =
; </span></p><p><span style=3D"col=
or: rgb(153,51,0);"> &=
nbsp; &nbs=
p; } </span></p><p><span style=3D"color: rgb(153,51,0);"> =
&nb=
sp; }</span></p></th>
<th class=3D"confluenceTh"><p>if-else (If .. else):</p><p> // If block=
</p><p> &n=
bsp; <span style=3D"color: rgb(15=
3,51,0);"><em>{ "if": {</em></span></p><p><span style=3D"color: rgb(1=
53,51,0);"><em> =
&nb=
sp; "expression": ""<span style=3D"color: rgb(153,5=
1,0);"><em> </em></span></em></span></p><p><span style=3D"color: rgb(153,51=
,0);"><em><span style=3D"color: rgb(153,51,0);"><em>  =
; &n=
bsp;  =
; }</em></span></em></span></p><p><span style=3D"color: r=
gb(153,51,0);"><em><span style=3D"color: rgb(153,51,0);"><em> &n=
bsp;  =
; <span style=3D"color: rgb(153,51,0);"><em><span style=
=3D"color: rgb(153,51,0);"><em> }</em></span></em></span></em></span><=
/em></span></p><p><br></p><p><span style=3D"color: rgb(153,51,0);"><em><spa=
n style=3D"color: rgb(153,51,0);"><em><span style=3D"color: rgb(153,51,0);"=
><em><span style=3D"color: rgb(153,51,0);">.................... CAN HAVE LI=
ST STEPS WHICH SUPPOSED TO EXECUTE IF THE CONDITION IS SATISFIED</span></em=
></span></em></span></em></span></p><p><br></p><p><span style=3D"color: rgb=
(153,51,0);"> &n=
bsp; { "else": {</span></p><p><span style=3D"color: rgb(1=
53,51,0);"> &nbs=
p; &=
nbsp; }</span></p><p><span style=
=3D"color: rgb(153,51,0);"> =
},</span></p><p><span style=
=3D"color: rgb(153,51,0);"><em><span style=3D"color: rgb(153,51,0);"><em><s=
pan style=3D"color: rgb(153,51,0);"><em><span style=3D"color: rgb(153,51,0)=
;">.................... CAN HAVE LIST STEPS WHICH SUPPOSED TO EXECUTE IF TH=
E CONDITION IS not SATISFIED</span></em></span></em></span></em></span></p>=
<p> =
<span style=3D"color: rgb(153,51,0);"> { "end=
if": {</span></p><p><span style=3D"color: rgb(153,51,0);">  =
; &n=
bsp; </span></p><p><span sty=
le=3D"color: rgb(153,51,0);"> &nbs=
p; &=
nbsp; } </span></p><p><span style=3D"color: rgb(153,51,0);">&nb=
sp; =
}</span></p></th>
<th class=3D"confluenceTh"><p>if ladder (if .. elseif)</p><p> &n=
bsp; <span style=3D"c=
olor: rgb(153,51,0);"><em>{ "if": {</em></span></p><p><span style=3D"=
color: rgb(153,51,0);"><em> =
&nb=
sp; "expression": ""<span style=3D"colo=
r: rgb(153,51,0);"><em> </em></span></em></span></p><p><span style=3D"color=
: rgb(153,51,0);"><em><span style=3D"color: rgb(153,51,0);"><em>  =
; &n=
bsp;  =
; }</em></span></em></span></p><p><span style=
=3D"color: rgb(153,51,0);"><em><span style=3D"color: rgb(153,51,0);"><em>&n=
bsp;  =
; <span style=3D"color: rgb(153,51,0);"><em><=
span style=3D"color: rgb(153,51,0);"><em> }</em></span></em></span></e=
m></span></em></span></p><p><span style=3D"color: rgb(153,51,0);"><em><span=
style=3D"color: rgb(153,51,0);"><em><span style=3D"color: rgb(153,51,0);">=
<em><span style=3D"color: rgb(153,51,0);">.................... CAN HAVE LIS=
T STEPS WHICH SUPPOSED TO EXECUTE IF THE CONDITION IS SATISFIED</span></em>=
</span></em></span></em></span></p><p><br></p><p><span style=3D"color: rgb(=
153,51,0);"> &nb=
sp; { "elseif": {</span></p><p><span style=3D"color: rgb(=
153,51,0);"><em>  =
; &n=
bsp; "expression": ""</em><span style=3D"color: rgb(153,5=
1,0);"><em> </em></span></span></p><p><span style=3D"color: rgb(153,51,0);"=
> &n=
bsp;  =
; }</span></p><p><span style=3D"color: r=
gb(153,51,0);"> =
},</span></p><p><span style=3D"color: r=
gb(153,51,0);"><em><span style=3D"color: rgb(153,51,0);"><em><span style=3D=
"color: rgb(153,51,0);"><em><span style=3D"color: rgb(153,51,0);">.........=
........... CAN HAVE LIST STEPS WHICH SUPPOSED TO EXECUTE once else if=
CONDITION IS SATISFIED</span></em></span></em></span></em></span></p><p><b=
r></p><p><span style=3D"color: rgb(153,51,0);"> &nbs=
p; { "else": {</span>=
</p><p><span style=3D"color: rgb(153,51,0);"> =
&nb=
sp; =
}</span></p><p><span style=3D"color: rgb(153,51,0);"> &nbs=
p; &=
nbsp;},</span></p><p><span style=3D"color: rgb(153,51,0);"><em><span style=
=3D"color: rgb(153,51,0);"><em><span style=3D"color: rgb(153,51,0);"><em><s=
pan style=3D"color: rgb(153,51,0);">.................... CAN HAVE LIST STEP=
S WHICH SUPPOSED TO EXECUTE if non of the above expression IS not=
SATISFIED</span></em></span></em></span></em></span></p><p> &nb=
sp; <span style=3D"color: rgb(153,51,0);=
"> { "endif": {</span></p><=
p><span style=3D"color: rgb(153,51,0);">  =
; &n=
bsp; <span style=3D"color: rgb(153,51,0);"> &nb=
sp; } </span></span></p><p><span style=3D"colo=
r: rgb(153,51,0);"> &n=
bsp; }</span></p><p> </p></th>
</tr>
</tbody>
</table>
</div>
<p class=3D"auto-cursor-target">Mandatory Fields</p>
<p class=3D"auto-cursor-target">expression - expression is mandatory field.=
the value for the expression field should be inline function which should =
return only Boolean value (true/false).</p>
<p class=3D"auto-cursor-target">Note : there is operator introduced. instea=
d of operator we are leveraging with inline functions. Please refer inline =
function page for more details. </p>
<p class=3D"auto-cursor-target"><strong>Loop Statement : <br></strong></p>
<p class=3D"auto-cursor-target"> Hub Framework has a capability to exe=
cute group steps by using the loop statement. </p>
<p class=3D"auto-cursor-target"><strong>Syntax:<br></strong></p>
<div class=3D"table-wrap">
<table class=3D"relative-table wrapped confluenceTable" style=3D"width: 39.=
17%;">
<colgroup>
<col style=3D"width: 99.95%;">
</colgroup>
<tbody>
<tr>
<th class=3D"confluenceTh"><p><span style=3D"color: rgb(0,0,0);">//below sy=
ntax represents the loop start</span></p><p><span style=3D"color: rgb(153,5=
1,0);"><br></span></p><p><span style=3D"color: rgb(153,51,0);">{ </span></p=
><p><br></p><p><span style=3D"color: rgb(153,51,0);"> &nbs=
p; "loopstart":</span></p><p><span style=3D"color: rgb(15=
3,51,0);"> { </span></p><p><span style=
=3D"color: rgb(153,51,0);"> =
"loopName": " ", </span></p><p><span style=3D"color: rgb(153,51,0);"=
> "loopSourceName": " ",</s=
pan></p><p><span style=3D"color: rgb(153,51,0);"> &n=
bsp; "loopLength":" "</span></p><p><span style=3D"c=
olor: rgb(153,51,0);"> }</span></p=
><p><span style=3D"color: rgb(153,51,0);">}</span></p><p><span style=3D"col=
or: rgb(0,0,0);"><span style=3D"color: rgb(153,51,0);"><em><span style=3D"c=
olor: rgb(153,51,0);"><em><span style=3D"color: rgb(153,51,0);"><em><span s=
tyle=3D"color: rgb(153,51,0);">.................... CAN HAVE LIST STEPS WHI=
CH SUPPOSED TO EXECUTE BASED ON THE LOOP SIZE</span></em></span></em></span=
></em></span></span></p><p><span style=3D"color: rgb(0,0,0);">//below synta=
x represents the loop end</span></p><p><span style=3D"color: rgb(153,51,0);=
">{ </span></p><p><span style=3D"color: rgb(153,51,0=
);"> "loopend":</span></p><p><span sty=
le=3D"color: rgb(153,51,0);"> &nb=
sp;{ </span></p><p><span style=3D"color: rgb(153,51,=
0);"> "name": " "&nbs=
p; </span></p><p><span style=3D"color: rgb(153,51,0);"> &nb=
sp; } </span></p><p><span style=3D=
"color: rgb(153,51,0);"><span style=3D"color: rgb(153,51,0);"> }</span=
></span></p><p><span style=3D"color: rgb(153,51,0);"> &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; &nbs=
p; &=
nbsp; </span></p></th>
</tr>
</tbody>
</table>
</div>
<p class=3D"auto-cursor-target">Mandatory Fields :</p>
<p class=3D"auto-cursor-target">loopName : Any unique name should be given =
as the name of the loop.</p>
<p class=3D"auto-cursor-target">loopSourceName : Any response alias name sh=
ould be given.</p>
<p class=3D"auto-cursor-target">name: loopName and name should be same to i=
dentify the begging and ending the loop.</p>
<p class=3D"auto-cursor-target">Optional Field:</p>
<p class=3D"auto-cursor-target">if we want execute the loop for the fixed n=
umber of iteration the we declare the below variable in the json.</p>
<p class=3D"auto-cursor-target">loopLength : Length of the loop.</p>
<p><br></p>
<p><strong>Conditional Loop Statement :</strong></p>
<p>Hub Framework has a capability to execute group of steps by making certa=
in decision.</p>
<ul>
<li>do-while : The expression appears at the end of the loop, so the statem=
ents in the loop execute once before the expression is tested.<br>If the ex=
pression is true, the control jumps back up to do statement, and the statem=
ents in the loop execute again.</li>
</ul>
<p><strong>Syntax:</strong></p>
<div class=3D"table-wrap">
<table class=3D"relative-table wrapped confluenceTable" style=3D"width: 39.=
8888%;">
<colgroup>
<col style=3D"width: 100.012%;">
</colgroup>
<tbody>
<tr>
<th class=3D"confluenceTh"><p>//below syntax represents the loop start</p><=
p> <span style=3D"color: rgb(153,51,0);"> {</span></=
p><p><span style=3D"color: rgb(153,51,0);"> &n=
bsp; "do": {</span></p><p><span style=3D"color: rgb(153,51,0);"> =
; }</span></p><=
p><span style=3D"color: rgb(153,51,0);"> },</=
span></p><p><span style=3D"color: rgb(153,51,0);"> =
</span></p><p><span style=3D"color: rgb(153,51,0);">  =
; .....Can have list of steps which supposed to execute based on whil=
e condition.</span></p><p><span style=3D"color: rgb(153,51,0);">  =
; </span></p><p><span style=3D"color: rgb(153,51,0);">&nb=
sp; {</span></p><p><span style=3D"color: rgb(153,51,0);">=
"while": {</span></p><p><span st=
yle=3D"color: rgb(153,51,0);"> &nb=
sp; "expression": " ",</span></p><p><span style=3D"color: rgb(153,51,=
0);"> "counter": numb=
er</span></p><p><span style=3D"color: rgb(153,51,0);"> &nb=
sp; }</span></p></th>
</tr>
<tr>
<td colspan=3D"1" class=3D"confluenceTd"><br></td>
</tr>
</tbody>
</table>
</div>
<p><strong>Mandatory Fields :</strong></p>
<p><strong>expression</strong> : value for the expression field should be i=
nline function which should return only Boolean value (true/false) ,Loop re=
peats until the condition returns false.</p>
<p>example : "expression": "$notequal(${StatusChangeTrigger.result[0].PROCE=
SS_STATUS_CD},C)"</p>
<p><strong>counter</strong> : (<strong>Mandatory</strong>)Maximum number of=
times require to check the condition (To Limit the no of loops).</p>
<p><br></p>
<p><br></p>
</div>
</body>
</html>
------=_Part_16701_1341797344.1540846007999--