TemplateUpdate

 

Dovico.TrackITAPI.CWorkflow.TemplateUpdate(System.String,Dovico.TrackITAPI.CStateInfo)

 

 

Function Overview:

This method is called when a template has been modified, and the caller wants to update all related workflows with the employees and/or managers. the information should be in workflowtemplateupdate.xsd format. This consists of passing in all workflow ids for workflows to be updated, along with the WORKFLOWEMPLOYEES and WORKFLOWMANAGERS elements (in the same format as the WorkflowSave).

 

 

Parameter List:

sXml - string - xml for the update to take place in the format workflowtemplateupdate.xsd

siState - CStateInfo - State information needed to process the transaction

 

Returns

An empty string reserved for future use.

 

Example:

// build up xml that will update workflows 100 and 101

// there is one employee these workflows apply to,

// and two approving managers

string sXml = "<WorkflowTemplateUpdate:WORKFLOWTEMPLATEUPDATE ";

sXml += "xmlns:WorkflowTemplateUpdate=\"http://www.dovico.com/schemas/workflowtemplateupdate.xsd\">";

sXml += "<WORKFLOWS><ID>100</ID><ID>101</ID></WORKFLOWS>";

sXml += "<WORKFLOWEMPLOYEES><WORKFLOWEMPLOYEE EMPLOYEE=\"100\"/></WORKFLOWEMPLOYEES>";

sXml += "<WORKFLOWMANAGERS><WORKFLOWMANAGER EMPLOYEE=\"100\" ORDER=\"1\"/>";

sXml += "<WORKFLOWMANAGER EMPLOYEE=\"101\" ORDER=\"2\"/></WORKFLOWMANAGERS>";

sXml += "</WorkflowTemplateUpdate:WORKFLOWTEMPLATEUPDATE>";

// call the method to update multiple workflows with new information

wsapi.MethodInvoke("WorkflowTemplateUpdate", sXml, stToken);