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

VB .NET:

  1.         Public Class EmpManagerRule
  2.             Implements IRule
  3.             Public Function Execute(ByVal variable As System.Collections.Generic.Dictionary(Of String, Object)) As String Implements HSDc.RingleFlow.Api.Rule.IRule.Execute
  4.                 Dim empId As String = Nothing
  5.                 If (Not variable.TryGetValue("emp", empId)) Then
  6.                     empId = String.Empty
  7.                 End If
  8.                 Dim engine As IWorkflowEngine = WorkflowEngineFactory.GetInstance()
  9.                 Dim emp As IEmp = engine.OrgaisationService.GetEmployee(empId)
  10.                 Dim assignee As String = emp.DirectManager.UserId
  11.                 Return assignee
  12.            End Function
  13. End Class

Last edited Jun 25, 2012 at 9:46 AM by cathysung, version 2

Comments

No comments yet.