-
Notifications
You must be signed in to change notification settings - Fork 1
/
CreateVirtualizationClient.xml
664 lines (664 loc) · 60 KB
/
CreateVirtualizationClient.xml
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
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
<?xml version="1.0" encoding="UTF-8"?>
<Workflow_WorkflowDefinition apiMode="0" config="<configuration />"
description="Workflow to create a virtualization client"
executeOnWeb="0"
inputs="<inputs><CompanyName class="java.lang.String" _list_="false" /><SDDCName class="java.lang.String" _list_="false" /><SDDCUserName class="java.lang.String" _list_="false" /><NoOfNodes class="java.lang.Integer" _list_="false" /><ovaPath class="java.lang.String" _list_="false" /><ProxyClient class="commvault.msgs.CvEntities.ClientEntity" _list_="false"><clientName /><clientId /><displayName /></ProxyClient><vmHost class="java.lang.String" _list_="false" /><vmNetwork class="java.lang.String" _list_="false" /><dataStore class="java.lang.String" _list_="false" /><resourcePool class="java.lang.String" _list_="false" /><dataCenterName class="java.lang.String" _list_="false" /><ExecutedFromAPI class="java.lang.String" _list_="false">false</ExecutedFromAPI><SDDCPassword class="workflow.types.EncryptedString" _list_="false" /><contentLibraryName class="java.lang.String" _list_="false" /><gatewayClientGroup class="java.lang.String" _list_="false" /><vmName class="java.lang.String" _list_="false"></vmName></inputs>"
interactive="0" isHtmlDescription="0" manualPercentageComplete="0"
name="CreateVirtualizationClient"
outputs="<outputs><MAList class="java.lang.String" _list_="true" /></outputs>"
revision="$Revision: $" tags=""
uniqueGuid="022002e5-cd51-4a5f-b829-5a5be9282a74"
variables="<variables><clients class="java.lang.String" _list_="true" /><Password class="java.lang.String" _list_="false" /><AuthCode class="java.lang.String" _list_="false" /><hypervisorId class="java.lang.Integer" _list_="false" /><OrganizationId class="java.lang.Integer" _list_="false" /><NodeRange class="java.lang.Integer" _list_="true" /><NodeList class="java.lang.String" _list_="true" /><simPackageId class="java.lang.String" _list_="false" /><VMname class="java.lang.String" _list_="false" /><SDDCPassword class="java.lang.String" _list_="false" /></variables>"
webHidden="0" workflowId="0">
<schema>
<outputs className="" name="outputs" type="">
<children attribute="0" className="java.lang.String"
controlType="0" defaultValue="" displayName=""
documentation="" hidden="0" inputType="java.lang.String"
listType="1" name="MAList" readOnly="0" type="{http://www.w3.org/2001/XMLSchema}string"/>
</outputs>
<variables attribute="0" className="" name="variables" type="">
<children attribute="0" className="java.lang.String"
controlType="0" defaultValue="" displayName=""
documentation="" hidden="0" inputType="java.lang.String"
listType="1" name="clients" readOnly="0" type="{http://www.w3.org/2001/XMLSchema}string"/>
<children attribute="0" className="java.lang.String"
controlType="0" defaultValue="" displayName=""
hidden="0" inputType="java.lang.String" listType="0"
name="Password" type="{http://www.w3.org/2001/XMLSchema}string"/>
<children attribute="0" className="java.lang.String"
controlType="0" defaultValue="" displayName=""
hidden="0" inputType="java.lang.String" listType="0"
name="AuthCode" type="{http://www.w3.org/2001/XMLSchema}string"/>
<children attribute="0" className="java.lang.Integer"
controlType="0" defaultValue="" displayName=""
hidden="0" inputType="java.lang.Integer" listType="0"
name="hypervisorId" type="{http://www.w3.org/2001/XMLSchema}integer"/>
<children attribute="0" className="java.lang.Integer"
controlType="0" defaultValue="" displayName=""
hidden="0" inputType="java.lang.Integer" listType="0"
name="OrganizationId" type="{http://www.w3.org/2001/XMLSchema}integer"/>
<children attribute="0" className="java.lang.Integer"
controlType="0" defaultValue="" displayName=""
hidden="0" inputType="java.lang.Integer" listType="1"
name="NodeRange" type="{http://www.w3.org/2001/XMLSchema}integer"/>
<children attribute="0" className="java.lang.String"
controlType="0" defaultValue="" displayName=""
hidden="0" inputType="java.lang.String" listType="1"
name="NodeList" type="{http://www.w3.org/2001/XMLSchema}string"/>
<children attribute="0" className="java.lang.String"
controlType="0" defaultValue="" displayName=""
hidden="0" inputType="java.lang.String" listType="0"
name="simPackageId" type="{http://www.w3.org/2001/XMLSchema}string"/>
<children attribute="0" className="java.lang.String"
controlType="0" defaultValue="" displayName=""
hidden="0" inputType="java.lang.String" listType="0"
name="VMname" type="{http://www.w3.org/2001/XMLSchema}string"/>
<children attribute="0" className="java.lang.String"
controlType="0" defaultValue="" hidden="0"
inputType="java.lang.String" listType="0"
name="SDDCPassword" type="{http://www.w3.org/2001/XMLSchema}string"/>
</variables>
<inputs attribute="0" className="" name="inputs" type="">
<children attribute="0" className="java.lang.String"
controlHidden="0" controlType="0" defaultValue=""
displayName="" documentation="" hidden="0"
inputType="java.lang.String" listType="0"
maximumValue="" minimumValue="" name="CompanyName"
readOnly="0" required="1" searchable="0" type="{http://www.w3.org/2001/XMLSchema}string"/>
<children attribute="0" className="java.lang.String"
controlHidden="0" controlType="0" defaultValue=""
displayName="" documentation="" hidden="0"
inputType="java.lang.String" listType="0"
maximumValue="" minimumValue="" name="SDDCName"
readOnly="0" required="1" searchable="0" type="{http://www.w3.org/2001/XMLSchema}string"/>
<children attribute="0" className="java.lang.String"
controlHidden="0" controlType="0" defaultValue=""
displayName="" documentation="" hidden="0"
inputType="java.lang.String" listType="0"
maximumValue="" minimumValue="" name="SDDCUserName"
readOnly="0" required="1" searchable="0" type="{http://www.w3.org/2001/XMLSchema}string"/>
<children attribute="0"
className="workflow.types.EncryptedString"
controlHidden="0" controlType="0" defaultValue=""
displayName="" documentation="" hidden="0"
inputType="workflow.types.EncryptedString" listType="0"
maximumValue="" minimumValue="" name="SDDCPassword"
readOnly="0" required="1" searchable="0" type="{workflow.types}EncryptedString"/>
<children attribute="0" className="java.lang.Integer"
controlHidden="0" controlType="0" defaultValue=""
displayName="" documentation="" hidden="0"
inputType="java.lang.Integer" listType="0"
maximumValue="" minimumValue="" name="NoOfNodes"
readOnly="0" required="1" searchable="0" type="{http://www.w3.org/2001/XMLSchema}integer"/>
<children attribute="0" className="java.lang.String"
controlHidden="0" controlType="0" defaultValue=""
displayName="" documentation="" hidden="0"
inputType="java.lang.String" listType="0"
maximumValue="" minimumValue="" name="ovaPath"
readOnly="0" required="0" searchable="0" type="{http://www.w3.org/2001/XMLSchema}string"/>
<children attribute="0"
className="commvault.msgs.CvEntities.ClientEntity"
controlHidden="0" controlType="2" defaultValue=""
displayName="" documentation="" hidden="0"
inputType="commvault.msgs.CvEntities.ClientEntity"
listType="0" maximumValue="" minimumValue=""
name="ProxyClient" readOnly="0" required="0"
searchable="0" type="{commvault.msgs.CvEntities}ClientEntity">
<children attribute="0" className="java.lang.String"
defaultValue="" inputType="java.lang.String"
listType="0" name="clientName" type="{http://www.w3.org/2001/XMLSchema}string"/>
<children attribute="0" className="java.lang.String"
defaultValue="" inputType="java.lang.String"
listType="0" name="displayName" type="{http://www.w3.org/2001/XMLSchema}string"/>
<children attribute="0" className="java.lang.Integer"
defaultValue="" inputType="java.lang.Integer"
listType="0" name="clientId" type="{http://www.w3.org/2001/XMLSchema}integer"/>
</children>
<children attribute="0" className="java.lang.String"
controlHidden="0" controlType="0" defaultValue=""
displayName="ESX/Cluster" documentation="" hidden="0"
inputType="java.lang.String" listType="0"
maximumValue="" minimumValue="" name="vmHost"
readOnly="0" required="0" searchable="0" type="{http://www.w3.org/2001/XMLSchema}string"/>
<children attribute="0" className="java.lang.String"
controlHidden="0" controlType="0" defaultValue=""
displayName="Network" documentation="" hidden="0"
inputType="java.lang.String" listType="0"
maximumValue="" minimumValue="" name="vmNetwork"
readOnly="0" required="0" searchable="0" type="{http://www.w3.org/2001/XMLSchema}string"/>
<children attribute="0" className="java.lang.String"
controlHidden="0" controlType="0" defaultValue=""
displayName="Datastore" documentation="" hidden="0"
inputType="java.lang.String" listType="0"
maximumValue="" minimumValue="" name="dataStore"
readOnly="0" required="0" searchable="0" type="{http://www.w3.org/2001/XMLSchema}string"/>
<children attribute="0" className="java.lang.String"
controlHidden="0" controlType="0" defaultValue=""
displayName="ResourcePool" documentation="" hidden="0"
inputType="java.lang.String" listType="0"
maximumValue="" minimumValue="" name="resourcePool"
readOnly="0" required="0" searchable="0" type="{http://www.w3.org/2001/XMLSchema}string"/>
<children attribute="0" className="java.lang.String"
controlHidden="0" controlType="0" defaultValue=""
displayName="" documentation="" hidden="0"
inputType="java.lang.String" listType="0"
maximumValue="" minimumValue="" name="dataCenterName"
readOnly="0" required="0" searchable="0" type="{http://www.w3.org/2001/XMLSchema}string"/>
<children attribute="0" className="java.lang.String"
controlHidden="1" controlType="0" defaultValue=""
displayName="" documentation="" hidden="0"
inputType="java.lang.String" listType="0"
maximumValue="" minimumValue="" name="ExecutedFromAPI"
readOnly="0" required="0" searchable="0" type="{http://www.w3.org/2001/XMLSchema}string"/>
<children attribute="0" className="java.lang.String"
controlType="0" defaultValue="" displayName=""
hidden="0" inputType="java.lang.String" listType="0"
name="contentLibraryName" type="{http://www.w3.org/2001/XMLSchema}string"/>
<children attribute="0" className="java.lang.String"
controlType="0" defaultValue="" displayName=""
documentation="" hidden="0" inputType="java.lang.String"
listType="0" name="gatewayClientGroup" readOnly="0" type="{http://www.w3.org/2001/XMLSchema}string"/>
<children attribute="0" className="java.lang.String"
controlType="0" defaultValue="" hidden="0"
inputType="java.lang.String" listType="0" name="vmName" type="{http://www.w3.org/2001/XMLSchema}string"/>
</inputs>
<config className="" name="configuration" type=""/>
</schema>
<Start commented="0" continueOnFailure="0" created="0"
description="" displayName="Start" height="36" interactive="0"
jobMode="0" name="Start" originalStyle="" skipAttempt="0"
style="image;image=/images/jgraphx/house.png"
uniqueName="Start_1" waitSetting="0" width="58" x="45" y="41">
<onExit language="4" script="if(xpath:{/workflow/inputs/ExecutedFromAPI}.contains("true"))
{
 workflow.setVariable("SDDCPassword",xpath:{/workflow/inputs/SDDCPassword}.toString());
}
else
{
 workflow.types.EncryptedString e = xpath:{/workflow/inputs/SDDCPassword};
 workflow.setVariable("SDDCPassword",(e.getPlainText()).toString());
}
"/>
<inputs val="<inputs />"/>
<transition activity="ImpersonateCreator_2" commented="0"
description="" originalStyle="" points="" sourceX="74"
sourceY="59" status="0" style="defaultEdge" targetX="77"
targetY="130" transitionIndex="0" x="0" y="0">
<condition language="4" script="/*
The expression should return a boolean. Use the variable name "activity" to refer to the previous activity object. Example:
activity.exitCode==0;
*/
"/>
</transition>
</Start>
<Activity commented="0" continueOnFailure="0"
created="1589870756656"
description="activity to execute code snippets in the selected language"
displayName="Client list" height="34" interactive="0"
jobMode="0" name="Script"
namespaceUri="commvault.cte.workflow.activities"
originalStyle="" skipAttempt="0"
style="label;image=commvault.cte.workflow.activities.ScriptActivity"
uniqueName="Script_1" waitSetting="0" width="100" x="191" y="170">
<inputs val="<inputs><script language="1" script="import java.util.*;&#xD;&#xA;import java.io.*;&#xD;&#xA;&#xD;&#xA;String temp = &quot;&quot;;&#xD;&#xA;try&#xD;&#xA;{&#xD;&#xA;a = xpath:{/workflow/CommServDBQuery_2/resultSets/row}.toArray();&#xD;&#xA;if (xpath:{/workflow/inputs/ProxyClient/clientName}!= null &amp;&amp; xpath:{/workflow/inputs/ProxyClient/clientName} != &quot;&quot;)&#xD;&#xA;{&#xD;&#xA; a1 = xpath:{/workflow/inputs/ProxyClient/clientId};&#xD;&#xA; a= new int[1];&#xD;&#xA; a[0] = a1;&#xD;&#xA;}&#xD;&#xA;int len = a.length;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;for(int i =0; i&lt; len ; i++)&#xD;&#xA;{&#xD;&#xA;&#xD;&#xA; temp = temp + &quot;\n&quot; + &quot;&lt;associatedClients clientId=\&quot;&quot; + a[i] + &quot;\&quot; /&gt;&quot;;&#xD;&#xA;}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;catch(NullPointerException e)&#xD;&#xA;{&#xD;&#xA;logger.info(&quot;Caught NullPointerException&quot;);&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;return temp;&#xD;&#xA;&#xD;&#xA;" /></inputs>"/>
<transition activity="HttpClient_4" commented="0" description=""
originalStyle="" points="" sourceX="224" sourceY="212"
status="0" style="defaultEdge" targetX="225" targetY="290"
transitionIndex="0" x="0" y="0">
<condition language="1" script="/*
The expression should return a boolean. Use the variable name "activity" to refer to the previous activity object. Example:
activity.exitCode==0;
*/
"/>
</transition>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1589873739051" description="performs http operations"
displayName="Create client group" height="34" interactive="0"
jobMode="0" name="HttpClient"
namespaceUri="commvault.cte.workflow.activities"
originalStyle="" skipAttempt="0"
style="label;image=commvault.cte.workflow.activities.HttpClientActivity"
uniqueName="HttpClient_4" waitSetting="0" width="138" x="350" y="10">
<inputs val="<inputs><request><url>/ClientGroup</url><method>POST</method><postType>Raw</postType><postContent>&lt;App_PerformClientGroupReq clientGroupOperationType="1"&gt;
 &lt;clientGroupDetail isSmartClientGroup="0" associatedClientsOperationType="1" isDiscoveredClientGroup="0"&gt;
 &lt;clientGroup clientGroupName="VSAAccessNodes-xpath:{/workflow/inputs/CompanyName}-Group" /&gt;
 xpath:{/workflow/Script_1/output}
 &lt;/clientGroupDetail&gt;
