Esempio n. 1
0
        public WorkFlowTemplate CreateWorkFlowTemplate(string Name)
        {
            if (nameMgr.IsNameAvailable(workFlowTemplatetypeForNameMgr, Name))
            {
                nameMgr.RegisterName(workFlowTemplatetypeForNameMgr, Name);

                var workflowTemplate = new WorkFlowTemplate(Name);

                var result = persistor.SaveOrUpdateAndPersist(workflowTemplate);

                if (!result.Success)
                {
                    throw new PersistenceTransActionException(string.Format("Unable to save the {0} template", Name));
                }

                return(workflowTemplate);
            }
            throw new NameAlreadyUsedException(Name, workFlowTemplatetypeForNameMgr);
        }
Esempio n. 2
0
 public bool PropertyDefinitionNameAvaliable(string PropertyName)
 {
     return(nameManager.IsNameAvailable(dynamicPropertyDefinionType, PropertyName));
 }