All my workflows will start but stay on the submission page until the workflow completes.
What am I doing wrong?
I want to enter the options for the workflow and then have it return the jobid.
Thanks.
All my workflows will start but stay on the submission page until the workflow completes.
What am I doing wrong?
I want to enter the options for the workflow and then have it return the jobid.
Thanks.
Best answer by christopherlecky
I tried to post the XML of an example workflow but it got blocked.
Most of the workflows I make use the intput wizard, because the standard inputs don’t allow for filtering.
for example I have a workflow for decommissioning servers, if I allow selection of the servers for the workflow input it will allow end users to select the commserve or media agents either maliciously or by accident.
By using a wizard I can select for specific clients, based on whatever criteria I consider to be relevant.
For those workflows I cannot set the workflow as interactive to it just sits there's and waits while the workflow runs.
I guess the question is how do I switch the workflow from interactive to non-interactive?
Also. how do I get the workflow to pop the jobid for the workflow after submission?
Essentially when I set the workflow for interactive it submits but doesn't give you the jobid in command center like I see some workflows do.
This makes running the workflow seamless, I want to submit the workflow then click on the jobid to monitor.
We need more details… Can you share a generalized (with no credentials etc.) WF?
Sure.
I’ll share one I just cooked up.
<?xml version="1.0" encoding="UTF-8"?>
<Workflow_WorkflowDefinition outputs="<outputs />" webHidden="0" isHtmlDescription="0" inputs="<inputs><Clients class="java.lang.String" _list_="false" /><Group class="java.lang.String" _list_="false" /></inputs>" interactive="0" description="Adds List of Clients to a specified group" manualPercentageComplete="0" apiMode="0" executeOnWeb="1" variables="<variables><Succesfull class="java.lang.Integer" _list_="false" /><Failed class="java.lang.Integer" _list_="false" /></variables>" revision="$Revision: $" tags="" uniqueGuid="5ff5e09a-7f55-4b45-ae46-830904420a7e" name="Create Client Groups" config="<configuration><regex_findfqdn class="java.lang.String" _list_="false">(?i)^(?:([a-z0-9-]+|\*)\.)?([a-z0-9-]{1,61})\.([a-z0-9]{2,7})$</regex_findfqdn><regex_checkiftextisip class="java.lang.String" _list_="false" /></configuration>">
<schema>
<outputs className="" type="" name="outputs" />
<variables className="" type="" name="variables">
<children hidden="0" defaultValue="" className="java.lang.Integer" type="{http://www.w3.org/2001/XMLSchema}integer" listType="0" inputType="java.lang.Integer" attribute="0" controlType="0" name="Succesfull" />
<children hidden="0" defaultValue="" className="java.lang.Integer" type="{http://www.w3.org/2001/XMLSchema}integer" listType="0" inputType="java.lang.Integer" attribute="0" controlType="0" name="Failed" />
</variables>
<inputs className="" type="" attribute="0" name="inputs">
<children hidden="0" defaultValue="" displayName="" className="java.lang.String" type="{http://www.w3.org/2001/XMLSchema}string" listType="0" required="0" minimumValue="" inputType="java.lang.String" attribute="0" documentation="" controlHidden="0" readOnly="0" searchable="0" controlType="0" name="Group" maximumValue="" />
<children hidden="0" defaultValue="" displayName="" className="java.lang.String" type="{http://www.w3.org/2001/XMLSchema}string" listType="0" required="0" minimumValue="" inputType="java.lang.String" attribute="0" documentation="" controlHidden="0" readOnly="0" searchable="0" controlType="1" name="Clients" maximumValue="" />
</inputs>
<config className="" type="" attribute="0" name="configuration">
<children hidden="0" defaultValue="" displayName="" className="java.lang.String" type="{http://www.w3.org/2001/XMLSchema}string" listType="0" required="0" minimumValue="" inputType="java.lang.String" attribute="0" documentation="" controlHidden="0" readOnly="0" searchable="0" controlType="0" name="regex_findfqdn" maximumValue="" />
<children hidden="0" defaultValue="" displayName="" className="java.lang.String" type="{http://www.w3.org/2001/XMLSchema}string" listType="0" required="0" minimumValue="" inputType="java.lang.String" attribute="0" documentation="" controlHidden="0" readOnly="0" searchable="0" controlType="0" name="regex_checkiftextisip" maximumValue="" />
</config>
</schema>
<Start displayName="Start" interactive="0" originalStyle="" jobMode="0" description="" waitSetting="0" continueOnFailure="0" commented="0" height="36" created="0" breakpoint="0" uniqueName="Start_Workflow" skipAttempt="0" name="Start" width="58" x="328" y="135" style="image;image=/images/jgraphx/house.png">
<inputs val="<inputs />" />
<transition sourceX="70" sourceY="60" activity="SanitizeClientinputs" targetY="590" targetX="410" originalStyle="" description="" points="" x="0" y="0" transitionIndex="0" style="defaultEdge" commented="0" status="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 displayName="Create Client Group" interactive="0" originalStyle="" jobMode="0" description="" waitSetting="0" continueOnFailure="0" namespaceUri="commvault.cte.workflow.activities.cmd.operation" commented="0" height="50" created="1719920321807" breakpoint="0" uniqueName="CreateClientGroup" skipAttempt="1" name="Execute" width="170" x="266" y="318" style="label;image=commvault.cte.workflow.activities.cmd.operation.OperationExecute;shadow=0">
<inputs val="<inputs><inputXml class="java.lang.String" _list_="false">&lt;App_PerformClientGroupReq&gt;&#xD;
&lt;clientGroupDetail&gt;&#xD;
&lt;associatedClients&gt;&#xD;
 &lt;clientName/&gt;&#xD;
 &lt;/associatedClients&gt;&#xD;
