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); }
public NameToTypeAssociation RegisterPropertyDefintionName(string PropertyName) { return(nameManager.RegisterName(dynamicPropertyDefinionType, PropertyName)); }