Final approver Process


Badge +2

I have to make following process.


Approval flow like this : User --> Manager --> Senior Manager --> President
But if President as user, approval flow like this: President(user) --> HR Manager.
So only President has special procedure, HR manager approved and finish.


How do I make special process for final approver?


Thanks for help!


5 replies

Badge +11

I think there are probably several ways you could do this. 


#1



  • Create a role called president containing the UserID of the president.
  • Create a SmartObject that uses GetRoleUsers method of the User ServiceObject in the User Role Manager Service.
  • Add a SmartObject event that uses the above SmartObject to pull back a list of the members of the president role.  This pulls back a list, but presumably you will only have one at a time so you could stick it in a data field that is a string.
  • Then use line rules to control the path.  If the Originator == the user of the president you stored in a data field, go down the HR approval path; otherwise go down the other path.


#2



  • Create an environment variable to hold the President’s UserID. 
  • Then use the line rule to check if the originator is the same as the value in the environment variable.
Badge +2

Thank you for the reply.
Is it possible to explain #1 to me more step by step?
For me it is difficult to understand the procedure.

I tried easy way to use "Line Rule" but didn't work.
I made "Line Rule" from Start in K2 Studio.



Line 1: go to President process
First Variable: ProcessOriginatorName (Originator)
Comparison Operator: =
Second Variable: President (add user from context Browser)

Line 2: Go to other users process
First Variable: ProcessOriginatorName (Originator)
Comparison Operator: <>
Second Variable: President (add user from context Browser)


Result was all user include President go to Line 2.
It never recognise President as Originator.


What is the mistake that I'm making?
Thanks for help!

Badge +8

Try comparing the originator email address to the president email address (from the user browser).  I think there may be a case sensitivity issue here with the display name.


in my test Originator Name = K2DEMOduncanj and Duncan's name from the user browser = K2DEMODuncanJ.  The comparison in the line rule says that these are not the same so the line is not followed.  The email addresses on the other hand did not have a case issue and worked as expected.


I hope this helps.


-Eric

Badge +2

Hi Eric, thank you for the help.


Using email hadcode works fine for me.
But if I try to get email address using smartobject from SharePoint list it is not working.


 Thanks


Roger


 

Badge +8

Why not use the email address of the user from the user browser rather than the SharePoint list?  If you expand the user in the user the user browser it should give you his email address that you can compare to the originator's email address.


-Eric

Reply