Hi,
If you're on-premise you can start workflows using script and the workflow.asmx web service, association data is passed in the following format:
<Data>
<your workflow variable name 1>hello</your workflow variable name 1>
<your workflow variable name 2>world</your workflow variable name 2>
</Data>
function startsiteworkflow(wfName, 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>" +
"<StartSiteWorkflow xmlns=""http://nintex.com">" +
"<workflowName>" + wfName + "</workflowName>" +
"<associationData>" + associationdata + "</associationData>" +
"</StartSiteWorkflow>" +
"</soap:Body>" +
"</soap:Envelope>";
$.ajax({
type: "POST",
url: webMethod,
beforeSend: function (xhr) { xhr.setRequestHeader("SOAPAction", "http://nintex.com/StartSiteWorkflow"); },
data: soap,
contentType: "text/xml; charset=utf-8",
dataType: "xml",
success: function (data) {
},
error: function (e) {
}
});
}
Jan