Management tools for dBPMS
        public ActionResult DeleteFull(int ProcessId, int ProjectFilter)
        {
            try
            {
                string wfmBaseAddress = ConfigurationSettings.AppSettings["wfmBaseAddress"].ToString();
                string wfmUsername = ConfigurationSettings.AppSettings["wfmUsername"].ToString();
                string wfmPassword = ConfigurationSettings.AppSettings["wfmPassword"].ToString();
                string sqlConnectionString = ConfigurationSettings.AppSettings["repositoryConnectionString"].ToString();


                InFlowWFM wfm = new InFlowWFM(wfmBaseAddress, wfmUsername, wfmPassword, sqlConnectionString);

                wfm.deleteProcess(ProcessId, true);

                return RedirectToAction("Index", new { projectId = ProjectFilter });
            }
            catch (Exception e)
            {
                ViewBag.Error = e.Message;
                while (e.InnerException != null)
                {
                    e = e.InnerException;
                    ViewBag.Error = ViewBag.Error + e.Message;
                }
                return View("Error");
            }
        }
示例#2
0
        public void publishProject(PublishProjectP3ViewModel model)
        {
            WS_Project project = _inflowDb.WS_Projects.Find(model.Id);

            string startsubjectname = "";

            string wfmBaseAddress = ConfigurationSettings.AppSettings["wfmBaseAddress"].ToString();
            string wfmUsername = ConfigurationSettings.AppSettings["wfmUsername"].ToString();
            string wfmPassword = ConfigurationSettings.AppSettings["wfmPassword"].ToString();
            string sqlConnectionString = ConfigurationSettings.AppSettings["repositoryConnectionString"].ToString();

            string companyScopeName = ConfigurationSettings.AppSettings["companyScopeName"].ToString();

             string wfMessageTierPath = ConfigurationSettings.AppSettings["wfMessageTierPath"].ToString();
             string wfTaskTierPath = ConfigurationSettings.AppSettings["wfTaskTierPath"].ToString();

             InFlowWFM wfm = new InFlowWFM(wfmBaseAddress, wfmUsername, wfmPassword, sqlConnectionString);

             List<strICT.InFlow.WFM.Utilities.SubjectConfig> subjects = new List<strICT.InFlow.WFM.Utilities.SubjectConfig>();

            
            foreach(WS_Subject subject in project.Subjects)
            {
                if(subject.U_Role_Id == 0)
                {
                    throw new Exception("Role for Subject " + subject.Name + " not Set!");
                }
                if(subject.CanBeStarted)
                {
                    startsubjectname = subject.Name;
                }
                subjects.Add(new strICT.InFlow.WFM.Utilities.SubjectConfig { Name = subject.Name, Xaml = subject.Xaml_Data, Role_Id = subject.U_Role_Id , MultiSubject = subject.MultiSubject});
            }

            string processscopename = System.IO.Path.GetRandomFileName();

            while(_inflowDb.P_Processes.Count(result => result.WFM_ProcessScope == companyScopeName & result.WFM_ProcessScope == processscopename) > 0)
            {
                processscopename = System.IO.Path.GetRandomFileName();
            }

            wfm.addProcess(companyScopeName, processscopename, wfMessageTierPath, subjects, true, startsubjectname, model.Id, model.Version, model.ProcessInfo);
       
           //Lock Model Version

            int modelId = _inflowDb.WS_ModelVersions.First(r => r.WS_ProjectId == model.Id & r.Version == model.Version).PD_ProcessId;
            var m = _designerDb.PD_Processes.Find(modelId);
            m.LockedBy = "InFlow_BackEnd";
            _designerDb.SaveChanges();

        }
示例#3
0
        static void setUpScope()
        {
            InFlowWFM wfm = new InFlowWFM(cfgWFMBaseAddress, cfgWFMUsername, cfgWFMPassword, cfgSQLConnectionString_InFlow);

       
                 Console.WriteLine("Create Company-Scope InFlow");

                 DConsole.Print(wfm.addCompanyScope(ScopeName, workflow_TaskHandler_Path) + "\n");

                 DConsole.PrintDone(); Console.WriteLine();
        }
示例#4
0
        static void cleanScope()
        {
            InFlowWFM wfm = new InFlowWFM(cfgWFMBaseAddress, cfgWFMUsername, cfgWFMPassword, cfgSQLConnectionString_InFlow);

            

            string input = "...";

            do
            {
                DConsole.PrintEmptyLines();
                DConsole.Print("ProcessName:");
                input = Console.ReadLine();
                if(input.Length > 0)
                    DConsole.Print(wfm.deleteProcess(ScopeName, input));
                if (input.Length <= 0)
                    DConsole.Print(wfm.deleteCompanyScope(ScopeName));

                DConsole.PrintDone(); Console.WriteLine();

            } while (input.Length > 0);

            start();
        }
示例#5
0
        static void listCompanyScopes()
        {
            InFlowWFM wfm = new InFlowWFM(cfgWFMBaseAddress, cfgWFMUsername, cfgWFMPassword, cfgSQLConnectionString_InFlow);

            DConsole.PrintList(wfm.listCompanyScopes(), "Company-Scopes:");
            Console.WriteLine();

            DConsole.PrintList(wfm.listProcessScopes(ScopeName), "Process Scopes of InFlow");
        }