Versions: SharePoint 2013
Definitions: SPWorkflowManager, SharePoint workflow, SharePoint custom action, SharePoint list, SharePoint item
References:
Tags: #JavaScript, #JQuery, #SharePoint
An easy way to start a SharePoint Workflow using JavaScript without need for SPWorkflowManager

/**
 * Launches a workflow programmatically without need for SPWorkflowManager, it redirects the user to the workflow launch page.
 * - This function is useful when you would to check something before starting the workflow or starting a workflow from another list (usually custom action)
 * @param {string} listGuid - GUID of the list to which the workflow is associated
 * @param {number} itemId - ID of the target item (use {ItemId} token in the custom action to send this id)
 * @param {string} wfTemplateId - TemplateID of the workflow (get it from the Url of the workflow launch page)
 * @param {string} wfAssociationName - AssociationName of the workflow (get it from the Url of the workflow launch page)
 */
function startWorkflow(listGuid, itemId, wfTemplateId, wfAssociationName)
{
    window.location.href = _spPageContextInfo.webAbsoluteUrl+"/_layouts/15/wfstart.aspx?List={" + listGuid + "}&ID=" + itemId + "&TemplateID=" + wfTemplateId + "&AssociationName=" + wfAssociationName ;
}