예제 #1
0
        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));
            }
        }
예제 #2
0
 public async Task CreateNew(string requestId, string workflowName, string sourceEmailAddress, int expiresInDays)
 {
     var workFlow = WorkflowFactory.CreateNewWorkflow(workflowName, sourceEmailAddress, requestId, expiresInDays);
     await _workflowDataService.SaveWorkflowAsync(workFlow);
 }