-
Notifications
You must be signed in to change notification settings - Fork 1
/
CreatePlan.xml
203 lines (203 loc) · 45.5 KB
/
CreatePlan.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
<?xml version="1.0" encoding="UTF-8"?>
<Workflow_WorkflowDefinition apiMode="0" config="<configuration />"
description="Workflow to create plans" executeOnWeb="0"
inputs="<inputs><PlanName class="java.lang.String" _list_="false" /><Storage class="java.lang.String" _list_="false" /><RetentionPeriod class="java.lang.String" _list_="false">30</RetentionPeriod><BackupFrequency class="java.lang.String" _list_="false">1 days</BackupFrequency><StartTime class="java.lang.String" _list_="false">21:00</StartTime><CompanyName class="java.lang.String" _list_="false" /></inputs>"
interactive="0" isHtmlDescription="0" manualPercentageComplete="0"
name="CreatePlan" outputs="<outputs />" revision="$Revision: $"
tags="" uniqueGuid="b36f24a8-2b91-4331-8325-5b58a63b6bd6"
variables="<variables><EpochStartTime class="java.lang.String" _list_="false">75600</EpochStartTime><RPOInMinutes class="java.lang.String" _list_="false">1440</RPOInMinutes><RPODescription class="java.lang.String" _list_="false">Everyday at 21:00</RPODescription><RPOFrequencyType class="java.lang.String" _list_="false">Daily</RPOFrequencyType><EpochEndTime class="java.lang.String" _list_="false">86340</EpochEndTime><FrequencyInterval class="java.lang.String" _list_="false">1</FrequencyInterval><FrequencyRecFactor class="java.lang.String" _list_="false">1</FrequencyRecFactor><DedupFlags class="java.lang.String" _list_="false" /><OrganizationId class="java.lang.Integer" _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=""
documentation="" hidden="0" inputType="java.lang.String"
listType="0" name="EpochStartTime" readOnly="0" 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="RPOInMinutes" readOnly="0" 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="RPODescription" readOnly="0" 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="RPOFrequencyType" readOnly="0" 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="EpochEndTime" readOnly="0" 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="FrequencyInterval" readOnly="0" 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="FrequencyRecFactor" readOnly="0" 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="DedupFlags" readOnly="0" type="{http://www.w3.org/2001/XMLSchema}string"/>
<children attribute="0" className="java.lang.Integer"
controlType="0" defaultValue="" hidden="0"
inputType="java.lang.Integer" listType="0"
name="OrganizationId" type="{http://www.w3.org/2001/XMLSchema}integer"/>
</variables>
<inputs attribute="0" className="" name="inputs" type="">
<children attribute="0" className="java.lang.String"
controlType="0" defaultValue="" displayName=""
hidden="0" inputType="java.lang.String" listType="0"
name="PlanName" 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="Storage" readOnly="0" 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="RetentionPeriod" readOnly="0" 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="BackupFrequency" readOnly="0" 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="StartTime" 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="CompanyName" 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">
<inputs val="<inputs />"/>
<transition activity="CommServDBQuery_1" commented="0"
originalStyle="" points="" sourceX="74" sourceY="59"
status="0" style="defaultEdge" targetX="203" targetY="62"
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="1589807578332" description="performs http operations"
displayName="HttpClient" 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="100" x="180" y="180">
<inputs val="<inputs><request><url>/v2/Plan</url><method>POST</method><postType>Raw</postType><postContent>{
 "plan": {
 "summary": {
 "plan": {
 "planName":"xpath:{/workflow/inputs/PlanName}"
 },
 "type": "MSP",
 "subtype": "Server",
 "description": "xpath:{/workflow/inputs/PlanName}",
 "planOwner": {
 "userId": xpath:{/workflow/system/executor/userId}
 },
 "restrictions": 1,
 "rpoInMinutes": xpath:{/workflow/variables/RPOInMinutes},
 "slaInterval": 0,
 "addons": {
 "database": true,
 "snap": true,
 "filesystem": true
 }
 },
 "options": {
 "quota": 0
 },
 "schedule": {
 "task": {
 "taskFlags": {
 "disabled": false,
 "isEZOperation": false,
 "isEdgeDrive": false
 },
 "taskType": "SCHEDULE_POLICY"
 },
 "subTasks": [
 {
 "subTask": {
 "subTaskName": "Incremental backup schedule",
 "subTaskId": 1,
 "subTaskType": "BACKUP",
 "operationType": "BACKUP",
 "flags": 65536
 },
 "pattern": {
 "name": "Incremental backup schedule",
 "freq_type": "xpath:{/workflow/variables/RPOFrequencyType}",
 "freq_interval": xpath:{/workflow/variables/FrequencyInterval},
 "freq_recurrence_factor": xpath:{/workflow/variables/FrequencyRecFactor},
 "freq_subday_interval": 0,
 "active_start_date": 0,
 "active_start_time": xpath:{/workflow/variables/EpochStartTime},
 "active_end_time": xpath:{/workflow/variables/EpochEndTime},
 "active_end_occurence": 0,
 "timeZone": {
 "TimeZoneID": 1001,
 "TimeZoneName": "Client Time Zone"
 },
 "description": "xpath:{/workflow/variables/RPODescription} "
 },
 "options": {
 "backupOpts": {
 "backupLevel": "INCREMENTAL",
 "dataOpt": {
 "daysBetweenSyntheticBackup": 0
 },
 "runIncrementalBackup": true,
 "incLevel": "BEFORE_SYNTH",
 "isSpHasInLineCopy": false,
 "doNotTruncateLog": false,
 "sybaseSkipFullafterLogBkp": false,
 "runSILOBackup": false
 }
 }
 },
 {
 "subTask": {
 "subTaskName": "Synthetic Fulls",
 "subTaskId": 1,
 "subTaskType": "BACKUP",
 "operationType": "BACKUP",
 "flags": 0
 },
 "pattern": {
 "name": "Synthetic Fulls",
 "freq_type": "Automatic_Schedule",
 "freq_recurrence_factor": 0,
 "freq_subday_interval": 0,
 "active_end_time": 0,
 "timeZone": {},
 "description": "Based on automatic schedule settings"
 },
 "options": {
 "backupOpts": {
 "backupLevel": "SYNTHETIC_FULL",
 "dataOpt": {
 "createNewIndex": true,
 "followMountPoints": true,
 "useCatalogServer": true,
 "enforceTransactionLogUsage": false,
 "skipConsistencyCheck": false,
 "useMultiStream": true,
 "useMaximumStreams": true,
 "maxNumberOfStreams": 1,
 "autoCopy": true,
 "daysBetweenSyntheticBackup": xpath:{/workflow/inputs/RetentionPeriod}
 },
 "vsaBackupOptions": {
 "backupFailedVMsOnly": false
 },
 "runIncrementalBackup": false,
 "incLevel": "NONE",
 "doNotTruncateLog": false,
 "truncateLogsOnSource": false
 },
 "commonOpts": {
 "automaticSchedulePattern": {
 "minBackupInterval": 0,
 "minBackupIntervalMinutes": 15,
 "maxBackupInterval": 72,
 "maxBackupIntervalMinutes": 0,
 "minSyncInterval": 0,
 "minSyncIntervalMinutes": 0,
 "wiredNetworkConnection": {
 "enabled": false
 },
 "specfificNetwork": {
 "enabled": false,
 "ipAddress": {
 "address": "0.0.0.0",
 "subnet": 24
 }
 },
 "acPower": {
 "enabled": false
 },
 "stopIfOnBattery": {
 "enabled": false
 },
 "minNetworkBandwidth": {
 "enabled": false
 },
 "newOrModifiedFile": {
 "enabled": false
 },
 "stopSleepIfBackUp": {
 "enabled": false
 },
 "ignoreOpWindowPastMaxInterval": true
 }
 }
 }
 }
 ]
 },
 "storage": {
 "copy": [
 {
 "StoragePolicyCopy": {
 "copyName": "Primary"
 },
 "copyType": "SYNCHRONOUS",
 "isDefault": "SET_TRUE",
 "active": "SET_TRUE",
 "extendedFlags": {	
 "useGlobalStoragePolicy": "SET_TRUE"
 },
 "retentionRules": {
 "retentionFlags": {
 "enableDataAging": "SET_TRUE"
 },
 "retainBackupDataForDays": xpath:{/workflow/inputs/RetentionPeriod},
 "retainArchiverDataForDays": -1
 },
 "useGlobalPolicy": {
 "storagePolicyName": "xpath:{/workflow/inputs/Storage}"
 },
 "dedupeFlags": {
 xpath:{/workflow/variables/DedupFlags}
 }
 },
 {
 "copyType": "SNAP",
 "isDefault": "SET_FALSE",
 "isSnapCopy": "SET_TRUE",
 "active": "SET_TRUE",
 "retentionRules": {
 "retentionFlags": {
 "jobBasedRetention": "SET_TRUE"
 },
 "retainBackupDataForDays": 15,
 "retainBackupDataForCycles": 1,
 "retainArchiverDataForDays": -1,
 "jobs": 8
 },
 "copyPrecedence": 1
 }
 ],
 "enableBackupCopy": true
 },
 "laptop": {
 "content": {
 "backupContent": [
 {
 "subClientPolicy": {
 "backupSetEntity": {
 "backupsetName": "Windows subclient policy"
 },
 "subClientList": [
 {
 "commonProperties": {
 "storageDevice": {
 "softwareCompression": "USE_STORAGE_POLICY_SETTINGS",
 "deDuplicationOptions": {
 "enableDeduplication": true,
 "generateSignature": "ON_CLIENT"
 }
 },
 "readBuffersize": 512,
 "numberOfBackupStreams": 4
 },
 "content": [
 {
 "path": "\\"
 }
 ],
 "contentOperationType": "OVERWRITE",
 "fsSubClientProp": {
 "useVSS": true,
 "useVSSForSystemState": true,
 "backupSystemState": false,
 "backupSystemStateforFullBkpOnly": false,
 "keepAtLeastPreviousVersions": 5,
 "catalogACL": true,
 "scanOption": "OPTIMAL_SCAN"
 }
 }
 ]
 },
 "idatype": 2
 },
 {
 "subClientPolicy": {
 "backupSetEntity": {
 "backupsetName": "Linux subclient policy"
 },
 "subClientList": [
 {
 "commonProperties": {
 "storageDevice": {
 "softwareCompression": "USE_STORAGE_POLICY_SETTINGS",
 "deDuplicationOptions": {
 "enableDeduplication": true,
 "generateSignature": "ON_CLIENT"
 }
 },
 "readBuffersize": 512,
 "numberOfBackupStreams": 4
 },
 "content": [
 {
 "path": "/"
 }
 ],
 "contentOperationType": "OVERWRITE",
 "fsSubClientProp": {
 "useVSS": true,
 "keepAtLeastPreviousVersions": 5,
 "catalogACL": true,
 "scanOption": "RECURSIVE_SCAN"
 }
 }
 ]
 },
 "idatype": 3
 },
 {
 "subClientPolicy": {
 "backupSetEntity": {
 "backupsetName": "Mac subclient policy"
 },
 "subClientList": [
 {
 "commonProperties": {
 "storageDevice": {
 "softwareCompression": "USE_STORAGE_POLICY_SETTINGS",
 "deDuplicationOptions": {
 "enableDeduplication": true,
 "generateSignature": "ON_CLIENT"
 }
 },
 "readBuffersize": 512,
 "numberOfBackupStreams": 4
 },
 "content": [
 {
 "path": "/"
 }
 ],
 "contentOperationType": "OVERWRITE",
 "fsSubClientProp": {
 "useVSS": true,
 "keepAtLeastPreviousVersions": 5,
 "catalogACL": true,
 "scanOption": "RECURSIVE_SCAN"
 }
 }
 ]
 },
 "idatype": 4
 }
 ]
 }
 },
 "database": {
 "scheduleLog": {
 "task": {
 "taskName": "Log schedule policy for the database clients",
 "taskFlags": {
 "isEdgeDrive": false
 },
 "policyType": "DATA_PROTECTION",
 "taskType": "SCHEDULE_POLICY",
 "description": "Automatic schedules for the log backup"
 },
 "appGroup": {
 "appGroups": [
 {
 "appGroupId": 13,
 "appGroupName": "APPGRP_Sybase"
 },
 {
 "appGroupId": 114,
 "appGroupName": "APPGRP_POSTGRES"
 },
 {
 "appGroupId": 129,
 "appGroupName": "APPGRP_SAP_HANA"
 },
 {
 "appGroupId": 100,
 "appGroupName": "APPGRP_MySql"
 },
 {
 "appGroupId": 11,
 "appGroupName": "APPGRP_DB2"
 },
 {
 "appGroupId": 111,
 "appGroupName": "APPGRP_INFORMIX"
 },
 {
 "appGroupId": 101,
 "appGroupName": "APPGRP_SAP_FOR_ORACLE"
 },
 {
 "appGroupId": 90,
 "appGroupName": "APPGRP_SQL_POLICY"
 },
 {
 "appGroupId": 83,
 "appGroupName": "APPGRP_AppTypeIndexedBased"
 },
 {
 "appGroupId": 12,
 "appGroupName": "APPGRP_NotesDb"
 },
 {
 "appGroupId": 10,
 "appGroupName": "PACKAGEGRP_DB"
 },
 {
 "appGroupId": 10,
 "appGroupName": "APPGRP_ORACLE"
 },
 {
 "appGroupId": 14,
 "appGroupName": "APPGRP_XchangeDB"
 },
 {
 "appGroupId": 104,
 "appGroupName": "APPGRP_NotesDb_Transaction_Log"
 },
 {
 "appGroupId": 134,
 "appGroupName": "APPGRP_DISTRIBUTEDAPPS"
 }
 ]
 },
 "subTasks": [
 {
 "subTask": {
 "subTaskName": "Incremental automatic schedule for logs",
 "subTaskType": "BACKUP",
 "operationType": "BACKUP",
 "flags": 65536
 },
 "pattern": {
 "freq_type": "Automatic_Schedule",
 "timeZone": {}
 },
 "options": {
 "backupOpts": {
 "backupLevel": "INCREMENTAL",
 "dataOpt": {
 "followMountPoints": true,
 "useCatalogServer": true,
 "enforceTransactionLogUsage": false,
 "skipConsistencyCheck": false,
 "autoCopy": false,
 "daysBetweenSyntheticBackup": 7
 },
 "oracleOptions": {
 "backupArchLogOptions": {
 "backupArchiveLogCriteria": "ALL",
 "startLSN": 1,
 "endLSN": 1,
 "backupArchiveLog": true
 },
 "deleteArchLogOptions": {
 "backupArchiveLogCriteria": "NONE"
 }
 },
 "runIncrementalBackup": true,
 "incLevel": "BEFORE_SYNTH",
 "cumulative": false,
 "doNotTruncateLog": false,
 "sybaseSkipFullafterLogBkp": false,
 "truncateLogsOnSource": false,
 "distAppsBackupOptions": {
 "runDataBkp": false,
 "runLogBkp": true
 }
 },
 "commonOpts": {
 "perfJobOpts": {},
 "automaticSchedulePattern": {
 "minBackupInterval": 0,
 "minBackupIntervalMinutes": 15,
 "maxBackupInterval": 4,
 "maxBackupIntervalMinutes": 0,
 "logPercent": {
 "enabled": true,
 "threshold": 80
 },
 "logFileNum": {
 "enabled": true,
 "threshold": 50
 },
 "diskUsedPercent": {
 "enabled": true,
 "threshold": 80
 },
 "useStorageSpaceFromMA": false,
 "sweepStartTime": 86400
 }
 }
 }
 }
 ]
 },
 "slaInMinutes": 240,
 "rpoInMinutes": 240
 },
 "inheritance": {
 "isSealed": true
 },
 "snapInfo": {
 "noOfRecoveryPoints": 8,
 "snapToTapeSchedule": {
 "subTask": {
 "subTaskName": "Snap to tape",
 "subTaskType": "ADMIN",
 "operationType": "SNAP_TO_TAPE",
 "flags": 0,
 "subTaskOrder": 0
 },
 "pattern": {
 "name": "Automatic backup copy",
 "freq_type": "After_Job_Completes",
 "freq_interval": 240,
 "freq_recurrence_factor": 1,
 "active_start_time": 79200,
 "timeZone": {
 "TimeZoneName": "Client Time Zone"
 }
 },
 "options": {
 "backupOpts": {
 "backupLevel": "NONE",
 "mediaOpt": {
 "markMediaFullOnSuccess": false,
 "startNewMedia": false,
 "auxcopyJobOption": {
 "autoCopy": true
 }
 },
 "dataOpt": {
 "daysBetweenSyntheticBackup": 0
 },
 "runIncrementalBackup": true,
 "isSpHasInLineCopy": false,
 "doNotTruncateLog": false,
 "sybaseSkipFullafterLogBkp": false,
 "runSILOBackup": false
 },
 "adminOpts": {
 "snapToTapeOption": {
 "allowMaximum": true
 }
 }
 }
 }
 }
 }
}
</postContent><postContentType>application/json; 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><headers><name>operatorCompanyId</name><value>xpath:{/workflow/variables/OrganizationId}</value></headers></request></inputs>"/>
<transition activity="CommServDBQuery_2" commented="0"
originalStyle="" points="" sourceX="230" sourceY="197"
status="0" style="defaultEdge" targetX="595" targetY="282"
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_1/statusCode} == 200;"/>
</transition>
<transition activity="WorkflowEnd_2" commented="0"
originalStyle="" points="" sourceX="230" sourceY="197"
status="0" style="defaultEdge" targetX="115" targetY="196"
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="1589807584418" 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_1" waitSetting="0" width="106" x="421" y="193">
<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="1589820292767"
description="activity to execute code snippets in the selected language"
displayName="SetVars" 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_2" waitSetting="0" width="100" x="184" y="114">
<inputs val="<inputs><script language="1" script="String start_time = xpath:{/workflow/inputs/StartTime};&#xA;String frequency = xpath:{/workflow/inputs/BackupFrequency}.toLowerCase();&#xA;if(frequency.contains(&quot;days&quot;))&#xA;{&#xA; String[] time = start_time.split(&quot;:&quot;);&#xA; int hrs = Integer.parseInt(time[0]);&#xA; int mins = Integer.parseInt(time[1]);&#xA; int secs = hrs*3600 + mins*60;&#xA; String epoch = secs + &quot;&quot;;&#xA; String[] days = frequency.split(&quot; &quot;);&#xA; String rpo = (Integer.parseInt(days[0])*24*60) + &quot;&quot;;&#xA; String desc = &quot;Every day at &quot;+ start_time;&#xA; workflow.setVariable(&quot;RPOInMinutes&quot;,rpo);&#xA; workflow.setVariable(&quot;EpochStartTime&quot;,epoch);&#xA; workflow.setVariable(&quot;RPODescription&quot;,desc);&#xA;&#xA;}&#xA;else&#xA;{&#xA; String[] hours = frequency.split(&quot; &quot;);&#xA; String mins = Integer.parseInt(hours[0])*60 + &quot;&quot;;&#xA; workflow.setVariable(&quot;RPOInMinutes&quot;,mins);&#xA; workflow.setVariable(&quot;RPODescription&quot;,&quot;Continous schedule after 240 minutes&quot;);&#xA; workflow.setVariable(&quot;RPOFrequencyType&quot;,&quot;After_Job_Completes&quot;);&#xA; workflow.setVariable(&quot;EpochStartTime&quot;,&quot;0&quot;);&#xA; workflow.setVariable(&quot;EpochEndTime&quot;,&quot;0&quot;);&#xA; workflow.setVariable(&quot;FrequencyInterval&quot;,&quot;240&quot;);&#xA; workflow.setVariable(&quot;FrequencyRecFactor&quot;,&quot;0&quot;);&#xA;}&#xA;" /></inputs>"/>
<transition activity="HttpClient_1" commented="0"
originalStyle="" points="" sourceX="-72" sourceY="130"
status="0" style="defaultEdge" targetX="-69" targetY="197"
transitionIndex="0" x="-143" 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="1589872741383" description="Ends the workflow"
displayName="Failed" 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="45" y="180">
<inputs val="<inputs><completionStatus class="workflow.types.WorkflowCompletionStatus" _list_="false">FAILED</completionStatus><failureMessage class="java.lang.String" _list_="false">xpath:{/workflow/HttpClient_1/output}</failureMessage></inputs>"/>
</Activity>
<Activity commented="0" continueOnFailure="0"
created="1590391523789"
description="executes queries against a commcell database"
displayName="Check for
 Dedup Storage" 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="143"
