Enumerating the Site Workflow IDs

May 4, 2015 at 5:12 PM
I have use the GetTemplatesForItem to enumerate the workflow templateIDs for Lists and Libraries. However, I can't seem to enumerate the them for the Site Workflows. Is this just not possible or am I doing something wrong. Here's a sample of my code.

// -------------------------------------------------
// Get the Workflow template IDs
function getWorkflowTID() {
var i;
var workflowGUID = null;
var itemURL = $().SPServices.SPGetCurrentSite() +"/";
$().SPServices({
  operation: "GetTemplatesForItem",
  item: itemURL,
  async: false,
  debug: true,
  completefunc: function (xData, Status) {
    $(xData.responseXML).find("WorkflowTemplates > WorkflowTemplate").each(function(i,e) {
          var guid = $(this).find("WorkflowTemplateIdSet").attr("TemplateId");        
      if ( guid != null ) {
        workflowGUID = "{" + guid + "}";
        wkfl_tid[$(this).attr("Name")] = workflowGUID;
        i += 1;
      }
      });
  }
});
}

Referencing SPservices 0.7.1a and jQuery1.11.1