&lt;/App_PerformClientGroupReq&gt;</postContent><postContentType>application/xml; charset=UTF-8</postContentType><headers><name>Authtoken</name><value>QSDKONLY xpath:{/workflow/system/token}</value></headers><headers><name>Accept</name><value>application/xml</value></headers></request></inputs>"/>
<transition activity="XPathQuery_2" commented="0" description=""
originalStyle="" points="" sourceX="235" sourceY="265"
status="0" style="defaultEdge" targetX="441" targetY="244"
transitionIndex="0" x="0" y="0">
<condition language="1" script="/*
The expression should return a boolean. Use the variable name "activity" to refer to the previous activity object. Example:
activity.exitCode==0;
*/
"/>
</transition>
<onEnter language="1" script="logger.info(xpath:{/workflow/Script_1/output});"/>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1589880992441"
description="retrieves a list of values from xml"
displayName="Client Group ID" height="34" interactive="0"
jobMode="0" name="XPathQuery"
namespaceUri="commvault.cte.workflow.activities"
originalStyle="" skipAttempt="0"
style="label;image=commvault.cte.workflow.activities.XMLQueryActivity"
uniqueName="XPathQuery_2" waitSetting="0" width="135" x="360" y="74">
<inputs val="<inputs><xml class="java.lang.String" _list_="false">xpath:{/workflow/HttpClient_4/output}</xml><xpath class="java.lang.String" _list_="false">/App_PerformClientGroupResp/clientGroupDetail/clientGroup/@clientGroupId</xpath><outputType class="workflow.types.SimpleType" _list_="false">Integer</outputType><outputAsList class="java.lang.Boolean" _list_="false">false</outputAsList></inputs>"/>
<transition activity="DisableLogging_1" commented="0"
description="" originalStyle="" points="" sourceX="427"
sourceY="91" status="0" style="defaultEdge" targetX="422"
targetY="141" transitionIndex="0" x="0" y="0">
<condition language="1" script="/*
The expression should return a boolean. Use the variable name "activity" to refer to the previous activity object. Example:
activity.exitCode==0;
*/
"/>
</transition>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1589883228370" description=""
displayName="Create Hypervisor" height="34" interactive="0"
jobMode="0" name="Execute"
namespaceUri="commvault.cte.workflow.activities.cmd.operation"
originalStyle="" skipAttempt="0"
style="label;image=commvault.cte.workflow.activities.cmd.operation.OperationExecute"
uniqueName="Execute_2" waitSetting="0" width="132" x="351" y="177">
<inputs val="<inputs><inputXml class="java.lang.String" _list_="false">&lt;App_CreatePseudoClientRequest&gt;&#xD;
 &lt;clientInfo clientType="12"&gt;&#xD;
 &lt;virtualServerClientProperties&gt;&#xD;
 &lt;virtualServerInstanceInfo vsInstanceType="1"&gt;&#xD;
 &lt;vmwareVendor vcenterHostName="xpath:{/workflow/inputs/SDDCName}"&gt;&#xD;
 &lt;virtualCenter userName="xpath:{/workflow/inputs/SDDCUserName}" password="xpath:{/workflow/variables/SDDCPassword}" /&gt;&#xD;
 &lt;/vmwareVendor&gt;&#xD;
 &lt;associatedClients&gt;&#xD;
 &lt;memberServers&gt;&#xD;
 &lt;client clientGroupId="xpath:{/workflow/XPathQuery_2/result}"/&gt;&#xD;
 &lt;/memberServers&gt;&#xD;
 &lt;/associatedClients&gt;&#xD;
 &lt;/virtualServerInstanceInfo&gt;&#xD;
 &lt;/virtualServerClientProperties&gt;&#xD;
 &lt;/clientInfo&gt;&#xD;
 &lt;entity clientName="xpath:{/workflow/inputs/CompanyName}_xpath:{/workflow/inputs/SDDCName}" /&gt;&#xD;
