public string GetNewWorkflowName(Template template, string oldName)
 {
     string startingWorkflowName = string.Concat("Copy of ", oldName);
     string workflowName = startingWorkflowName;
     int counter = 1;
     while (template.WorkflowExists(workflowName))
     {
         workflowName = string.Format("{0} {1}", startingWorkflowName, counter++);
     }
     return workflowName;
 }
 public static string GetDefaultWorkflowName(Template template)
 {
     string startingWorkflowName = "New Workflow";
     string workflowName = startingWorkflowName;
     int counter = 1;
     while (template.WorkflowExists(workflowName))
     {
         workflowName = string.Format("{0} {1}", startingWorkflowName, counter++);
     }
     return workflowName;
 }