StartWorkflow

Feb 21, 2012 at 3:24 PM

Hey,

I have a problem with spservice and startworkflow.

I check on the wiki http://spservices.codeplex.com/wikipage?title=StartWorkflow&referringTitle=Workflow

My code :

 $().SPServices({
    operation: "StartWorkflow",
    debug: true,
    item: encodeabsUrl,
    templateId: templateId,
    workflowParameters: "<root />",
    completefunc: function(xData, Status) {
     var out =  $().SPServices.SPDebugXMLHttpResult({node:  xData.responseXML});
     $("#error").append(out);
    }
  });

In the SPDebugXMLHttpResult i don't see an error but when i check on my list the field for the workflow display "error occured".

i notice that it's the system account who launch the workflow instead of the current user when i launch manuelly.

have you meet this case already ?

Do you know how i can launch the workflow with the current user by spservice ?

Manuelly the workflow excecute fine .