Example #1
0
 /// <summary>
 /// Converts current workflow to advanced workflow.
 /// </summary>
 protected void ConvertWorkflow()
 {
     try
     {
         WorkflowInfoProvider.ConvertToAdvancedWorkflow(WorkflowId);
         ScriptHelper.RegisterStartupScript(this, typeof(string), "convert", "parent.location.href = parent.location.href + '&converted=1';", true);
     }
     catch (Exception ex)
     {
         ShowError(GetString("workflow.converterror"));
         EventLogProvider.LogException("Workflow", "Convert", ex);
     }
 }
Example #2
0
    /// <summary>
    /// Converts existing workflow to advanced workflow. Called when the "Convert to advanced workflow" button is pressed.
    /// Expects the CreateWorkflow method to be run first.
    /// </summary>
    private bool ConvertToAdvancedWorkflow()
    {
        // Get the workflow
        WorkflowInfo convertWorkflow = WorkflowInfoProvider.GetWorkflowInfo("MyNewWorkflow");

        if (convertWorkflow != null)
        {
            // Convert to advanced workflow
            WorkflowInfoProvider.ConvertToAdvancedWorkflow(convertWorkflow.WorkflowID);

            return(true);
        }

        return(false);
    }