This is probalby an easy question, but when starting a workflow using the StartWorkflowOnListItem via javascript, the start form doesn't appear. It just runs the workflows without showing the start form. Is there a way to show the start form? The start form variable is a list of users and the workflow simply sends them a notification.
Note: it does start the workflow and returns success.
I wasn't able to find anything that address my issue. Here is my function.
function startNotificationWorkflow(wfName, itemId, listName) {
var associationData = '';
var webMethod = _spPageContextInfo.webAbsoluteUrl + '/_vti_bin/NintexWorkflow/Workflow.asmx';
var soap = "<?xml version=""1.0"" encoding=""utf-8""?>" +
"<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd=""http://www.w3.org/2001/XMLSchema" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/">" +
"<soap:Body>" +
"<StartWorkflowOnListItem xmlns=""http://nintex.com">" +
"<itemId>" + itemId + "</itemId>" +
"<listName>" + listName + "</listName>" +
"<workflowName>" + wfName + "</workflowName>" +
"<associationData></associationData>" +
"</StartWorkflowOnListItem>" +
"</soap:Body>" +
"</soap:Envelope>";
$.ajax({
type: "POST",
url: webMethod,
beforeSend: function (xhr) { xhr.setRequestHeader("SOAPAction", "http://nintex.com/StartWorkflowOnListItem"); },
data: soap,
contentType: "text/xml; charset=utf-8",
dataType: "xml",
success: function (data) {
alert('success');
},
error: function (requestObject, error, errorThrown) {
alert(requestObject.status + " " + error + " " + errorThrown);
}
});
}