ljfdlas8lkds
Scholar

Dynamic number of Roles for Task Recipients?

Is it possible to assign a Task to dynamic number of Role groups (determined during workflow) ? For example, querying smartobjects may determine Task need to be assigned to Role A group and Role B group for process instance 1. 

While Role groups A, B, C need to be assigned to the same Task for process instance 2...

Labels: (2)
0 Kudos
Reply
8 Replies
tbyrne777
Contributor

Re: Dynamic number of Roles for Task Recipients?

Yes, this should be possible. Either through making decisions for each combination of roles, and they each get their own task. There are also task assignment rules that you can customize based on a number of conditions that might work out for you as well.
0 Kudos
Reply
ljfdlas8lkds
Scholar

Re: Dynamic number of Roles for Task Recipients?

Hi, thank you for your reply. Could you please elaborate on your answer?

I have LineItems smartobject, joined to ProductLines smartobject which has a field that contains a Role group name.
For example, there may be 10 LineItems on a form that are joined to 6 distinct ProductLines which have only 4 distinct Role groups.
I would like to have only 4 tasks assigned either thru sub workflows or 1 task assigned to 4 distinct Role groups in a consensus.

Thanks in advance!

0 Kudos
Reply
paulk
Scout

Re: Dynamic number of Roles for Task Recipients?

Dynamic roles can be configured in the following way:

 

dynamic-roles.PNG

This article has more detail on it https://help.nintex.com/en-US/k2cloud/userguide/current/default.htm#K2-Workflow-Designer/Common/Dyna...

 

Cheers

0 Kudos
Reply
ljfdlas8lkds
Scholar

Re: Dynamic number of Roles for Task Recipients?

Thank you paulk for your response. 

I think this might work for small number of possible roles. It may not work for my case as there are 15+ Role groups right now (and will grow in the future).. And the number of combinations may not be feasible to code in rules?? 

0 Kudos
Reply
paulk
Scout

Re: Dynamic number of Roles for Task Recipients?

As you have access to the database could you push the logic to get a list of roles that need to approve for a given order into a stored procedure?

 

You could then use a SmartIbject call and the for each activity to then launch a separate process for each resolved role.

 

You can then choose to either wait for those approvals to complete before continuing on or just going on after they have launched.

 

Cheers

0 Kudos
Reply
ljfdlas8lkds
Scholar

Re: Dynamic number of Roles for Task Recipients?

I'm using K2 Cloud.. might I be able to do this if I used OPDA and an on-premise database?

Right now, I'm calling subworkflow for each LineItem.. and that's not efficient as some Role groups might get multiple tasks for the same request.

 

Similar to your directions and using only cloud smartobjects, might I:

1. Create a smartobject to store requestID, RoleGroupName

2. Get the list of Roles required for the approval of a request

3. Loop thru the list and save requestID, RoleGroupName to smartobject in step 1.. (this is to de-duplicate and create distinct RoleGroupName per requestID)

4. Get the RoleGroupNames for requestID and store in this distinct list

5. Call subworkflow now for each of the  RoleGroupName in step 4

 

?

0 Kudos
Reply
tbyrne777
Contributor

Re: Dynamic number of Roles for Task Recipients?

For as complex as it looks like your roles are getting, OPDA to call a stored procedure or web service to do this logic looks like the way to go
0 Kudos
Reply
paulk
Scout

Re: Dynamic number of Roles for Task Recipients?

Ahh yes of course. Sorry wrong set up

 

You could also at the point you start the sub workflow set a flag to say that role has already got a process running. That way when you start a new one for that same role you could query that value in the start rule and don't start one for that role.

 

Cheers

0 Kudos
Reply