public Execution <TKey> Register <TProcessEnum>(TProcessEnum processName) where TProcessEnum : struct, IConvertible { var definition = _processDefinitionRepository.Get(processName); var execution = new Execution <TKey>() { BeginDate = DateTime.UtcNow, Host = Environment.MachineName, ProcessDefinitionId = definition.Id, Result = ExecutionResult.Unknown, Status = ExecutionStatus.Waiting }; _executionRepository.Save(execution); return(execution); }
public ProcessDefinition <TKey> Get(TProcessEnum processEnum) { return(_processDefinitionRepository.Get(processEnum)); }