public void CreateNewWorkflow(Module module)
        {
            workflow             = new Cdc.MetaManager.DataAccess.Domain.Workflow();
            workflow.RequestMap  = new PropertyMap();
            workflow.Name        = tbName.Text;
            workflow.Module      = module;
            workflow.Description = tbDescription.Text;

            SequentialWorkflowActivity rootActivity = new SequentialWorkflowActivity("root");

            rootActivity.SetValue(WorkflowMarkupSerializer.XClassProperty, WorkflowTypeFactory.GetWorkflowClassFullName(workflow));

            StringBuilder sb = new StringBuilder();

            XmlWriter xmlWriter = XmlWriter.Create(sb);
            WorkflowMarkupSerializer serializer = new WorkflowMarkupSerializer();

            serializer.Serialize(xmlWriter, rootActivity);
            xmlWriter.Close();
            workflow.WorkflowXoml = sb.ToString();
        }
Exemple #2
0
        private void WorkflowDesignerForm_Load(object sender, EventArgs e)
        {
            if (Workflow.Id == Guid.Empty)
            {
                CreateNewWorkflow();
            }
            else
            {
                Workflow = dialogService.GetWorkflowById(Workflow.Id);
            }

            if (Workflow.IsLocked && Workflow.LockedBy == Environment.UserName)
            {
                this.IsEditable = true;
            }

            EnableDisableComponents();

            LoadWorkflow();
            Cursor.Current = Cursors.Default;
        }
Exemple #3
0
 private void okBtn_Click(object sender, EventArgs e)
 {
     SelectedWorkflow = (Cdc.MetaManager.DataAccess.Domain.Workflow)lvResult.SelectedItems[0].Tag;
     DialogResult     = DialogResult.OK;
     Close();
 }