&lt;associatedClients&gt;&#xD;
 &lt;clientName/&gt;&#xD;
 &lt;/associatedClients&gt;&#xD;
&lt;clientGroup&gt;&#xD;
 &lt;clientGroupName&gt;xpath:{/workflow/inputs/Group}&lt;/clientGroupName&gt;&#xD;
 &lt;newName/&gt;&#xD;
 &lt;/clientGroup&gt;&#xD;
&lt;clientGroupActivityControl&gt;&#xD;
&lt;activityControlOptions&gt;&#xD;
 &lt;activityType/&gt;&#xD;
 &lt;dateTime/&gt;&#xD;
 &lt;enableActivityType/&gt;&#xD;
 &lt;enableAfterADelay/&gt;&#xD;
 &lt;/activityControlOptions&gt;&#xD;
&lt;activityControlOptions&gt;&#xD;
 &lt;activityType/&gt;&#xD;
 &lt;dateTime/&gt;&#xD;
 &lt;enableActivityType/&gt;&#xD;
 &lt;enableAfterADelay/&gt;&#xD;
 &lt;/activityControlOptions&gt;&#xD;
 &lt;/clientGroupActivityControl&gt;&#xD;
&lt;clientGroupSecurity&gt;&#xD;
&lt;associatedUserGroups&gt;&#xD;
 &lt;userGroupName/&gt;&#xD;
 &lt;/associatedUserGroups&gt;&#xD;
&lt;associatedUserGroups&gt;&#xD;
 &lt;userGroupName/&gt;&#xD;
 &lt;/associatedUserGroups&gt;&#xD;
 &lt;associatedUserGroupsOperationType/&gt;&#xD;
&lt;ownerCapabilities&gt;&#xD;
 &lt;individualCapabilities/&gt;&#xD;
 &lt;individualCapabilities/&gt;&#xD;
 &lt;individualCapabilitiesOperationType/&gt;&#xD;
 &lt;/ownerCapabilities&gt;&#xD;
 &lt;/clientGroupSecurity&gt;&#xD;
 &lt;description/&gt;&#xD;
&lt;dlpPropertise&gt;&#xD;
 &lt;dlpContents/&gt;&#xD;
 &lt;dlpEnableClientKeys/&gt;&#xD;
 &lt;dlpFilters/&gt;&#xD;
 &lt;dlpFilters/&gt;&#xD;
 &lt;dlpFilters/&gt;&#xD;
 &lt;dlpMinFileAgeMins/&gt;&#xD;
 &lt;dlpRMProperties/&gt;&#xD;
 &lt;dlpScanIntervalMins/&gt;&#xD;
 &lt;dlpStolen/&gt;&#xD;
 &lt;enableDLP/&gt;&#xD;
 &lt;/dlpPropertise&gt;&#xD;
 &lt;isAddinClientGroup/&gt;&#xD;
 &lt;isEDCInstanceAssociated/&gt;&#xD;
 &lt;isEDCInstanceDeleted/&gt;&#xD;
 &lt;isNetworkThrottleEnabled/&gt;&#xD;
 &lt;isSmartClientGroup/&gt;&#xD;
