Exemplo n.º 1
0
        private void StartDeployment(SourceCode.Workflow.Authoring.Process process)
        {
            DeploymentResults results = WorkflowDeploymentSamples.DeployProcess(process);

            StringBuilder sbOutput = new StringBuilder();

            if (results.Successful)
            {
                sbOutput.AppendLine("Deployment succeeded");
                sbOutput.AppendLine("====================");
                sbOutput.AppendLine();
                foreach (string output in results.Output)
                {
                    sbOutput.AppendLine(output);
                }
            }
            else
            {
                sbOutput.AppendLine("Deployment failed");
                sbOutput.AppendLine("=================");
                sbOutput.AppendLine();
                for (int i = 0; i < results.Errors.Count; i++)
                {
                    sbOutput.AppendLine(results.Errors[i].ToString());
                }
            }

            txtDeploymentResults.Text = sbOutput.ToString();
        }
Exemplo n.º 2
0
        public static DataField EnsureDataField(SourceCode.Workflow.Authoring.Process proc, string DFValue, string DFName)
        {
            //If found first delete..
            if (proc.DataFields.Contains(DFName))
            {
                proc.DataFields.Remove(proc.DataFields[DFName]);
            }

            DataField newDF = new SourceCode.Workflow.Authoring.DataField(DFName, DFValue);

            newDF.Audit    = false;
            newDF.Hidden   = true;
            newDF.OnDemand = true;
            newDF.Log      = false;

            proc.DataFields.Add(newDF);

            return(newDF);
        }
Exemplo n.º 3
0
 private void btnDeploy_Click(object sender, EventArgs e)
 {
     this.Cursor = Cursors.WaitCursor;
     SourceCode.Workflow.Authoring.Process process = null;
     try
     {
         process = SourceCode.Workflow.Authoring.Process.Load(txtProcessFile.Text);
         StartDeployment(process);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
     finally
     {
         this.Cursor = Cursors.Default;
         if (process != null)
         {
             process.Dispose();
             process = null;
         }
     }
 }