-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCreateCloudLibrary.xml
More file actions
427 lines (427 loc) · 42.3 KB
/
Copy pathCreateCloudLibrary.xml
File metadata and controls
427 lines (427 loc) · 42.3 KB
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
<?xml version="1.0" encoding="UTF-8"?>
<Workflow_WorkflowDefinition apiMode="0" config="<configuration />"
description="Create Cloud Library " executeOnWeb="0"
inputs="<inputs><ServiceHost class="java.lang.String" _list_="false" /><StoragePoolName class="java.lang.String" _list_="false" /><EnableDDB class="java.lang.Boolean" _list_="false">true</EnableDDB><MediaAgentName class="java.lang.String" _list_="false" /><BucketName class="java.lang.String" _list_="false" /><CompanyName class="java.lang.String" _list_="false" /><SecretKey class="workflow.types.EncryptedString" _list_="false" /><AccessKey class="workflow.types.EncryptedString" _list_="false" /><ExecutedFromAPI class="java.lang.String" _list_="false">false</ExecutedFromAPI></inputs>"
interactive="0" isHtmlDescription="0" manualPercentageComplete="0"
name="CreateCloudLibrary" outputs="<outputs />"
revision="$Revision: $" tags=""
uniqueGuid="6810b61e-4d02-4d26-9f0a-887417caf612"
variables="<variables><Password class="java.lang.String" _list_="false" /><OrganizationId class="java.lang.Integer" _list_="false" /><MAList class="java.lang.String" _list_="true" /><FirstMA class="java.lang.String" _list_="false" /><SecretKey class="java.lang.String" _list_="false" /><AccessKey class="java.lang.String" _list_="false" /></variables>"
webHidden="0" workflowId="0">
<schema>
<outputs className="" name="outputs" type=""/>
<variables attribute="0" className="" name="variables" type="">
<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.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.String"
controlType="0" defaultValue="" displayName=""
hidden="0" inputType="java.lang.String" listType="1"
name="MAList" 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="FirstMA" 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="SecretKey" 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="AccessKey" 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="Bucket Name" documentation="" hidden="0"
inputType="java.lang.String" listType="0"
maximumValue="" minimumValue="" name="BucketName"
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="Media Agent" documentation="" hidden="0"
inputType="java.lang.String" listType="1"
maximumValue="" minimumValue="" name="MediaAgentName"
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="Secret Key" documentation="" hidden="0"
inputType="workflow.types.EncryptedString" listType="0"
maximumValue="" minimumValue="" name="SecretKey"
readOnly="0" required="1" searchable="0" type="{workflow.types}EncryptedString"/>
<children attribute="0" className="java.lang.String"
controlHidden="0" controlType="0" defaultValue=""
displayName="Service Host" documentation="" hidden="0"
inputType="java.lang.String" listType="0"
maximumValue="" minimumValue="" name="ServiceHost"
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="Access Key" documentation="" hidden="0"
inputType="workflow.types.EncryptedString" listType="0"
maximumValue="" minimumValue="" name="AccessKey"
readOnly="0" required="1" searchable="0" type="{workflow.types}EncryptedString"/>
<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="StoragePoolName"
readOnly="0" required="1" searchable="0" type="{http://www.w3.org/2001/XMLSchema}string"/>
<children attribute="0" className="java.lang.Boolean"
controlHidden="0" controlType="5" defaultValue=""
displayName="" documentation="" hidden="0"
inputType="java.lang.Boolean" listType="0"
maximumValue="" minimumValue="" name="EnableDDB"
readOnly="0" required="0" searchable="0" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
<children attribute="0" className="java.lang.String"
controlType="0" defaultValue="" displayName=""
documentation="" hidden="0" inputType="java.lang.String"
listType="0" name="CompanyName" readOnly="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"/>
</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("SecretKey",xpath:{/workflow/inputs/SecretKey}.toString());
 workflow.setVariable("AccessKey",xpath:{/workflow/inputs/AccessKey}.toString());
}
else
{
 workflow.types.EncryptedString e = xpath:{/workflow/inputs/SecretKey};
 workflow.setVariable("SecretKey",(e.getPlainText()).toString());
 workflow.types.EncryptedString f = xpath:{/workflow/inputs/AccessKey};
 workflow.setVariable("AccessKey",(f.getPlainText()).toString());
}
"/>
<inputs val="<inputs />"/>
<transition activity="Script_3" commented="0" originalStyle=""
points="" sourceX="74" sourceY="59" status="0"
style="defaultEdge" targetX="87" targetY="148"
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="1587775241070" description="performs http operations"
displayName="Create Cloud Library 
without DDB Enabled"
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_1" waitSetting="0" width="194" x="375" y="123">
<inputs val="<inputs><request><url>/StoragePool?Action=create</url><method>POST</method><postType>Raw</postType><postContent>{
 "storagePolicyName": "xpath:{/workflow/inputs/StoragePoolName}",
 "type": 1,
 "copyName": "xpath:{/workflow/inputs/StoragePoolName}_Copy", 
 "numberOfCopies": 1,
 
 "storage": [
 {
 "deviceType": 2, 
 "path": "xpath:{/workflow/inputs/BucketName}", 
 "mediaAgent": {
 "mediaAgentName": "xpath:{/workflow/variables/FirstMA}" 
 },
 "credentials": {
 "password": "xpath:{/workflow/variables/Password}", 
 "userName": " xpath:{/workflow/inputs/ServiceHost}@0//xpath:{/workflow/variables/AccessKey}" 
 }
 }
 ],
 "storagePolicyCopyInfo": {
 "copyType": 1,
 "isFromGui": true,
 "active": 1,
 "isDefault": 1,
 "numberOfStreamsToCombine": 1,
 "storagePolicyFlags": {
 "globalStoragePolicy": 1
 },
 "extendedFlags": {
 "globalStoragePolicy": 1
 },
 "retentionRules": {
 "retainBackupDataForCycles": -1,
 "retainArchiverDataForDays": -1,
 "retainBackupDataForDays": -1,
 "retentionFlags": {
 "enableDataAging": 1
 }
 },
 "DDBPartitionInfo": {
 "maInfoList": [
 {
 "mediaAgent": {
 "mediaAgentName": "xpath:{/workflow/variables/FirstMA}" 
 },
 "subStoreList": [
 {
 "diskFreeWarningThreshholdMB": 10240,
 "diskFreeThresholdMB": 5120,
 "accessPath": {
 "path": "C:\\DDB" 
 }
 }
 ]
 }
 ],
 "sidbStoreInfo": {
 "numSIDBStore": 2
 }
 },
 "library": {
 "libraryName": "xpath:{/workflow/inputs/BucketName}" 
 },
 "mediaAgent": {
 "mediaAgentName": "xpath:{/workflow/variables/FirstMA}" 
 }
 }
}</postContent><postContentType>application/json</postContentType><headers><name>Authtoken</name><value>QSDKONLY xpath:{/workflow/system/token}</value></headers><headers><name>Accept</name><value>application/xml</value></headers><headers><name>operatorCompanyId</name><value>xpath:{/workflow/variables/OrganizationId}</value></headers></request></inputs>"/>
<transition activity="EnableLogging_2" commented="0"
originalStyle="" points="" sourceX="472" sourceY="140"
status="0" style="defaultEdge" targetX="487" targetY="61"
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="1"
created="1587777363719"
description="retrieves a list of values from xml"
displayName="XPathQuery" height="34" interactive="0" jobMode="0"
maxRestarts="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="574" y="42">
<inputs val="<inputs><xml class="java.lang.String" _list_="false">xpath:{/workflow/HttpClient_1/output}</xml><xpath class="java.lang.String" _list_="false">/App_CreateStoragePolicyResp/error/@errorCode</xpath><outputType class="workflow.types.SimpleType" _list_="false">Integer</outputType><outputAsList class="java.lang.Boolean" _list_="false">false</outputAsList></inputs>"/>
<transition activity="XPathQuery_2" commented="0"
originalStyle="" points="" sourceX="751" sourceY="60"
status="0" style="defaultEdge;dashed=1" targetX="892"
targetY="61" transitionIndex="0" x="0" y="0">
<condition language="1" script="(xpath:{/workflow/XPathQuery_1/result} != 0);"/>
</transition>
<transition activity="ForEach_1" commented="0" originalStyle=""
points="649.0,133.0" sourceX="624" sourceY="59" status="0"
style="defaultEdge" targetX="829" targetY="87"
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="1587777512332" description="Ends the workflow"
displayName="FAIL" height="20" interactive="0" jobMode="0"
name="WorkflowEnd"
namespaceUri="commvault.cte.workflow.activities"
originalStyle="" skipAttempt="0"
style="label;image=commvault.cte.workflow.activities.EndActivity"
uniqueName="WorkflowEnd_1" waitSetting="0" width="77" x="891" y="51">
<inputs val="<inputs><completionStatus class="workflow.types.WorkflowCompletionStatus" _list_="false">FAILED</completionStatus><failureMessage class="java.lang.String" _list_="false">Failed to create Cloud Storage Pool with error: xpath:{/workflow/XPathQuery_2/result}</failureMessage></inputs>"/>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1589835980888"
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_2" waitSetting="0" width="100" x="739" y="43">
<inputs val="<inputs><xml class="java.lang.String" _list_="false">xpath:{/workflow/HttpClient_1/output}</xml><xpath class="java.lang.String" _list_="false">/App_CreateStoragePolicyResp/error/@errorMessage</xpath><outputType class="workflow.types.SimpleType" _list_="false">String</outputType><outputAsList class="java.lang.Boolean" _list_="false">false</outputAsList></inputs>"/>
<transition activity="WorkflowEnd_1" commented="0"
originalStyle="" points="" sourceX="892" sourceY="61"
status="0" style="defaultEdge;dashed=1" targetX="1139"
targetY="67" transitionIndex="0" x="0" y="0"/>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1589911019354" 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="1263" y="145">
<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="1590048038185"
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="197" y="14">
<inputs val="<inputs />"/>
<transition activity="HttpClient_2" commented="0"
originalStyle="" points="" sourceX="255" sourceY="31"
status="0" style="defaultEdge" targetX="257" targetY="139"
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/inputs/EnableDDB};"/>
</transition>
<transition activity="HttpClient_1" commented="0"
originalStyle="" points="422.0,66.0" sourceX="255"
sourceY="31" status="0" style="defaultEdge" targetX="473"
targetY="137" 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/inputs/EnableDDB};"/>
</transition>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1590048042791"
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="222" y="207">
<inputs val="<inputs />"/>
<transition activity="XPathQuery_4" commented="0"
originalStyle="" points="" sourceX="278" sourceY="224"
status="0" style="defaultEdge" targetX="649" targetY="223"
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="1590048432604" description="performs http operations"
displayName="Create Cloud Library 
with DDB Enabled"
height="34" interactive="0" jobMode="0" maxRestarts="5"
name="HttpClient"
namespaceUri="commvault.cte.workflow.activities"
originalStyle="" skipAttempt="0"
style="label;image=commvault.cte.workflow.activities.HttpClientActivity"
uniqueName="HttpClient_2" waitSetting="0" width="176" x="187" y="120">
<inputs val="<inputs><request><url>/StoragePool?Action=create</url><method>POST</method><postType>Raw</postType><postContent>{
 "storagePolicyName": "xpath:{/workflow/inputs/StoragePoolName}",
 "type": 1,
 "copyName": "xpath:{/workflow/inputs/StoragePoolName}_Copy", 
 "numberOfCopies": 1,
 
 "storage": [
 {
 "deviceType": 2, 
 "path": "xpath:{/workflow/inputs/BucketName}", 
 "mediaAgent": {
 "mediaAgentName": "xpath:{/workflow/variables/FirstMA}" 
 },
 "credentials": {
 "password": "xpath:{/workflow/variables/Password}", 
 "userName": "xpath:{/workflow/inputs/ServiceHost}@0//xpath:{/workflow/variables/AccessKey}" 
 }
 }
 ],
 "storagePolicyCopyInfo": {
 "copyType": 1,
 "isFromGui": true,
 "active": 1,
 "isDefault": 1,
 "numberOfStreamsToCombine": 1,
 "dedupeFlags": {
 "enableDASHFull": 1,
 "hostGlobalDedupStore": 1,
 "enableDeduplication": 1
 },
 "storagePolicyFlags": {
 "blockLevelDedup": 1,
 "enableGlobalDeduplication": 1,
 "globalStoragePolicy": 1
 },
 "extendedFlags": {
 "globalStoragePolicy": 1
 },
 "retentionRules": {
 "retainBackupDataForCycles": -1,
 "retainArchiverDataForDays": -1,
 "retainBackupDataForDays": -1,
 "retentionFlags": {
 "enableDataAging": 1
 }
 },
 "DDBPartitionInfo": {
 "maInfoList": [
 {
 "mediaAgent": {
 "mediaAgentName": "xpath:{/workflow/variables/FirstMA}" 
 },
 "subStoreList": [
 {
 "diskFreeWarningThreshholdMB": 10240,
 "diskFreeThresholdMB": 5120,
 "accessPath": {
 "path": "/opt/xpath:{/workflow/inputs/StoragePoolName}_DDB" 
 }
 }
 ]
 }
 ],
 "sidbStoreInfo": {
 "numSIDBStore": 2
 }
 },
 "library": {
 "libraryName": "xpath:{/workflow/inputs/BucketName}" 
 },
 "mediaAgent": {
 "mediaAgentName": "xpath:{/workflow/variables/FirstMA}" 
 }
 }
}</postContent><postContentType>application/json</postContentType><headers><name>Authtoken</name><value>QSDKONLY xpath:{/workflow/system/token}</value></headers><headers><name>Accept</name><value>application/xml</value></headers><headers><name>operatorCompanyId</name><value>xpath:{/workflow/variables/OrganizationId}</value></headers></request></inputs>"/>
<transition activity="EnableLogging_1" commented="0"
originalStyle="" points="" sourceX="275" sourceY="137"
status="0" style="defaultEdge" targetX="270" targetY="226"
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="1590051069766"
description="activity to execute code snippets in the selected language"
displayName="Encode" 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_3" waitSetting="0" width="100" x="33" y="130">
<inputs val="<inputs><script language="1" script="import java.util.Base64;&#xD;&#xA;int softstate = 0;&#xD;&#xA;while(softstate==0)&#xD;&#xA;{&#xD;&#xA; Thread.sleep(10000);&#xD;&#xA; String ma = xpath:{/workflow/inputs/MediaAgentName}.get(0);&#xD;&#xA; logger.info(&quot;Chosen MA : &quot;+ma+ &quot; not ready yet&quot;);&#xD;&#xA; &#xD;&#xA; String sql = &quot;select MmHostSoftState from MMHost where clientId = (select id from app_client where name = '&quot; + ma +&quot;')&quot;;&#xD;&#xA; DataSet rs = csdb.execute(sql); &#xD;&#xA; while(rs.hasNext()) {&#xD;&#xA; softstate = rs.get(&quot;MmHostSoftState&quot;);&#xD;&#xA; }&#xD;&#xA;} &#xD;&#xA;&#xD;&#xA;Thread.sleep(30000);&#xD;&#xA;logger.info(&quot;softstate set continuing with library creation&quot;); &#xD;&#xA;&#xD;&#xA;String sql = &quot;select id from umdsproviders where domainName = '&quot; + xpath:{/workflow/inputs/CompanyName} + &quot;'&quot;;&#xD;&#xA; DataSet rs = csdb.execute(sql);&#xD;&#xA; int OrganizationId = 0;&#xD;&#xA; while(rs.hasNext()) {&#xD;&#xA; OrganizationId = rs.get(&quot;id&quot;);&#xD;&#xA; }&#xD;&#xA; workflow.setVariable(&quot;OrganizationId&quot;, OrganizationId); &#xD;&#xA; logger.info(&quot;&gt;&gt; OrganizationId: &quot; + Integer.toString(OrganizationId));&#xD;&#xA;String pass = xpath:{/workflow/variables/SecretKey};&#xD;&#xA;String encodedpass = Base64.getEncoder().encodeToString(pass.getBytes(&quot;utf-8&quot;));&#xD;&#xA;workflow.setVariable(&quot;Password&quot;,encodedpass);&#xD;&#xA;firstma = xpath:{/workflow/inputs/MediaAgentName}.toArray();&#xD;&#xA;workflow.setVariable(&quot;FirstMA&quot;,firstma[0]);&#xD;&#xA;String[] malist = new String[firstma.length-1];&#xD;&#xA;for(i=0;i&lt;firstma.length-1;i++)&#xD;&#xA;{&#xD;&#xA; malist[i]=firstma[i+1];&#xD;&#xA;}&#xD;&#xA;workflow.setVariable(&quot;MAList&quot;,malist);&#xD;&#xA;" /></inputs>"/>
<transition activity="DisableLogging_1" commented="0"
originalStyle="" points="" sourceX="83" sourceY="147"
status="0" style="defaultEdge" targetX="343" targetY="65"
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="1"
created="1590052095783"
description="retrieves a list of values from xml"
displayName="XPathQuery" height="34" interactive="0" jobMode="0"
maxRestarts="0" name="XPathQuery"
namespaceUri="commvault.cte.workflow.activities"
originalStyle="" skipAttempt="0"
style="label;image=commvault.cte.workflow.activities.XMLQueryActivity"
uniqueName="XPathQuery_4" waitSetting="0" width="100" x="608" y="206">
<inputs val="<inputs><xml class="java.lang.String" _list_="false">xpath:{/workflow/HttpClient_2/output}</xml><xpath class="java.lang.String" _list_="false">/App_CreateStoragePolicyResp/error/@errorCode</xpath><outputType class="workflow.types.SimpleType" _list_="false">Integer</outputType><outputAsList class="java.lang.Boolean" _list_="false">false</outputAsList></inputs>"/>
<transition activity="XPathQuery_5" commented="0"
originalStyle="" points="" sourceX="769" sourceY="222"
status="0" style="defaultEdge;dashed=1" targetX="910"
targetY="223" transitionIndex="0" x="18" y="162">
<condition language="1" script="(xpath:{/workflow/XPathQuery_4/result} != 0);"/>
</transition>
<transition activity="ForEach_1" commented="0" originalStyle=""
points="648.0,158.0" sourceX="642" sourceY="221" status="0"
style="defaultEdge" targetX="750" targetY="87"
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_4/result} == 0);"/>
</transition>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1590052095816"
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_5" waitSetting="0" width="100" x="776" y="330">
<inputs val="<inputs><xml class="java.lang.String" _list_="false">xpath:{/workflow/HttpClient_2/output}</xml><xpath class="java.lang.String" _list_="false">/App_CreateStoragePolicyResp/error/@errorMessage</xpath><outputType class="workflow.types.SimpleType" _list_="false">String</outputType><outputAsList class="java.lang.Boolean" _list_="false">false</outputAsList></inputs>"/>
<transition activity="WorkflowEnd_3" commented="0"
originalStyle="" points="" sourceX="910" sourceY="223"
status="0" style="defaultEdge;dashed=1" targetX="1157"
targetY="229" transitionIndex="0" x="18" y="162"/>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1590052095878" description="Ends the workflow"
displayName="FAIL" height="20" 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="77" x="974" y="336">
<inputs val="<inputs><completionStatus class="workflow.types.WorkflowCompletionStatus" _list_="false">FAILED</completionStatus><failureMessage class="java.lang.String" _list_="false">Failed to create Cloud Storage Pool with error: xpath:{/workflow/XPathQuery_5/result}</failureMessage></inputs>"/>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1590052134103"
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_2" waitSetting="0" width="113" x="440" y="43">
<inputs val="<inputs />"/>
<transition activity="XPathQuery_1" commented="0"
originalStyle="" points="" sourceX="496" sourceY="60"
status="0" style="defaultEdge" targetX="600" targetY="57"
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="1590479441992"
description="iterates a group of activities over a list of values"
displayName="ForEach" height="191" interactive="0" jobMode="0"
name="ForEach" namespaceUri="commvault.cte.workflow.activities"
originalStyle="" skipAttempt="0" style="swimlane"
uniqueName="ForEach_1" waitSetting="0" width="278" x="786" y="85">
<inputs val="<inputs><name class="java.lang.String">MAList</name><values class="java.lang.Object" _list_="false">xpath:{/workflow/variables/MAList}</values><numberOfParallelExecutions class="java.lang.Integer" _list_="false">1</numberOfParallelExecutions><continueOnFailure class="java.lang.Boolean" _list_="false">false</continueOnFailure></inputs>"/>
<superProcess>
<Start commented="0" continueOnFailure="0"
created="1590479441992" 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="11" y="30">
<inputs val="<inputs />"/>
<transition activity="DisableLogging_2" commented="0"
originalStyle="" points="" sourceX="71" sourceY="45"
status="0" style="defaultEdge" targetX="74"
targetY="126" 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="1611081577027"
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_2" waitSetting="0"
width="117" x="12" y="112">
<inputs val="<inputs />"/>
<transition activity="Execute_1" commented="0"
originalStyle="" points="" sourceX="70"
sourceY="129" status="0" style="defaultEdge"
targetX="206" targetY="133" 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>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1590480398294" description=""
displayName="Add MP to 
Cloud Library" 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_1" waitSetting="0" width="105"
x="158" y="114">
<inputs val="<inputs><inputXml class="java.lang.String" _list_="false">&lt;EVGui_ConfigureStorageLibraryReq isConfigRequired="1"&gt;&#xD;
&lt;library libraryName="xpath:{/workflow/inputs/StoragePoolName}" serverType="2" mediaAgentName="xpath:{/workflow/ForEach_1/MAList}" mountPath="xpath:{/workflow/inputs/BucketName}" opType="4" loginName="xpath:{/workflow/inputs/ServiceHost}@0//xpath:{/workflow/variables/AccessKey}" password="xpath:{/workflow/variables/SecretKey}"/&gt;&#xD;
&lt;/EVGui_ConfigureStorageLibraryReq&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_3" commented="0"
originalStyle="" points="" sourceX="210"
sourceY="131" status="0" style="defaultEdge"
targetX="205" targetY="57" 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>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1611081625402"
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_3" waitSetting="0" width="113"
x="145" y="38">
<inputs val="<inputs />"/>
</Activity>
</superProcess>
<activitySchema>
<outputs name="outputs">
<children attribute="0" className="java.lang.String"
controlType="0" defaultValue="" displayName=""
hidden="0" inputType="java.lang.String" listType="0"
name="MAList" type="{http://www.w3.org/2001/XMLSchema}string"/>
</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="WorkflowEnd_2" commented="0"
originalStyle="" points="" sourceX="856" sourceY="137"
status="0" style="defaultEdge" targetX="985" targetY="143"
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>
<formProperties css="" formVersion="0" javaScript="" pageMode="0">
<rules/>
</formProperties>
</Workflow_WorkflowDefinition>