/// ///////////////////////////////////////////
        public override object Invoke(object objetAppelle, params object[] parametres)
        {
            CWorkflow workflow = objetAppelle as CWorkflow;

            if (workflow == null || parametres.Length == 0 || parametres[0] == null)
            {
                return(null);
            }
            string        strIdType   = parametres[0].ToString();
            CTypeWorkflow typeWorkfow = workflow.TypeWorkflow;

            if (typeWorkfow == null)
            {
                return(null);
            }
            CListeObjetsDonnees etapes = typeWorkfow.Etapes;

            etapes.Filtre = new CFiltreData(CObjetDonnee.c_champIdUniversel + "=@1",
                                            strIdType);
            if (etapes.Count == 0)
            {
                return(null);
            }
            CTypeEtapeWorkflow typeEtape = etapes[0] as CTypeEtapeWorkflow;
            CEtapeWorkflow     etape     = workflow.GetEtapeForType(typeEtape);

            if (etape != null)
            {
                return(CGestionnaireProjetsDeWorkflow.GetProjetDirectementAssocie(etape));
            }
            return(null);
        }
        public static object GetWorkflowCurrentProject(object source)
        {
            CWorkflow wkf = source as CWorkflow;

            if (wkf != null && wkf.EtapeAppelante != null)
            {
                return(CGestionnaireProjetsDeWorkflow.FindProjetAssocie(wkf.EtapeAppelante));
            }
            return(null);
        }
        public static object GetProjetGenereParEtape(object source)
        {
            CEtapeWorkflow etape = source as CEtapeWorkflow;

            if (etape == null)
            {
                return(null);
            }
            return(CGestionnaireProjetsDeWorkflow.GetProjetDirectementAssocie(etape));
        }