&lt;/App_CreatePseudoClientRequest&gt;</inputXml><escapeXml class="java.lang.Boolean" _list_="false">false</escapeXml><commandArgs class="java.lang.String" _list_="false" /><sessionOptions class="workflow.types.cmd.SessionOptions" _list_="false"><useImpersonatedAccount class="java.lang.Boolean" _list_="false">true</useImpersonatedAccount><tokenFile class="java.lang.String" _list_="false" /><token class="java.lang.String" _list_="false" /></sessionOptions></inputs>"/>
<transition activity="EnableLogging_1" commented="0"
description="" originalStyle="" points="" sourceX="417"
sourceY="194" status="0" style="defaultEdge" targetX="418"
targetY="242" transitionIndex="0" x="0" y="0">
<condition language="1" script="/*
The expression should return a boolean. Use the variable name "activity" to refer to the previous activity object. Example:
activity.exitCode==0;
*/
"/>
</transition>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1589954557026"
description="retrieves a list of values from xml"
displayName="Hypervisor Name" height="34" interactive="0"
jobMode="0" name="XPathQuery"
namespaceUri="commvault.cte.workflow.activities"
originalStyle="" skipAttempt="0"
style="label;image=commvault.cte.workflow.activities.XMLQueryActivity"
uniqueName="XPathQuery_3" waitSetting="0" width="127" x="355" y="283">
<inputs val="<inputs><xml class="java.lang.String" _list_="false">xpath:{/workflow/Execute_2/outputXml}</xml><xpath class="java.lang.String" _list_="false">/App_CreatePseudoClientResponse/response/entity/clientName</xpath><outputType class="workflow.types.SimpleType" _list_="false">String</outputType><outputAsList class="java.lang.Boolean" _list_="false">false</outputAsList></inputs>"/>
<transition activity="ImpersonateCreator_1" commented="0"
description="" originalStyle="" points="" sourceX="420"
sourceY="215" status="0" style="defaultEdge" targetX="612"
targetY="16" transitionIndex="0" x="0" y="0">
<condition language="1" script="/*
The expression should return a boolean. Use the variable name "activity" to refer to the previous activity object. Example:
activity.exitCode==0;
*/
"/>
</transition>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1589954882618"
description="impersonates the user who created the workflow"
displayName="IC" height="34" interactive="0" jobMode="0"
name="ImpersonateCreator"
namespaceUri="commvault.cte.workflow.activities"
originalStyle="" skipAttempt="0"
style="label;image=commvault.cte.workflow.activities.ImpersonateCreator"
uniqueName="ImpersonateCreator_1" waitSetting="0" width="69"
x="578" y="8">
<inputs val="<inputs />"/>
<transition activity="CommServDBQuery_1" commented="0"
description="" originalStyle="" points="" sourceX="650"
sourceY="25" status="0" style="defaultEdge" targetX="651"
targetY="89" transitionIndex="0" x="0" y="0">
<condition language="1" script="/*
The expression should return a boolean. Use the variable name "activity" to refer to the previous activity object. Example:
activity.exitCode==0;
*/
"/>
</transition>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1589954901321"
description="executes queries against a commcell database"
displayName="InstanceID" height="34" interactive="0" jobMode="0"
name="CommServDBQuery"
namespaceUri="commvault.cte.workflow.activities"
originalStyle="" skipAttempt="0"
style="label;image=commvault.cte.workflow.activities.CommServDBQuery"
uniqueName="CommServDBQuery_1" waitSetting="0" width="120"
x="547" y="67">
<onExit language="1" script="String sql = "select id from app_client where name = '" + xpath:{/workflow/XPathQuery_3/result} + "'";
 DataSet rs = csdb.execute(sql);
 int hypervisorId = 0;
 while(rs.hasNext()) {
 hypervisorId = rs.get("id");
 }
 workflow.setVariable("hypervisorId", hypervisorId); "/>