x="159" y="40">
<onExit language="1" script="if(xpath:{/workflow/CommServDBQuery_1/resultSets/rowCount}!=0)
{
 String dedupflags = "\"enableDeduplication\": \"SET_TRUE\","+
 "\"enableClientSideDedup\": \"SET_TRUE\","+
 "\"enableDASHFull\": \"SET_TRUE\","+
 "\"useGlobalDedupStore\": \"SET_TRUE\"" ;
 workflow.setVariable("DedupFlags",dedupflags);
 }"/>
<inputs val="<inputs><commCell /><query>select * from archgroup where (flags &amp; 256) &gt; 0 and name='xpath:{/workflow/inputs/Storage}'</query></inputs>"/>
<transition activity="Script_2" commented="0" originalStyle=""
points="" sourceX="135" sourceY="78" status="0"
style="defaultEdge" targetX="-41" targetY="120"
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="1590413562338"
description="executes queries against a commcell database"
displayName="Get Storage policy" 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="143"
x="380" y="44">
<inputs val="<inputs><commCell /><query>Select name from archGroup where id=(Select attrVal from app_planprop where &#xD;
componentNameId=(select id from app_plan where name='xpath:{/workflow/inputs/PlanName}') and attrName = 'Storage policy')</query></inputs>"/>
<transition activity="Execute_1" commented="0" originalStyle=""
points="" sourceX="451" sourceY="61" status="0"
style="defaultEdge" targetX="462" targetY="139"
transitionIndex="0" x="0" y="0">
<condition 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="1590413783882" description=""
displayName="use alternate
 data path" 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="120" x="402" y="122">
