public WorkflowVM ConsultarWorkflowCompleto(Guid IdWorkflow)
        {
            WorkflowVM wfvm = new WorkflowVM(ConsultarWorkflow(IdWorkflow));

            var wfsteps = _wfsServ.ConsultarStepsPorWorkflow(IdWorkflow);

            foreach (var _wfstep in wfsteps)
            {
                var wfs = new WorkflowStepVM(_wfstep);
                wfs.Status = _statusServ.ConsultarStatus(_wfstep.IdStatus);
                wfs.Step   = new StepVM(_stepServ.ConsultarStep(_wfstep.IdStep));
                wfs.Step.GrupoAprovador = new GrupoAprovadorVM(_gaServ.ConsultarGrupoAprovador(wfs.Step.IdGrupoAprovador));

                var lstgau = _gauServ.ConsultarGrupoAprovadorUsuarios(wfs.Step.IdGrupoAprovador);

                foreach (var gau in lstgau)
                {
                    wfs.Step.GrupoAprovador.Aprovadores.Add(_usuarioServ.ConsultarUsuario(gau.IdUsuario));
                }

                wfvm.WorkflowSteps.Add(wfs);
            }

            return(wfvm);
        }
        public ActionResult ConsultarWorkflowSteps([FromRoute] Guid IdWorkflow)
        {
            try
            {
                var response = _servWorkflowStep.ConsultarStepsPorWorkflow(IdWorkflow);

                return(Ok(response));
            }
            catch (Exception ex)
            {
                return(BadRequest($"Ocorreu um erro ao consultar o Workflow {IdWorkflow}: {ex.Message}"));
            }
        }