Send user input task to a particular user based on hierarchy

Hello everyone,

I have a scenario where if someone logs a request for new employee the request should go through multiple approvals 

First: The first approval will be from the hierarchy manager

Second: From the HR team

Now my roadblock is how can I specifically send the request to only the hierarchy manager, since all the users are created in admin console- how can I set the hierarchy for each employe and send the request dynamically to only their managers and not the whole manager group?

Thanks and regards,

Aishwarya 

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    On every User Input Task node there's a place to use an expression to decide who the task is assigned to.  Make that as complicated as you want or need.  Here's the great part, you code it separately as it's own independent expression rule, then when it consistently generates the user object of the very person who should get assigned every time, then stick it in the PM.  It doesn't need to involve groups at all.  It just needs to be the right user, however you want to define or store it.

Reply
  • 0
    Certified Lead Developer

    On every User Input Task node there's a place to use an expression to decide who the task is assigned to.  Make that as complicated as you want or need.  Here's the great part, you code it separately as it's own independent expression rule, then when it consistently generates the user object of the very person who should get assigned every time, then stick it in the PM.  It doesn't need to involve groups at all.  It just needs to be the right user, however you want to define or store it.

Children
  • 0
    Certified Lead Developer
    in reply to Dave Lewis
    Here's the great part, you code it separately as it's own independent expression rule

    Exactly what I came here to say - stick it in an expression rule, where you feed in one username (etc), and the rule spits out the appropriate user in return.  Assuming the current setup is done in such a way that you can use expression logic to take a username and figure out which Approval Manager to select (and if not, i'm not sure how or even if this is solvable anyway), that makes this VERY easy to test - just test on different usernames and make sure the results are all as expected.