<inputs val="<inputs><commCell /><query>select top 1 instance from app_application where clientId = (select id from app_client where name = 'xpath:{/workflow/XPathQuery_3/result}') and appTypeId = 106</query></inputs>"/>
<transition activity="ImpersonateExecutor_1" commented="0"
description="" originalStyle="" points="" sourceX="607"
sourceY="84" status="0" style="defaultEdge" targetX="614"
targetY="146" transitionIndex="0" x="0" y="0">
<condition language="1" script="/*
The expression should return a boolean. Use the variable name "activity" to refer to the previous activity object. Example:
activity.exitCode==0;
*/
"/>
</transition>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1589955747611" description=""
displayName="Replace nodes" height="34" interactive="0"
jobMode="0" name="Execute"
namespaceUri="commvault.cte.workflow.activities.cmd.operation"
originalStyle="" skipAttempt="0"
style="label;image=commvault.cte.workflow.activities.cmd.operation.OperationExecute"
uniqueName="Execute_3" waitSetting="0" width="114" x="562" y="262">
<inputs val="<inputs><inputXml class="java.lang.String" _list_="false">&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;App_UpdateInstancePropertiesRequest&gt;&#xD;
 &lt;instanceProperties&gt;&#xD;
 &lt;virtualServerInstance&gt;&#xD;
 &lt;associatedClients&gt;&#xD;
 xpath:{/workflow/Script_2/output}&#xD;
 &lt;/associatedClients&gt;&#xD;
 &lt;/virtualServerInstance&gt;&#xD;
 &lt;/instanceProperties&gt;&#xD;
 &lt;association&gt;&#xD;
 &lt;entity instanceId = "xpath:{/workflow/CommServDBQuery_1/resultSets/row/col}"/&gt;&#xD;
 &lt;/association&gt;&#xD;
