/// <summary>
        /// Gets the root.
        /// </summary>
        /// <param name="applicationName">Name of the application.</param>
        /// <returns></returns>
        public string GetRoot(string applicationName)
        {
            WorkflowConfig config = GetConfig();

            if (config == null)
            {
                throw new ArgumentException("workflow config xml file is miss or wrong format");
            }
            List <string>       names       = new List <string>();
            WorkflowApplication application = config.Get(applicationName);

            return(application.Root);
        }
        /// <summary>
        /// Gets all workflow.
        /// </summary>
        /// <returns></returns>
        public WorkFlowDefine[] GetAllWorkflow(string applicationName)
        {
            WorkflowConfig config = GetConfig();

            if (config == null)
            {
                throw new ArgumentException("workflow config xml file is miss or wrong format");
            }
            List <WorkFlowDefine> workflows   = new List <WorkFlowDefine>();
            WorkflowApplication   application = config.Get(applicationName);

            if (application == null)
            {
                throw new NullReferenceException(string.Format("{0} cannot found", applicationName));
            }
            foreach (WorkflowDefineConfig one in application.Defines)
            {
                if (one.Enabled)
                {
                    workflows.Add(GetWorkflowDefine(one.Name));
                }
            }
            return(workflows.ToArray());
        }