strICT.InFlow.WFM.Utilities.InFlowWFM.addCompanyScope C# (CSharp) Method

addCompanyScope() public method

Create a new company-scope (no support for external input-pools)
public addCompanyScope ( string companyScopeName, string workflow_TaskTier_Path ) : string
companyScopeName string name of the new company-scope
workflow_TaskTier_Path string filepath of the task-handler workflow
return string
        public string addCompanyScope(string companyScopeName, string workflow_TaskTier_Path)
        {

            WorkflowManagementClient client = new WorkflowManagementClient(new Uri(cfgWFMBaseAddress), credentials);
            client = client.CurrentScope.PublishChildScope(companyScopeName,
            new ScopeDescription()
            {
                UserComments = companyScopeName
            });

            //create management Scope
            createProcessScope(companyScopeName, managementScopeName);

            //init Task Tier
            client = new WorkflowManagementClient(new Uri(cfgWFMBaseAddress + companyScopeName + "/" + managementScopeName + "/"), credentials);

            //Console.Write("Publishing TaskTier...");
            client.PublishWorkflow(workflow_TaskTier_Name, workflow_TaskTier_Path,
                new MatchAllSubscriptionFilter()    //Filter
                {
                    Matches = 
                    { 
                        { "NotificationType" , "NewTask" }
                    }
                });

            return client.ScopeUri.ToString();
        }

Same methods

InFlowWFM::addCompanyScope ( string companyScopeName, string workflow_TaskTier_Path, string workflow_SBMessageTier_Path ) : string

Usage Example

Esempio n. 1
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();
        }