Dockflow configuration

StatusIDPriorityType
Open39411MajorQuestion
ProfileReply
kakembo richardClient

In your dockflow sample you add these settings to app.config

how can i set these in code?I dont want end user administrators to alter them.

Replies

UserDescriptionPosted On
kakembo richardClient

MariyaVoytovichAgent

Hello!

It looks like the example of the settings you gave are lost
Can you paste them into Attachments as a text file?

Regards,
Mariya
On behalf of Xafari Client Services Team

kakembo richardClient

how can i set these in code?I dont want end user administrators to alter them.

kakembo richardClient

how can i set these in code?I dont want end user administrators to alter them.
how can i set these in code?I dont want end user administrators to alter them.
how can i set these in code?I dont want end user administrators to alter them.

Attached files:
MariyaVoytovichAgent

Hello!

These settings are used by two Xafari services:
1. DocflowManager: Docflow.AddParticipants, Docflow.UseHistory;
2. TasksManager: Tasks.AllowCheckPermissions, Tasks.UseHistory.

All specified settings are read from the configuration file by the services during initialization.
To override settings values, you need to subscribe to the Initialized event in your application module.

Example:

public class DemoModule: XafariModuleBase
{
		public override void Setup(XafApplication application)
		{
			application.SetupComplete += (sender, args) =>
			{
				DocflowManager.Instance.Initialized += DocflowManager_Instance_Initialized;
				TasksManager.Instance.Initialized += TasksManager_Instance_Initialized;
			};
		}

                private void TasksManager_Instance_Initialized(object sender, EventArgs e)
		{
			TasksManager.Instance.UseHistory = true;
			TasksManager.Instance.AllowCheckPermissions = true;
		}

		private void DocflowManager_Instance_Initialized(object sender, EventArgs e)
		{
			DocflowManager.Instance.UseHistory = true;
                        DocflowManager.Instance.AddParticipants = true;
		}
}

Feel free to contact us if you have any questions.

Regards,
Mariya
On behalf of Xafari Client Services Team

kakembo richardClient

DocflowManager.Instance.AddParticipants is readonly

MariyaVoytovichAgent

Yes, this parameter is read-only.
Sorry for my carelessness.
For DocflowManager and TaskManager, you can also set custom configuration in code.

For example, you can change the method Instance_Initialized like this

		private void Instance_Initialized(object sender, EventArgs e)
		{
			var config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
			var settings = config.AppSettings.Settings;
			settings["Docflow.AddParticipants"].Value = "True";
                        settings["Docflow.UseHistory"].Value = "True"
			DocflowManager.Instance.Configuration = config;			
		}

Feel free to contact us if you have any questions.

Regards,
Mariya
On behalf of Xafari Client Services Team

Write US