&lt;/App_UpdateInstancePropertiesRequest&gt;&#xD;
</inputXml><escapeXml class="java.lang.Boolean" _list_="false">false</escapeXml><commandArgs class="java.lang.String" _list_="false" /><sessionOptions class="workflow.types.cmd.SessionOptions" _list_="false"><useImpersonatedAccount class="java.lang.Boolean" _list_="false">true</useImpersonatedAccount><tokenFile class="java.lang.String" _list_="false" /><token class="java.lang.String" _list_="false" /></sessionOptions></inputs>"/>
<transition activity="HttpClient_7" commented="0" description=""
originalStyle="" points="" sourceX="619" sourceY="296"
status="0" style="defaultEdge" targetX="619" targetY="324"
transitionIndex="0" x="0" y="0">
<condition language="1" script="/*
The expression should return a boolean. Use the variable name "activity" to refer to the previous activity object. Example:
activity.exitCode==0;
*/
"/>
</transition>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1589959637008"
description="impersonates the user who executes the workflow"
displayName="IE" height="34" interactive="0" jobMode="0"
name="ImpersonateExecutor"
namespaceUri="commvault.cte.workflow.activities"
originalStyle="" skipAttempt="0"
style="label;image=commvault.cte.workflow.activities.ImpersonateUser"
uniqueName="ImpersonateExecutor_1" waitSetting="0" width="75"
x="575" y="127">
<inputs val="<inputs />"/>
<transition activity="ForEach_1" commented="0" description=""
originalStyle="" points="" sourceX="612" sourceY="144"
status="0" style="defaultEdge" targetX="856" targetY="-2"
transitionIndex="0" x="0" y="0">
<condition language="1" script="/*
The expression should return a boolean. Use the variable name "activity" to refer to the previous activity object. Example:
activity.exitCode==0;
*/
"/>
</transition>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1589960487937" description="Ends the workflow"
displayName="Success" height="34" interactive="0" jobMode="0"
name="WorkflowEnd"
namespaceUri="commvault.cte.workflow.activities"
originalStyle="" skipAttempt="0"
style="label;image=commvault.cte.workflow.activities.EndActivity"
uniqueName="WorkflowEnd_2" waitSetting="0" width="106" x="564" y="459">
<outputs outputs="<outputs><MAList class="java.lang.String" _list_="true">xpath:{/workflow/variables/NodeList}</MAList></outputs>"/>
<inputs val="<inputs><completionStatus class="workflow.types.WorkflowCompletionStatus" _list_="false" /><failureMessage class="java.lang.String" _list_="false" /></inputs>"/>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1589973636300"
description="executes queries against a commcell database"
displayName="Get Nodes" height="34" interactive="0" jobMode="0"
name="CommServDBQuery"
namespaceUri="commvault.cte.workflow.activities"
originalStyle="" skipAttempt="0"
style="label;image=commvault.cte.workflow.activities.CommServDBQuery"
uniqueName="CommServDBQuery_2" waitSetting="0" width="98"
x="202" y="34">
<inputs val="<inputs><commCell /><query>select distinct clientId from simInstalledPackages si&#xD;
left outer join&#xD;
APP_ClientProp ac&#xD;
on&#xD;
si.ClientId = ac.componentNameId and ac.attrName = 'Installation Company ID'&#xD;
where simPackageId xpath:{/workflow/variables/simPackageId} and ac.componentNameId IS NULL </query></inputs>"/>
<transition activity="ImpersonateExecutor_2" commented="0"
description="" originalStyle="" points="" sourceX="219"
sourceY="120" status="0" style="defaultEdge" targetX="216"
targetY="193" transitionIndex="0" x="0" y="0">
<condition language="1" script="/*
The expression should return a boolean. Use the variable name "activity" to refer to the previous activity object. Example:
activity.exitCode==0;
*/
"/>
</transition>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1589974640230"
description="impersonates the user who created the workflow"
displayName="IC" height="34" interactive="0" jobMode="0"
name="ImpersonateCreator"
namespaceUri="commvault.cte.workflow.activities"
originalStyle="" skipAttempt="0"
style="label;image=commvault.cte.workflow.activities.ImpersonateCreator"
uniqueName="ImpersonateCreator_2" waitSetting="0" width="69"
x="31" y="112">
<inputs val="<inputs />"/>
<transition activity="CommServDBQuery_3" commented="0"
description="" originalStyle="" points="" sourceX="65"
sourceY="129" status="0" style="defaultEdge" targetX="79"
targetY="211" transitionIndex="0" x="0" y="0">
<condition language="1" script="/*
The expression should return a boolean. Use the variable name "activity" to refer to the previous activity object. Example:
activity.exitCode==0;
*/
"/>
</transition>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1589974671013"
description="impersonates the user who executes the workflow"
displayName="IE" height="34" interactive="0" jobMode="0"
name="ImpersonateExecutor"
namespaceUri="commvault.cte.workflow.activities"
originalStyle="" skipAttempt="0"
style="label;image=commvault.cte.workflow.activities.ImpersonateUser"
uniqueName="ImpersonateExecutor_2" waitSetting="0" width="75"
x="198" y="101">
<inputs val="<inputs />"/>
<transition activity="Script_1" commented="0" description=""
originalStyle="" points="" sourceX="220" sourceY="190"
status="0" style="defaultEdge" targetX="222" targetY="237"
transitionIndex="0" x="0" y="0">
<condition language="1" script="/*
The expression should return a boolean. Use the variable name "activity" to refer to the previous activity object. Example:
activity.exitCode==0;
*/
"/>
</transition>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1590057744588"
description="turns off all logging, except for errors, for current job"
displayName="DisableLogging" height="34" interactive="0"
jobMode="0" name="DisableLogging"
namespaceUri="commvault.cte.workflow.activities"
originalStyle="" skipAttempt="0"
style="label;image=commvault.cte.workflow.activities.LoggingDisable"
uniqueName="DisableLogging_1" waitSetting="0" width="117"
x="363" y="123">
<inputs val="<inputs />"/>
<transition activity="Execute_2" commented="0" description=""
originalStyle="" points="" sourceX="421" sourceY="140"
status="0" style="defaultEdge" targetX="421" targetY="192"
transitionIndex="0" x="0" y="0">
<condition language="1" script="/*
The expression should return a boolean. Use the variable name "activity" to refer to the previous activity object. Example:
activity.exitCode==0;
*/
"/>
</transition>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1590057749224"
description="turns on all logging for the current job"
displayName="EnableLogging" height="34" interactive="0"
jobMode="0" name="EnableLogging"
namespaceUri="commvault.cte.workflow.activities"
originalStyle="" skipAttempt="0"
style="label;image=commvault.cte.workflow.activities.LoggingEnable"
uniqueName="EnableLogging_1" waitSetting="0" width="113" x="367" y="228">
<inputs val="<inputs />"/>
<transition activity="XPathQuery_3" commented="0" description=""
originalStyle="" points="" sourceX="423" sourceY="245"
status="0" style="defaultEdge" targetX="423" targetY="290"
transitionIndex="0" x="0" y="0">
<condition language="1" script="/*
The expression should return a boolean. Use the variable name "activity" to refer to the previous activity object. Example:
activity.exitCode==0;
*/
"/>
</transition>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1590124291805" description="performs http operations"
displayName="Delete Client Group" height="34" interactive="0"
jobMode="0" name="HttpClient"
namespaceUri="commvault.cte.workflow.activities"
originalStyle="" skipAttempt="0"
style="label;image=commvault.cte.workflow.activities.HttpClientActivity"
uniqueName="HttpClient_5" waitSetting="0" width="138" x="536" y="399">
<inputs val="<inputs><request><url>/ClientGroup/xpath:{/workflow/XPathQuery_2/result}</url><method>DELETE</method><postType>Raw</postType><postContent></postContent><postContentType>application/xml; charset=UTF-8</postContentType><headers><name>Authtoken</name><value>QSDKONLY xpath:{/workflow/system/token}</value></headers><headers><name>Accept</name><value>application/json</value></headers></request></inputs>"/>
<transition activity="WorkflowEnd_3" commented="0"
description="" originalStyle="" points="" sourceX="624"
sourceY="278" status="0" style="defaultEdge" targetX="796"
targetY="279" transitionIndex="0" x="0" y="0">
<condition language="1" script="/*
The expression should return a boolean. Use the variable name "activity" to refer to the previous activity object. Example:
activity.exitCode==0;
*/
xpath:{/workflow/HttpClient_5/statusCode}!=200;"/>
</transition>
<transition activity="WorkflowEnd_2" commented="0"
description="" originalStyle="" points="" sourceX="624"
sourceY="278" status="0" style="defaultEdge" targetX="620"
targetY="349" transitionIndex="0" x="0" y="0">
<condition language="1" script="/*
The expression should return a boolean. Use the variable name "activity" to refer to the previous activity object. Example:
activity.exitCode==0;
*/
xpath:{/workflow/HttpClient_5/statusCode}==200;"/>
</transition>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1590124730840" description="Ends the workflow"
displayName="Completed with
Error" height="34"
interactive="0" jobMode="0" name="WorkflowEnd"
namespaceUri="commvault.cte.workflow.activities"
originalStyle="" skipAttempt="0"
style="label;image=commvault.cte.workflow.activities.EndActivity"
uniqueName="WorkflowEnd_3" waitSetting="0" width="118" x="830" y="308">
<inputs val="<inputs><completionStatus class="workflow.types.WorkflowCompletionStatus" _list_="false">COMPLETED_WITH_ERRORS</completionStatus><failureMessage class="java.lang.String" _list_="false">Failed to delete Client Group</failureMessage></inputs>"/>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1590411331367"
description="executes queries against a commcell database"
displayName="Check if CG exists" height="34" interactive="0"
jobMode="0" name="CommServDBQuery"
namespaceUri="commvault.cte.workflow.activities"
originalStyle="" skipAttempt="0"
style="label;image=commvault.cte.workflow.activities.CommServDBQuery"
uniqueName="CommServDBQuery_3" waitSetting="0" width="143" x="6" y="181">
<onExit language="1" script="String PathFinder = xpath:{/workflow/inputs/ovaPath};
if(PathFinder!=null && PathFinder.length()!=0)
{
 if(Character.compare(PathFinder.charAt(0),'/')==0) 
 { workflow.setVariable("simPackageId","= 1136");}
 else
 {workflow.setVariable("simPackageId","= 713");}
}
else{
workflow.setVariable("simPackageId","in (713,1136)");}"/>
<inputs val="<inputs><commCell /><query>select id from APP_ClientGroup where name like 'VSAAccessNodes-xpath:{/workflow/inputs/CompanyName}-Group'</query></inputs>"/>
<transition activity="HttpClient_6" commented="0" description=""
originalStyle="" points="" sourceX="77" sourceY="198"
status="0" style="defaultEdge" targetX="73" targetY="262"
transitionIndex="0" x="0" y="0">
<condition language="1" script="/*
The expression should return a boolean. Use the variable name "activity" to refer to the previous activity object. Example:
activity.exitCode==0;
*/
xpath:{/workflow/CommServDBQuery_3/resultSets/rowCount}!=0;"/>
</transition>
<transition activity="CommServDBQuery_2" commented="0"
description="" originalStyle="" points="" sourceX="77"
sourceY="198" status="0" style="defaultEdge" targetX="203"
targetY="40" transitionIndex="0" x="0" y="0">
<condition language="1" script="/*
The expression should return a boolean. Use the variable name "activity" to refer to the previous activity object. Example:
activity.exitCode==0;
*/
xpath:{/workflow/CommServDBQuery_3/resultSets/rowCount}==0;"/>
</transition>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1590411394958" description="performs http operations"
displayName="Delete Client Group" height="34" interactive="0"
jobMode="0" name="HttpClient"
namespaceUri="commvault.cte.workflow.activities"
originalStyle="" skipAttempt="0"
style="label;image=commvault.cte.workflow.activities.HttpClientActivity"
uniqueName="HttpClient_6" waitSetting="0" width="138" x="4" y="245">
<inputs val="<inputs><request><url>/ClientGroup/xpath:{/workflow/CommServDBQuery_3/resultSets/row/col}</url><method>DELETE</method><postType>Raw</postType><postContent></postContent><postContentType>application/xml; charset=UTF-8</postContentType><headers><name>Authtoken</name><value>QSDKONLY xpath:{/workflow/system/token}</value></headers><headers><name>Accept</name><value>application/json</value></headers></request></inputs>"/>
<transition activity="CommServDBQuery_2" commented="0"
description="" originalStyle="" points="" sourceX="73"
sourceY="262" status="0" style="defaultEdge" targetX="205"
targetY="45" transitionIndex="0" x="0" y="0">
<condition language="1" script="/*
The expression should return a boolean. Use the variable name "activity" to refer to the previous activity object. Example:
activity.exitCode==0;
*/
"/>
</transition>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1590419334592" description="performs http operations"
displayName="UpdateCompany
ForHypervisor" height="30"
interactive="0" jobMode="0" name="HttpClient"
namespaceUri="commvault.cte.workflow.activities"
originalStyle="" skipAttempt="0"
style="label;image=commvault.cte.workflow.activities.HttpClientActivity"
uniqueName="HttpClient_7" waitSetting="0" width="123" x="549" y="338">
<inputs val="<inputs><request><url>/company/xpath:{/workflow/variables/OrganizationId}/company-association</url><method>PUT</method><postType>Raw</postType><postContent>&lt;Api_AssociateCompanyReq&gt;&lt;entities clientName="xpath:{/workflow/XPathQuery_3/result}" clientId="xpath:{/workflow/variables/hypervisorId}" _type_="3" /&gt;&lt;/Api_AssociateCompanyReq&gt;</postContent><postContentType>application/xml; charset=UTF-8</postContentType><headers><name>Authtoken</name><value>QSDKONLY xpath:{/workflow/system/token}</value></headers><headers><name>Accept</name><value>application/xml</value></headers></request></inputs>"/>
<transition activity="XPathQuery_1" commented="0" description=""
originalStyle="" points="" sourceX="610" sourceY="353"
status="0" style="defaultEdge" targetX="475" targetY="364"
transitionIndex="0" x="0" y="0">
<condition language="1" script="/*
The expression should return a boolean. Use the variable name "activity" to refer to the previous activity object. Example:
activity.exitCode==0;
*/
"/>
</transition>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1590038316714"
description="retrieves a list of values from xml"
displayName="XPathQuery" height="34" interactive="0" jobMode="0"
name="XPathQuery"
namespaceUri="commvault.cte.workflow.activities"
originalStyle="" skipAttempt="0"
style="label;image=commvault.cte.workflow.activities.XMLQueryActivity"
uniqueName="XPathQuery_1" waitSetting="0" width="100" x="404" y="350">
<inputs val="<inputs><xml class="java.lang.String" _list_="false">xpath:{/workflow/HttpClient_7/output}</xml><xpath class="java.lang.String" _list_="false">/App_GenericResp/@errorCode</xpath><outputType class="workflow.types.SimpleType" _list_="false">Integer</outputType><outputAsList class="java.lang.Boolean" _list_="false">false</outputAsList></inputs>"/>
<transition activity="WorkflowEnd_4" commented="0"
description="" originalStyle="" points="" sourceX="454"
sourceY="367" status="0" style="defaultEdge" targetX="326"
targetY="419" transitionIndex="0" x="0" y="0">
<condition language="1" script="/*
The expression should return a boolean. Use the variable name "activity" to refer to the previous activity object. Example:
activity.exitCode==0;
*/
xpath:{/workflow/XPathQuery_1/result}!=0;"/>
</transition>
<transition activity="HttpClient_5" commented="0" description=""
originalStyle="" points="454.0,415.0" sourceX="454"
sourceY="367" status="0" style="defaultEdge" targetX="582"
targetY="419" transitionIndex="0" x="0" y="0">
<condition language="1" script="/*
The expression should return a boolean. Use the variable name "activity" to refer to the previous activity object. Example:
activity.exitCode==0;
*/
xpath:{/workflow/XPathQuery_1/result}==0;"/>
</transition>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1590420101425" description="Ends the workflow"
displayName="WorkflowEnd" height="34" interactive="0"
jobMode="0" name="WorkflowEnd"
namespaceUri="commvault.cte.workflow.activities"
originalStyle="" skipAttempt="0"
style="label;image=commvault.cte.workflow.activities.EndActivity"
uniqueName="WorkflowEnd_4" waitSetting="0" width="106" x="274" y="405">
<inputs val="<inputs><completionStatus class="workflow.types.WorkflowCompletionStatus" _list_="false">FAILED</completionStatus><failureMessage class="java.lang.String" _list_="false">failed to update Company for Hypervisor</failureMessage></inputs>"/>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1590470291645"
description="iterates a group of activities over a list of values"
displayName="ForEach Node" height="240" interactive="0"
jobMode="0" name="ForEach"
namespaceUri="commvault.cte.workflow.activities"
originalStyle="" skipAttempt="0" style="swimlane"
uniqueName="ForEach_1" waitSetting="0" width="160" x="799" y="-5">
<inputs val="<inputs><name class="java.lang.String">NodeRange</name><values class="java.lang.Object" _list_="false">xpath:{/workflow/variables/NodeRange}</values><numberOfParallelExecutions class="java.lang.Integer" _list_="false">xpath:{/workflow/inputs/NoOfNodes}</numberOfParallelExecutions><continueOnFailure class="java.lang.Boolean" _list_="false">false</continueOnFailure></inputs>"/>
<superProcess>
<Start commented="0" continueOnFailure="0"
created="1590470291646" description=""
displayName="Start" height="30" interactive="0"
jobMode="0" name="Start" originalStyle=""
skipAttempt="0"
style="label;fillColor=#FFFF33;gradientColor=#FFFF00"
uniqueName="Start_2" waitSetting="0" width="120" x="18" y="30">
<onExit language="1" script="String name = xpath:{/workflow/inputs/vmName};
if(xpath:{/workflow/inputs/NoOfNodes}>1)
{
 String VMname = name +"_"+ xpath:{/workflow/ForEach_1/NodeRange} + "_" + xpath:{/workflow/inputs/SDDCName};
 VMname = VMname.substring(0,Math.min(VMname.length(),60));
 workflow.setLocalVariable("VMname",VMname);
 }
 else
 {
 String VMname = name + "_" + xpath:{/workflow/inputs/SDDCName};
 VMname = VMname.substring(0,Math.min(VMname.length(),60));
 workflow.setLocalVariable("VMname",VMname);
}"/>
<inputs val="<inputs />"/>
<transition activity="DeployVM_1" commented="0"
description="" originalStyle="" points=""
sourceX="78" sourceY="45" status="0"
style="defaultEdge" targetX="82" targetY="97"
transitionIndex="0" x="0" y="0">
<condition language="1" script="/*
The expression should return a boolean. Use the variable name "activity" to refer to the previous activity object. Example:
activity.exitCode==0;
*/
"/>
</transition>
</Start>
<Activity commented="0" continueOnFailure="0"
created="1590384751465" description=""
displayName="DeployVM" height="34" interactive="0"
jobMode="1" maxRestarts="50" name="DeployVM"
namespaceUri="commvault.workflow.activities"
originalStyle="" restartInterval="1" skipAttempt="0"
style="label;image=commvault.cte.workflow.activities.ExecuteWorkflow"
uniqueName="DeployVM_1" waitSetting="0" width="100"
x="28" y="94">
<inputs val="<inputs><vmName class="java.lang.String" _list_="false">java:{workflow.getLocalVariable("VMname")}</vmName><hypervisorName class="java.lang.String" _list_="false">xpath:{/workflow/XPathQuery_3/result}</hypervisorName><vmHost class="java.lang.String" _list_="false">xpath:{/workflow/inputs/vmHost}</vmHost><resourcePool class="java.lang.String" _list_="false">xpath:{/workflow/inputs/resourcePool}</resourcePool><dataCenterName class="java.lang.String" _list_="false">xpath:{/workflow/inputs/dataCenterName}</dataCenterName><vmNetwork class="java.lang.String" _list_="false">xpath:{/workflow/inputs/vmNetwork}</vmNetwork><dataStore class="java.lang.String" _list_="false">xpath:{/workflow/inputs/dataStore}</dataStore><companyName class="java.lang.String" _list_="false">xpath:{/workflow/inputs/CompanyName}</companyName><ovaPath class="java.lang.String" _list_="false">xpath:{/workflow/inputs/ovaPath}</ovaPath><contentLibrary class="java.lang.String" _list_="false">xpath:{/workflow/inputs/contentLibraryName}</contentLibrary><gatewayClientGroup class="java.lang.String" _list_="false">xpath:{/workflow/inputs/gatewayClientGroup}</gatewayClientGroup></inputs>"/>
<transition activity="AddToList_1" commented="0"
description="" originalStyle="" points=""
sourceX="78" sourceY="111" status="0"
style="defaultEdge" targetX="87" targetY="175"
transitionIndex="0" x="0" y="0">
<condition language="1" script="/*
The expression should return a boolean. Use the variable name "activity" to refer to the previous activity object. Example:
activity.exitCode==0;
*/
"/>
</transition>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1590470624148"
description="utility to add objects to a list"
displayName="AddToList" height="34" interactive="0"
jobMode="0" name="AddToList"
namespaceUri="commvault.cte.workflow.activities"
originalStyle="" skipAttempt="0"
style="label;image=commvault.cte.workflow.activities.ListActivityAdd"
uniqueName="AddToList_1" waitSetting="0" width="100"
x="33" y="164">
<inputs val="<inputs><addToList class="java.lang.String" _list_="false">xpath:{/workflow/variables/NodeList}</addToList><itemToAdd class="java.lang.Object" _list_="false">xpath:{/workflow/DeployVM_1/clientName}</itemToAdd></inputs>"/>
</Activity>
</superProcess>
<activitySchema>
<outputs name="outputs">
<children attribute="0" className="java.lang.Integer"
controlType="0" defaultValue="" displayName=""
hidden="0" inputType="java.lang.Integer"
listType="0" name="NodeRange" type="{http://www.w3.org/2001/XMLSchema}integer"/>
</outputs>
<inputs>
<children className="java.lang.String"
inputType="java.lang.String" name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
<children className="java.lang.Object"
inputType="java.lang.Object" name="values" type="{http://www.w3.org/2001/XMLSchema}anyType"/>
<children className="java.lang.Integer" defaultValue="1"
inputType="java.lang.Integer"
name="numberOfParallelExecutions" type="{http://www.w3.org/2001/XMLSchema}integer"/>
<children className="java.lang.Boolean"
defaultValue="false" inputType="java.lang.Boolean"
name="continueOnFailure" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
</inputs>
</activitySchema>
<transition activity="Script_2" commented="0" description=""
originalStyle="" points="" sourceX="879" sourceY="115"
status="0" style="defaultEdge" targetX="617" targetY="268"
transitionIndex="0" x="0" y="0">
<condition language="1" script="/*
The expression should return a boolean. Use the variable name "activity" to refer to the previous activity object. Example:
activity.exitCode==0;
*/
"/>
</transition>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1590470772086"
description="activity to execute code snippets in the selected language"
displayName="Member server
 List" height="27"
