Beispiel #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="name"></param>
 /// <param name="category"></param>
 /// <param name="description"></param>
 /// <param name="createdby"></param>
 public Workflow(string name, string category, string description, int createdby, int formid)
 {
     Name         = name;
     Category     = category;
     Description  = description;
     Createdby    = createdby;
     Steps        = new List <Step>();
     Form         = FormManager.Create(new FormManagerFactory(), formid);
     dataworkflow = new Data.Workflow();
 }
        string IActivityChooser.GetNextActivityKey(Data.Workflow wf, Data.UnliqudatedObjectsWorkflowQuestion question, string settings)
        {
            var s = JsonConvert.DeserializeObject <MySettings>(settings);
            //TODO: pass in questions object
            var parameters = new[] {
                new DynamicExpresso.Parameter(CommonParameterNames.Workflow, wf),
                new DynamicExpresso.Parameter(CommonParameterNames.Ulo, wf.UnliquidatedObligation),
                new DynamicExpresso.Parameter(CommonParameterNames.wfQuestion, question),
            };
            var i = new DynamicExpresso.Interpreter();

            foreach (var e in s.Expressions)
            {
                bool res = i.Eval <bool>(e.Code, parameters);
                if (res)
                {
                    return(e.WorkflowActivityKey);
                }
            }
            return(null);
        }
Beispiel #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="iD"></param>
 public Workflow(int iD)
 {
     ID           = iD;
     Steps        = new List <Step>();
     dataworkflow = new Data.Workflow();
 }
Beispiel #4
0
 /// <summary>
 ///
 /// </summary>
 public Workflow()
 {
     Data.Workflow dataworkflow = new Data.Workflow();
     Steps = new List <Step>();
 }