<inputs val="<inputs><inputXml class="java.lang.String" _list_="false">&lt;App_UpdateStoragePolicyCopyReq&gt;&#xD;
	&lt;storagePolicyCopyInfo&gt;&#xD;
		&lt;StoragePolicyCopy&gt;&#xD;
			&lt;copyName&gt;Primary&lt;/copyName&gt;&#xD;
			&lt;storagePolicyName&gt;xpath:{/workflow/CommServDBQuery_2/resultSets/row/col}&lt;/storagePolicyName&gt;&#xD;
		&lt;/StoragePolicyCopy&gt;&#xD;
		&lt;copyFlags&gt;&#xD;
			&lt;switchIfOffline&gt;1&lt;/switchIfOffline&gt;&#xD;
			&lt;switchIfBusy&gt;2&lt;/switchIfBusy&gt;&#xD;
			&lt;roundRobbinDataPath&gt;0&lt;/roundRobbinDataPath&gt;&#xD;
		&lt;/copyFlags&gt;&#xD;
		&lt;dataPathConfiguration&gt;&#xD;
			&lt;resourcesOfflineWaitTimeInHoursMinutes&gt;&#xD;
				&lt;hours&gt;0&lt;/hours&gt;&#xD;
				&lt;minutes&gt;0&lt;/minutes&gt;&#xD;
			&lt;/resourcesOfflineWaitTimeInHoursMinutes&gt;&#xD;
			&lt;resourcesBusyWaitTimeInHoursMinutes&gt;&#xD;
				&lt;hours/&gt;&#xD;
				&lt;minutes/&gt;&#xD;
			&lt;/resourcesBusyWaitTimeInHoursMinutes&gt;&#xD;
		&lt;/dataPathConfiguration&gt;&#xD;
	&lt;/storagePolicyCopyInfo&gt;&#xD;
&lt;/App_UpdateStoragePolicyCopyReq&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="WorkflowEnd_1" commented="0"
originalStyle="" points="" sourceX="462" sourceY="139"
status="0" style="defaultEdge" targetX="461" targetY="206"
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="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));"/>
</Workflow_WorkflowDefinition>