&lt;overrideHigherLevelSettings&gt;&#xD;
 &lt;overrideGlobalAuthentication/&gt;&#xD;
 &lt;useLocalSystemAccount/&gt;&#xD;
&lt;userAccount&gt;&#xD;
 &lt;userName/&gt;&#xD;
 &lt;/userAccount&gt;&#xD;
 &lt;/overrideHigherLevelSettings&gt;&#xD;
&lt;scgRule&gt;&#xD;
 &lt;op/&gt;&#xD;
&lt;rules&gt;&#xD;
&lt;rule&gt;&#xD;
 &lt;op/&gt;&#xD;
&lt;rules&gt;&#xD;
&lt;rule&gt;&#xD;
 &lt;filterID/&gt;&#xD;
 &lt;propID/&gt;&#xD;
 &lt;propType/&gt;&#xD;
 &lt;secValue/&gt;&#xD;
 &lt;value/&gt;&#xD;
 &lt;/rule&gt;&#xD;
 &lt;/rules&gt;&#xD;
 &lt;/rule&gt;&#xD;
 &lt;/rules&gt;&#xD;
 &lt;/scgRule&gt;&#xD;
&lt;webSearchServer&gt;&#xD;
 &lt;clientName/&gt;&#xD;
 &lt;/webSearchServer&gt;&#xD;
 &lt;/clientGroupDetail&gt;&#xD;
 &lt;clientGroupOperationType&gt;Create&lt;/clientGroupOperationType&gt;&#xD;
 &lt;/App_PerformClientGroupReq&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 sourceX="350" sourceY="340" activity="WorkflowEnd_1" targetY="330" targetX="570" originalStyle="" description="" points="" x="0" y="0" transitionIndex="0" style="defaultEdge" commented="0" status="2">
<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>
<transition sourceX="350" sourceY="340" activity="ForEach_Client" targetY="530" targetX="360" originalStyle="" description="" points="" x="0" y="0" transitionIndex="0" style="defaultEdge" commented="0" status="3">
<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 displayName="ForEach" interactive="0" originalStyle="" jobMode="0" description="iterates a group of activities over a list of values" waitSetting="0" continueOnFailure="0" namespaceUri="commvault.cte.workflow.activities" commented="0" height="310" created="1719920390791" breakpoint="0" uniqueName="ForEach_Client" skipAttempt="1" name="ForEach" width="430" x="210" y="440" style="swimlane">
<inputs val="<inputs><name class="java.lang.String">output</name><values class="java.lang.Object" _list_="false">xpath:{/workflow/SanitizeClientinputs/output}</values><numberOfParallelExecutions class="java.lang.Integer" _list_="false">1</numberOfParallelExecutions><continueOnFailure class="java.lang.Boolean" _list_="false">false</continueOnFailure></inputs>" />
<superProcess>
<Start displayName="Start" interactive="0" originalStyle="" jobMode="0" description="" waitSetting="0" continueOnFailure="0" commented="0" height="30" created="1719920390791" breakpoint="0" uniqueName="Start_UpdatingClientGroup" skipAttempt="1" name="Start" width="120" x="94" y="41" style="label;fillColor=#FFFF33;gradientColor=#FFFF00;shadow=0">
<inputs val="<inputs />" />
<transition sourceX="157" sourceY="55" activity="updateClientGroup" targetY="145" targetX="167" originalStyle="" description="" points="" x="0" y="0" transitionIndex="0" style="defaultEdge" commented="0" status="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 displayName="Update Client Group" interactive="0" originalStyle="" jobMode="0" description="" waitSetting="0" continueOnFailure="0" namespaceUri="commvault.cte.workflow.activities.cmd.operation" commented="0" height="50" created="1719920706523" breakpoint="0" uniqueName="updateClientGroup" skipAttempt="1" name="Execute" width="190" x="58" y="111" style="label;image=commvault.cte.workflow.activities.cmd.operation.OperationExecute;shadow=0">
<onExit language="4" script="String event = "";
String client = xpath:{/workflow/ForEach_Client/output};
String group = xpath:{/workflow/inputs/Group};
int exitcode = xpath:{/workflow/updateClientGroup/exitCode};
if (exitcode != 0)
 {event = String.format("%s was added to client group %s",client,group);}
