Dockflow configuration

StatusIDPriorityType
Closed39411MajorQuestion
Profile Reply
kakembo richard Client

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

User Description Posted On
kakembo richard Client

MariyaVoytovich Agent

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 richard Client

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

kakembo richard Client

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:
MariyaVoytovich Agent

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 richard Client

DocflowManager.Instance.AddParticipants is readonly

MariyaVoytovich Agent

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

× This ticket is closed.

Write US