This project is read-only.

4. HR Department Partition: Get the specific department by the organization service. 

C#:

  1.         public class DeptRule : IRule
  2.         {
  3.              public string Execute(System.Collections.Generic.Dictionary<string, object> variable)
  4.              {
  5.                              string orgId = null;
  6.                              if ((!variable.TryGetValue("OrgID", out orgId))) {
  7.                                              orgId = "0";
  8.                              }
  9.                              IWorkflowEngine engine = WorkflowEngineFactory.GetInstance();
  10.                             IDept dept = engine.OrgaisationService.GetDepartment(Convert.ToInt32(orgId));
  11.                             string assignee = dept.OrgId;
  12.                             return assignee;
  13.             }
  14.        }


Last edited Jun 25, 2012 at 11:03 AM by cathysung, version 2

Comments

No comments yet.