else
 {event = String.format("%s was not added to client group %s",client,group);}

workflow.setLocalVariable("event",event);" />
<inputs val="<inputs><inputXml class="java.lang.String" _list_="false">&lt;App_PerformClientGroupReq&gt;&#xD;
 &lt;clientGroupOperationType&gt;Update&lt;/clientGroupOperationType&gt;&#xD;
&lt;clientGroupDetail&gt;&#xD;
 &lt;associatedClientsOperationType&gt;2&lt;/associatedClientsOperationType&gt;&#xD;
&lt;associatedClients&gt;&#xD;
 &lt;clientName&gt;xpath:{/workflow/ForEach_Client/output}&lt;/clientName&gt;&#xD;
 &lt;/associatedClients&gt;&#xD;
&lt;associatedClients&gt;&#xD;
 &lt;clientName/&gt;&#xD;
 &lt;/associatedClients&gt;&#xD;
&lt;clientGroup&gt;&#xD;
 &lt;clientGroupName&gt;xpath:{/workflow/inputs/Group}&lt;/clientGroupName&gt;&#xD;
 &lt;newName/&gt;&#xD;
 &lt;/clientGroup&gt;&#xD;
&lt;clientGroupActivityControl&gt;&#xD;
&lt;activityControlOptions&gt;&#xD;
 &lt;activityType/&gt;&#xD;
 &lt;dateTime/&gt;&#xD;
 &lt;enableActivityType/&gt;&#xD;
 &lt;enableAfterADelay/&gt;&#xD;
 &lt;/activityControlOptions&gt;&#xD;
&lt;activityControlOptions&gt;&#xD;
 &lt;activityType/&gt;&#xD;
 &lt;dateTime/&gt;&#xD;
 &lt;enableActivityType/&gt;&#xD;
 &lt;enableAfterADelay/&gt;&#xD;
 &lt;/activityControlOptions&gt;&#xD;
 &lt;/clientGroupActivityControl&gt;&#xD;
&lt;clientGroupSecurity&gt;&#xD;
&lt;associatedUserGroups&gt;&#xD;
 &lt;userGroupName/&gt;&#xD;
 &lt;/associatedUserGroups&gt;&#xD;
&lt;associatedUserGroups&gt;&#xD;
 &lt;userGroupName/&gt;&#xD;
 &lt;/associatedUserGroups&gt;&#xD;
 &lt;associatedUserGroupsOperationType/&gt;&#xD;
&lt;ownerCapabilities&gt;&#xD;
 &lt;individualCapabilities/&gt;&#xD;
 &lt;individualCapabilities/&gt;&#xD;
 &lt;individualCapabilitiesOperationType/&gt;&#xD;
 &lt;/ownerCapabilities&gt;&#xD;
 &lt;/clientGroupSecurity&gt;&#xD;
 &lt;description/&gt;&#xD;
&lt;dlpPropertise&gt;&#xD;
 &lt;dlpContents/&gt;&#xD;
 &lt;dlpEnableClientKeys/&gt;&#xD;
 &lt;dlpFilters/&gt;&#xD;
 &lt;dlpFilters/&gt;&#xD;
 &lt;dlpFilters/&gt;&#xD;
 &lt;dlpMinFileAgeMins/&gt;&#xD;
 &lt;dlpRMProperties/&gt;&#xD;
 &lt;dlpScanIntervalMins/&gt;&#xD;
 &lt;dlpStolen/&gt;&#xD;
 &lt;enableDLP/&gt;&#xD;
 &lt;/dlpPropertise&gt;&#xD;
 &lt;isAddinClientGroup/&gt;&#xD;
 &lt;isEDCInstanceAssociated/&gt;&#xD;
 &lt;isEDCInstanceDeleted/&gt;&#xD;
 &lt;isNetworkThrottleEnabled/&gt;&#xD;
 &lt;isSmartClientGroup/&gt;&#xD;
