Пример #1
0
        public static DeleteConnectorToTarget(SubProcess TargetSubProcess)
        {
               //get connector in process overview
            var connectors = ProcessOverview.SubProcessReferencesTargets.GetLinks(this, TargetSubProcess);

            if (connectors.Count > 0)
            {
                var connector = connectors.First();

                using (Transaction t = connector.Store.TransactionManager.BeginTransaction("Delete connectors in processoverview"))
                {
                    connector.Delete();
                    t.Commit();
                }
            }
        }
Пример #2
0
        private void getDiagramActivities(SubProcess subProcess, Project project)
        {
            foreach (var activity in subProcess.Activities.Where(a => !(a is Stop)))
            {
                var newact = new LocalActivity
                {
                    activity = activity,
                    IsSQLActivity = activity is DatabaseEvent || activity is Architect.WorkflowRule || activity is Architect.DatabaseCosting || activity is Architect.DatabaseBatchStart || activity is Architect.DatabaseBatchWait || activity is Architect.DatabasePark,
                };

                if (newact.IsSQLActivity)
                {
                    newact.FileContent = GetFileContent(subProcess.VisioId, activity.VisioId, project);

                    newact.FileName = activity is DatabaseEvent ? string.Format("CCEvent_{0}", activity.VisioId.ToString().Replace("-", "_"))
                        : activity is Architect.WorkflowRule ? string.Format("CCWorkFlowRule_{0}", activity.VisioId.ToString().Replace("-", "_"))
                        : activity is Architect.DatabaseCosting ? string.Format("CCCost_{0}", activity.VisioId.ToString().Replace("-", "_"))
                        : activity is Architect.DatabaseBatchStart ? string.Format("CCBatchStart_{0}", activity.VisioId.ToString().Replace("-", "_"))
                        : activity is Architect.DatabaseBatchWait ? string.Format("CCBatchWait_{0}", activity.VisioId.ToString().Replace("-", "_"))
                        : activity is Architect.DatabasePark ? string.Format("CCPark_{0}", activity.VisioId.ToString().Replace("-", "_")) : "";
                }

                myActivities.Add(newact);
                getDiagramFlows(activity);
            }
        }