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;
        }
Пример #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);
        }
        private void CreateProcessDataField(string name, SourceCode.Workflow.Authoring.DataTypes dataType)
        {
            if (this.Process == null)
            {
                return;
            }

            if (!this.Process.DataFields.Contains(name))
            {
                SourceCode.Workflow.Authoring.DataField df = new SourceCode.Workflow.Authoring.DataField(name, dataType);
                df.Scope    = SourceCode.Workflow.Authoring.FieldScope.Process;
                df.OnDemand = true;
                df.Hidden   = false;
                df.Log      = false;
                df.Audit    = false;
                df.Category = "CRM Client Event";
                this.Process.DataFields.Add(df);
            }
        }