&lt;overrideHigherLevelSettings&gt;&#xD;
 &lt;overrideGlobalAuthentication/&gt;&#xD;
 &lt;useLocalSystemAccount/&gt;&#xD;
&lt;userAccount&gt;&#xD;
 &lt;userName/&gt;&#xD;
 &lt;/userAccount&gt;&#xD;
 &lt;/overrideHigherLevelSettings&gt;&#xD;
&lt;scgRule&gt;&#xD;
 &lt;op/&gt;&#xD;
&lt;rules&gt;&#xD;
&lt;rule&gt;&#xD;
 &lt;op/&gt;&#xD;
&lt;rules&gt;&#xD;
&lt;rule&gt;&#xD;
 &lt;filterID/&gt;&#xD;
 &lt;propID/&gt;&#xD;
 &lt;propType/&gt;&#xD;
 &lt;secValue/&gt;&#xD;
 &lt;value/&gt;&#xD;
 &lt;/rule&gt;&#xD;
 &lt;/rules&gt;&#xD;
 &lt;/rule&gt;&#xD;
 &lt;/rules&gt;&#xD;
 &lt;/scgRule&gt;&#xD;
&lt;webSearchServer&gt;&#xD;
 &lt;clientName/&gt;&#xD;
 &lt;/webSearchServer&gt;&#xD;
 &lt;claQuota/&gt;&#xD;
 &lt;/clientGroupDetail&gt;&#xD;
 &lt;clientGroupOperationType&gt;Update&lt;/clientGroupOperationType&gt;&#xD;
 &lt;/App_PerformClientGroupReq&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 sourceX="150" sourceY="140" activity="LogEvent_1" targetY="220" targetX="180" originalStyle="" description="" points="" x="0" y="0" transitionIndex="0" style="defaultEdge" commented="0" status="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 displayName="java:{
return workflow.getLocalVariable("event");
}:java" interactive="0" originalStyle="" jobMode="0" description="" waitSetting="0" continueOnFailure="0" namespaceUri="commvault.cte.workflow.activities" commented="0" height="70" created="1719926622609" breakpoint="0" uniqueName="LogEvent_1" skipAttempt="0" name="LogEvent" width="340" x="27" y="203" style="label;image=commvault.cte.workflow.activities.LogEventActivity;shadow=0">
<inputs val="<inputs><severity class="workflow.types.SeverityLevel" _list_="false">INFO</severity><message class="java.lang.String" _list_="false" /></inputs>" />
</Activity>
</superProcess>
<activitySchema>
<outputs name="outputs">
<children hidden="0" defaultValue="" className="java.lang.Object" type="{http://www.w3.org/2001/XMLSchema}anyType" listType="0" inputType="java.lang.Object" attribute="0" name="output" />
</outputs>
<inputs defaultValue="" className="" type="" listType="0" name="">
<children hidden="0" defaultValue="" className="java.lang.String" type="{http://www.w3.org/2001/XMLSchema}string" listType="0" inputType="java.lang.String" attribute="0" name="name" />
<children hidden="0" defaultValue="" className="java.lang.Object" type="{http://www.w3.org/2001/XMLSchema}anyType" listType="0" inputType="java.lang.Object" attribute="0" name="values" />
<children hidden="0" defaultValue="1" displayName="" className="java.lang.Integer" type="{http://www.w3.org/2001/XMLSchema}integer" listType="0" inputType="java.lang.Integer" attribute="0" name="numberOfParallelExecutions" />
<children hidden="0" defaultValue="false" className="java.lang.Boolean" type="{http://www.w3.org/2001/XMLSchema}boolean" listType="0" inputType="java.lang.Boolean" attribute="0" name="continueOnFailure" />
</inputs>
</activitySchema>
</Activity>
<Activity displayName="Sanitize Client Inputs" interactive="0" originalStyle="" jobMode="0" description="" waitSetting="0" continueOnFailure="0" namespaceUri="commvault.cte.workflow.activities" commented="0" height="50" created="1712154451302" breakpoint="0" uniqueName="SanitizeClientinputs" skipAttempt="1" name="Script" width="170" x="264" y="228" style="label;image=commvault.cte.workflow.activities.ScriptActivity;shadow=0;whiteSpace=wrap">
<inputs val="<inputs><script language="4" script="/*&#xD;&#xA;Create Client Group script&#xD;&#xA;Christopher Lecky &#xD;&#xA;Cleans up ClientName list&#xD;&#xA;&#xD;&#xA;*/&#xD;&#xA;import java.util.HashMap;&#xD;&#xA;import java.util.ArrayList;&#xD;&#xA;import java.util.List;&#xD;&#xA;import java.util.regex.*; &#xD;&#xA;&#xD;&#xA; &#xD;&#xA;//---------------------------- Script Variables Begin --------------------------&#xD;&#xA;def inputClientNamestring = xpath:{/workflow/inputs/Clients};&#xD;&#xA;String status = &quot;&quot;;&#xD;&#xA;&#xD;&#xA;//##################################################### Script ##################################################################################&#xD;&#xA;logger.info(System.getProperty(&quot;line.separator&quot;));&#xD;&#xA;logger.info(&quot;############################################ Sanitize ClientName Search list Script LOG ############################################&quot;);&#xD;&#xA;&#xD;&#xA;String[] ClientNames = sanitizeClientNamelist(inputClientNamestring);&#xD;&#xA;return ClientNames;&#xD;&#xA;&#xD;&#xA;//################################################# Functions #############################################&#xD;&#xA;// --------------------------- Function - String to Map Begin----------------&#xD;&#xA;Map stringToMap(String data) {&#xD;&#xA; Map map = new HashMap();&#xD;&#xA; String key,value;&#xD;&#xA; String[] keyValues = data.split(&quot;,&quot;);&#xD;&#xA; for (String keyValue : keyValues) {&#xD;&#xA; String[] parts = keyValue.split(&quot;=&quot;);&#xD;&#xA; key = parts[0];&#xD;&#xA; value = parts[1];&#xD;&#xA; logger.info(&quot;Key :&quot; + key + &quot; Value:&quot; + value);&#xD;&#xA; map.put(key, value);&#xD;&#xA; }&#xD;&#xA;return map;&#xD;&#xA;}&#xD;&#xA;// --------------------------- Function - Sanitize ClientName list ----------------&#xD;&#xA;&#xD;&#xA;String[] sanitizeClientNamelist(String ClientNames){&#xD;&#xA; ArrayList tempinputClientNameList = ClientNames.split(&quot;[^a-zA-Z0-9-.]&quot;);&#xD;&#xA; &#xD;&#xA; tempinputClientNameList.removeAll(Collections.singleton(null));&#xD;&#xA; tempinputClientNameList.removeAll(Collections.singleton(&quot;&quot;));&#xD;&#xA; String newLine = System.getProperty(&quot;line.separator&quot;);&#xD;&#xA; List sanitizedClientNamelist = new ArrayList();&#xD;&#xA; logger.info(&quot;Starting virtual machine name validation:&quot;);&#xD;&#xA; for (tempinputClientName : tempinputClientNameList){&#xD;&#xA; &#xD;&#xA; if (isthisanIP(tempinputClientName)){&#xD;&#xA; status = String.format(&quot;%-30s is a IP address and will be removed from the search list&quot;,tempinputClientName); &#xD;&#xA; logger.info(status);&#xD;&#xA; continue; //Skips to next ClientNamename in list&#xD;&#xA; }&#xD;&#xA; &#xD;&#xA; if (isthisaHostName(tempinputClientName)){&#xD;&#xA; String[] parts = tempinputClientName.split( &quot;\\.&quot; );&#xD;&#xA; sanitizedClientNamelist.add(parts[0]);&#xD;&#xA; sanitizedClientNamelist.add(tempinputClientName);&#xD;&#xA; status = String.format(&quot;%-30s is a fully qualified name, the fully qualified name AND the shorteneded name will be added to the search list&quot;,tempinputClientName);&#xD;&#xA; sanitizedClientNamelist.add(parts[0]);&#xD;&#xA; sanitizedClientNamelist.add(tempinputClientName);&#xD;&#xA; }else{&#xD;&#xA; status = String.format(&quot;%-30s is a valid name and will be added to the search list&quot; ,tempinputClientName);&#xD;&#xA; sanitizedClientNamelist.add(tempinputClientName);&#xD;&#xA; }&#xD;&#xA; logger.info(status);&#xD;&#xA; &#xD;&#xA; }&#xD;&#xA; status = sanitizedClientNamelist + &quot; will be processed&quot; ;&#xD;&#xA; logger.info(status); &#xD;&#xA;&#xD;&#xA;return sanitizedClientNamelist;&#xD;&#xA;}&#xD;&#xA;// --------------------------- Function is this an IP-----------------------&#xD;&#xA;boolean isthisanIP (String ip) {&#xD;&#xA; try {&#xD;&#xA; if (ip == null || ip.isEmpty()){return false;}&#xD;&#xA; String[] parts = ip.split( &quot;\\.&quot; );&#xD;&#xA; if ( parts.length != 4 ){return false;}&#xD;&#xA;&#xD;&#xA; for (String s : parts) {&#xD;&#xA; int i = Integer.parseInt(s);&#xD;&#xA; if ( (i &lt; 0) || (i &gt; 255) ){return false;}&#xD;&#xA; }&#xD;&#xA; if ( ip.endsWith(&quot;.&quot;) ){return false;}&#xD;&#xA; return true;&#xD;&#xA; } catch (NumberFormatException nfe) {return false;}&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;boolean isthisaHostName (String name) {&#xD;&#xA; String fqdnregex = xpath:{/workflow/configuration/regex_findfqdn};&#xD;&#xA; Pattern regexPattern = Pattern.compile(fqdnregex);&#xD;&#xA; Matcher matchRegex = regexPattern.matcher(name);&#xD;&#xA; return matchRegex.matches();&#xD;&#xA;}" /></inputs>" />
<transition sourceX="346" sourceY="258" activity="CreateClientGroup" targetY="378" targetX="436" originalStyle="" description="" points="" x="16" y="178" transitionIndex="0" style="defaultEdge" commented="0" status="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 displayName="Client group xpath:{/workflow/inputs/Group} could not be created" interactive="0" originalStyle="" jobMode="0" description="Ends the workflow" waitSetting="0" continueOnFailure="0" namespaceUri="commvault.cte.workflow.activities" commented="0" height="30" created="1719926001812" breakpoint="0" uniqueName="WorkflowEnd_1" skipAttempt="0" name="WorkflowEnd" width="470" x="555" y="323" style="label;image=commvault.cte.workflow.activities.EndActivity;shadow=0">
<inputs val="<inputs><completionStatus class="workflow.types.WorkflowCompletionStatus" _list_="false">FAILED</completionStatus><failureMessage class="java.lang.String" _list_="false">Client Group xpath:{/workflow/inputs/Group} could not be created</failureMessage></inputs>" />
</Activity>
<formProperties css="" javaScript="" pageMode="0" formVersion="0">
<rules />
</formProperties>
<minCommCellVersion servicePack="0" releaseID="16" />
</Workflow_WorkflowDefinition>
Oh brother. I pasted the XML but the post got flagged for review ðŸ˜
What is happening?
I tried to post the XML of an example workflow but it got blocked.
Most of the workflows I make use the intput wizard, because the standard inputs don’t allow for filtering.
for example I have a workflow for decommissioning servers, if I allow selection of the servers for the workflow input it will allow end users to select the commserve or media agents either maliciously or by accident.
By using a wizard I can select for specific clients, based on whatever criteria I consider to be relevant.
For those workflows I cannot set the workflow as interactive to it just sits there's and waits while the workflow runs.
I guess the question is how do I switch the workflow from interactive to non-interactive?
Also. how do I get the workflow to pop the jobid for the workflow after submission?
Essentially when I set the workflow for interactive it submits but doesn't give you the jobid in command center like I see some workflows do.
This makes running the workflow seamless, I want to submit the workflow then click on the jobid to monitor.
BUMP
6 likes
5 likes
4 likes
3 likes
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
OKSorry, our virus scanner detected that this file isn't safe to download.
OKWe use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.