public async Task <IActionResult> Post([FromBody] CreateWorkflow createWorkflow) { try { var workFlow = WorkflowFactory.CreateNewWorkflow(createWorkflow.WorkflowName, createWorkflow.SourceEmailAddress, createWorkflow.RequestId, 30); await _workflowDataService.SaveWorkflowAsync(workFlow); return(Ok(createWorkflow)); } catch (Exception e) { return(BadRequest(e.Message)); } }
public async Task CreateNew(string requestId, string workflowName, string sourceEmailAddress, int expiresInDays) { var workFlow = WorkflowFactory.CreateNewWorkflow(workflowName, sourceEmailAddress, requestId, expiresInDays); await _workflowDataService.SaveWorkflowAsync(workFlow); }