public CResultAErreurType <CAffectationsEtapeWorkflow> CalculeAffectations(CWorkflow workflow) { CResultAErreurType <CAffectationsEtapeWorkflow> resultAff = new CResultAErreurType <CAffectationsEtapeWorkflow>(); resultAff.Result = true; CAffectationsEtapeWorkflow affectations = new CAffectationsEtapeWorkflow(); CContexteEvaluationExpression ctx = new CContexteEvaluationExpression(workflow); foreach (CFormuleNommee formule in Formules) { CResultAErreur result = formule.Formule.Eval(ctx); if (result) { if (result.Data is IAffectableAEtape) { affectations.AddAffectable(result.Data as IAffectableAEtape); } else if (result.Data is IEnumerable) { foreach (object obj in (IEnumerable)result.Data) { IAffectableAEtape a = obj as IAffectableAEtape; if (a != null) { affectations.AddAffectable(a); } } } } } resultAff.DataType = affectations; return(resultAff); }
public void RemoveAssignment(IAffectableAEtape affectable) { if (affectable == null) { return; } CAffectationsEtapeWorkflow aff = Affectations; aff.RemoveAffectable(affectable); Affectations = aff; }
public static CAffectationsEtapeWorkflow FromCode(string strCode) { CAffectationsEtapeWorkflow aff = new CAffectationsEtapeWorkflow(); string[] strCodes = strCode.Split(c_strSepGen); foreach (string strCle in strCodes) { if (strCle.Trim() != "") { aff.m_listeStringAffectations.Add(strCle); } } return(aff); }