Skip to main content
Hi,

I have 10 users in a destination queue. I need a work item to be allocated to one user in the queue not to all the users, on either a random or based on a least case-load basis (workload balancing)

Is what I have described implicit already within K2 or do I need to specify this method. If so How would I.

Many thanks!
You can use code in the destination rule to do what u need..

when you select use code in Destination rule,

public void Main(ref DestinationRuleContext K2) {
XXX.AssignBySkill(K2);//where XXX is a code module
}

where
AssignBySkill will call a webservice to get the user and allocate as shown below

code in XXX code module

public static void AssignBySkill(DestinationRuleContext K2)
{
string dest=OMS.NewInstance(K2).GetSkillAssignment(K2.ProcessInstance.ID);//call to a webservice

K2.Destinations.Add(DestinationType.User,dest);
}

Hope this is helpful
Hi,

As mentioned by Kes you will have to code your Load Balancing logic into the destination rule, whether you use a call to a web service or if you track the next user by means of an external db.

Reply