cancelMyWorkflows();

function cancelMyWorkflows() {

   //get workflow helper

   var workflow = new Workflow();

   //cancel all my workflows

   var numCnxd = workflow.cancel(current);

   if (numCnxd > 1)

      gs.addInfoMessage(numCnxd + " " + gs.getMessage("Workflows for {0} have been cancelled", current.getDisplayValue()));

   else if (numCnxd == 1)

      gs.addInfoMessage("1 " + gs.getMessage("Workflow for {0} has been cancelled", current.getDisplayValue()));

}