This project has moved and is read-only. For the latest updates, please go here.

workflow parameters

Aug 8, 2013 at 4:08 PM
Edited Aug 8, 2013 at 4:09 PM
i am trying to start a workflow with parameters. starting the workflow works great but the parameters never seem to work.
function manreject is the calling function
function StartWorkflow(ItemURL, ItemID, WFName,Params) {
var workflowGUID = null;
var loadingImage = '#Loader' + ItemID;
var workflowTD = '#WorkflowTD' + ItemID;
Params = (typeof Params === "undefined") ? "<root />" : Params;
    operation: "GetTemplatesForItem",
    item: ItemURL,
    async: false,
    completefunc: function (xData, Status) {
      $(xData.responseXML).find("WorkflowTemplates > WorkflowTemplate").each(function(i,e) {
        // hard coded workflow name
        if ( $(this).attr("Name") == WFName ) {              
          var guid = $(this).find("WorkflowTemplateIdSet").attr("TemplateId");        
          if ( guid != null ) {
            workflowGUID = "{" + guid + "}";
    operation: "StartWorkflow",
    item: ItemURL,
    templateId: workflowGUID,
    workflowParameters: Params,
    completefunc: function(xData,Status) {
      //$(workflowTD).html("Workflow Started");
function ManReject(lvl){
if (lvl==1){
  //var Params="<Data><comment>1</comment></Data>"
  var Params="<Data><comment>Test This</comment></Data>"
  StartWorkflow(ItemURL, ItemID, WFName,Params)
here is the xml of the post
<soap:Envelope xmlns:xsi="" xmlns:xsd="" xmlns:soap="">
<StartWorkflow xmlns="">
<comment>Test This</comment>
and here is the xml of the response
<soap:Envelope xmlns:soap="" xmlns:xsi="" xmlns:xsd="">
<StartWorkflowResponse xmlns="">
i get an email from the workflow, that part is working but the comment is supposed to be returned in the email body. the workflow has an Initiation Form Parameters named 'comment' it just never seems to be set. i have tried it as a local variable to and this did not work.

i am using jquery 1.8.2 on google api
Jan 9, 2014 at 5:08 PM
Sorry I never got back to you on this. I'm actually looking for how to do exactly this. If you worked it out and wouldn't mind posting back how, I'd appreciate it! I can't figure out how to access the parameters in the workflow itself. Passing them in isn't a problem.

Feb 17, 2014 at 8:50 PM
Appears this is address in Matt Bramer's blog here:

Using the workflow initiation variable names you can then use this format via the parameter "workflowParameters":

<Data><InitField1>This Value for Field 1</InitField1><InitField2>This Value for Field 2</InitField2></Data>