This project is read-only.

2. Direct Manager Partition: Get the employee's direct manager by the organization service.

C#:

  1.         public class EmpManagerRule : IRule
  2.         {
  3.              public string Execute(System.Collections.Generic.Dictionary<string, object> variable)
  4.              {
  5.                              string empId = null;
  6.                              if ((!variable.TryGetValue("emp", out empId))) {
  7.                                              empId = string.Empty;
  8.                              }
  9.                              IWorkflowEngine engine = WorkflowEngineFactory.GetInstance();
  10.                             IEmp emp = engine.OrgaisationService.GetEmployee(empId);
  11.                             string assignee = emp.DirectManager.UserId;
  12.                             return assignee;
  13.             }
  14.        }

Last edited Jun 25, 2012 at 10:44 AM by cathysung, version 2

Comments

No comments yet.