private string createProcessScope(string companyScopeName, string processScopeName)
{
IDictionary<string, string> configValues = new Dictionary<string, string>
{
{ "cfgManagementScopeAddress", cfgWFMBaseAddress + companyScopeName + "/"+managementScopeName+"/" },
{ "cfgProcessScopeAddress", cfgWFMBaseAddress + companyScopeName + "/" + processScopeName + "/" },
{ "cfgWFMBaseAddress" , cfgWFMBaseAddress},
{ "cfgWFMUsername", cfgWFMUsername },
{ "cfgWFMPassword", cfgWFMPassword},
{ "cfgSQLConnectionString", cfgSQLConnectionString }
};
WorkflowConfiguration Configuration = new WorkflowConfiguration();
configValues.ToList().ForEach(c => Configuration.AppSettings.Add(c));
WorkflowManagementClient client = new WorkflowManagementClient(new Uri(cfgWFMBaseAddress + companyScopeName + "/"), credentials);
client = client.CurrentScope.PublishChildScope(processScopeName,
new ScopeDescription()
{
UserComments = processScopeName,
DefaultWorkflowConfiguration = Configuration
});
string scope = client.ScopeUri.ToString();
return scope;
}