Creating an XML-operation based activity

Last post 11-07-2014, 3:03 PM by ZeroCool. 3 replies.
Sort Posts: Previous Next
  • Creating an XML-operation based activity
    Posted: 11-07-2014, 2:10 PM

    I am by no means very knowledgable in scripting, let alone XML or Java, but I'm slowly learning.

     It takes forever to add a user group as the owner of clients, especially when you have 30-40 to do at a time. For my delivery guys, I wanted to make something easy to use.

    Long story short, I want to make the XML script to assocate a user group to a client into a workflow.

    I have a workflow created that does the following:

    User inputs:

    - client group

    - User group


    The script will then query CV and pulls the client list

    a ForEach appends each client name with...

    "<entity><clientName>" + Client + "</clientName></entity>"

    ... and outputs to a list.

    I now have all the components needed to create the XML script.

    At this point I was stuck because it didn't appear workflow had a way to actually excute the data. 

    I then found the XML-operation based activity where you can actually create a new activity based around an XML script you create. I thought this was perfect! I create the new activity, created the variables and added them to the XML script.

    I then ran it... and nothing happens. Checking the logs I learned why.

    What should have been inserted as:


    Was appearing as:


    The escape characters (< and >) were being converted before being inserted into the script.

    I'm really stuck at this point. I'll continue to troubleshoot and try to find a way around it, but I'd be curious if anyone found a way around this. Like I said, this is my first forey into true scripting, JAVA, and XML.

  • Re: Creating an XML-operation based activity
    Posted: 11-07-2014, 2:31 PM

    You can use the Qcommand->qoperation->execute activity and paste the xml in the inputXML variable and then replace the clientname and other parameters using the insert variable command

  • Re: Creating an XML-operation based activity
    Posted: 11-07-2014, 2:55 PM

    Also why not just associate the usergroup to the client group itself? You dont need to make this association to individual clients in a client group

  • Re: Creating an XML-operation based activity
    Posted: 11-07-2014, 3:03 PM

    Thanks for the qoperation tip. I tried it early on but couldn't get it to work. I must have messed it up somehow.


    My ultimate goal is to associate a user group to the Client Owners section of each individual client. It has to be done this way because you can't set Client Ownership at the client group level.


    The script worked, but as you said, it was set for association and not ownership. That is my fault, I should have read into it more.

    Instead, I need to adapt this script

    <?xml version='1.0' encoding='UTF-8'?>



    I contact support to find out what the parameter for the Client Group Ownership field is.


The content of the forums, threads and posts reflects the thoughts and opinions of each author, and does not represent the thoughts, opinions, plans or strategies of Commvault Systems, Inc. ("Commvault") and Commvault undertakes no obligation to update, correct or modify any statements made in this forum. Any and all third party links, statements, comments, or feedback posted to, or otherwise provided by this forum, thread or post are not affiliated with, nor endorsed by, Commvault.
Commvault, Commvault and logo, the “CV” logo, Commvault Systems, Solving Forward, SIM, Singular Information Management, Simpana, Commvault Galaxy, Unified Data Management, QiNetix, Quick Recovery, QR, CommNet, GridStor, Vault Tracker, InnerVault, QuickSnap, QSnap, Recovery Director, CommServe, CommCell, SnapProtect, ROMS, and CommValue, are trademarks or registered trademarks of Commvault Systems, Inc. All other third party brands, products, service names, trademarks, or registered service marks are the property of and used to identify the products or services of their respective owners. All specifications are subject to change without notice.
Copyright © 2019 Commvault | All Rights Reserved. | Legal | Privacy Policy