interactive="0" jobMode="0" name="Script"
namespaceUri="commvault.cte.workflow.activities"
originalStyle="" skipAttempt="0"
style="label;image=commvault.cte.workflow.activities.ScriptActivity"
uniqueName="Script_2" waitSetting="0" width="117" x="631" y="193">
<inputs val="<inputs><script language="1" script="import java.util.*;&#xD;&#xA;import java.io.*;&#xD;&#xA;&#xD;&#xA;String temp = &quot;&quot;;&#xD;&#xA;try&#xD;&#xA;{&#xD;&#xA;a = xpath:{/workflow/variables/NodeList}.toArray();&#xD;&#xA;int len = a.length;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;for(int i =0; i&lt; len ; i++)&#xD;&#xA;{&#xD;&#xA;&#xD;&#xA; temp = temp + &quot;\n&quot; + &quot;&lt;memberServers&gt;&lt;client clientName=\&quot;&quot;+a[i]+&quot;\&quot;/&gt;&lt;/memberServers&gt;&quot;;&#xD;&#xA;}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;catch(NullPointerException e)&#xD;&#xA;{&#xD;&#xA;logger.info(&quot;Caught NullPointerException&quot;);&#xD;&#xA;&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;return temp;&#xD;&#xA;&#xD;&#xA;" /></inputs>"/>
<transition activity="Execute_3" commented="0" description=""
originalStyle="" points="" sourceX="719" sourceY="213"
status="0" style="defaultEdge" targetX="646" targetY="274"
transitionIndex="0" x="0" y="0">
<condition language="1" script="/*
The expression should return a boolean. Use the variable name "activity" to refer to the previous activity object. Example:
activity.exitCode==0;
*/
"/>
</transition>
</Activity>
<onStart language="1" script="import java.util.*;
import java.util.stream.IntStream;
String sql = "select id from umdsproviders where domainName = '" + xpath:{/workflow/inputs/CompanyName} + "'";
 DataSet rs = csdb.execute(sql);
 int OrganizationId = 0;
 while(rs.hasNext()) {
 OrganizationId = rs.get("id");
 }
 workflow.setVariable("OrganizationId", OrganizationId); 
 logger.info(">> OrganizationId: " + Integer.toString(OrganizationId));
 List range = new ArrayList(xpath:{/workflow/inputs/NoOfNodes} - 1 + 1);
 for (int i=1; i<=xpath:{/workflow/inputs/NoOfNodes}; i++) {
 range.add(i);
 }
 workflow.setVariable("NodeRange", range);
 logger.info("NodeRange :"+workflow.getVariable("NodeRange"));
 "/>
<formProperties css="" formVersion="0" javaScript="" pageMode="0">
<rules/>
</formProperties>
</Workflow_WorkflowDefinition>