execute Workflow from Commandline w/ variable input

Last post 01-07-2015, 7:58 AM by ameykarandikar. 3 replies.
Sort Posts: Previous Next
  • execute Workflow from Commandline w/ variable input
    Posted: 01-06-2015, 11:17 AM

    Hi There,

    I there a way to execute a Workflow from the Commandline (qoperation execute -af ...) and pass the  required input from the commandline ?

    all I get is like:

        <subTasks>
    <options>
    <workflowJobOptions>
    &lt;inputs&gt;
    &lt;Barcodes class="java.lang.String"&gt;
    F00000 F00001 F00002
    &lt;/Barcodes&gt;
    &lt;/inputs&gt;
    </workflowJobOptions>
    </options>
    <subTask>
    <operationType>WORK_FLOW</operationType>
    I'd like to pass the Barcodes from the commandline directly instead of modifying the script each time it is called.
    regards
    Klaus
  • Re: execute Workflow from Commandline w/ variable input
    Posted: 01-06-2015, 4:36 PM

    You pass in inputs via the command line as an xml blob via the workflowJobOptions parameter.

    So in your case you can call

    qoperation execute -af workflow.xml –workflowJobOptions "<inputs><Barcodes>F00000 F00001 F00002</Barcodes></inputs>"

    If you added another input you would just add the additional element in your inputs blob

    –workflowJobOptions "<inputs><Barcodes>F00000 F00001 F00002</Barcodes><anotherInput>value</anotherInput></inputs>"

  • Re: execute Workflow from Commandline w/ variable input
    Posted: 01-07-2015, 3:11 AM

    Hi cwunderland,

    that's what I tried yesterday :( 

    it doesn't lead to an error or hanging / queued workflow jobs if I use this Syntax, but the Input is simply ignored.

    The workflow will be startet / executed with exactly the parameter already present in the xml. 
    Currently I'm on V10SP8+ and planning to update to SP9 next week. maybe this helps fix the problem

    ARRRGGG !

    I found my problem !

    I started a PowerShell and from there a "cmd" prompt on my Windows Server, before issueing the command.
    Now I startet a "cmd" directly from "Start" and the input is processed as expacted.

    Did I already mention, that I don't like Windows Commandline Processing ? 

    Thanx for your help

    Klaus

  • Re: execute Workflow from Commandline w/ variable input
    Posted: 01-07-2015, 7:58 AM

    You can also try REST apis

    http://documentation.commvault.com/commvault/v10/article?p=features/rest_api/operations/post_workflow_execute.htm

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.
Close
Copyright © 2019 Commvault | All Rights Reserved. | Legal | Privacy Policy