Anyone know why an Assignment rule would not run against a Catalog Task created by a workflow????

DrewW
Mega Sage
Mega Sage

Anyone know why an Assignment rule would not run against a Catalog Task created by a workflow????

I have a catalog item that allows the requesting of voice and phone changes. It is a fairly simple workflow and it creates a catalog task that has no assignment group set and no assign to set. I then created assignment rules so that when the catalog tasks are created they will be assigned based on the site the request is for. But for some reason the assignment rule does not run until after a user saves the catalog task...?

Anyone know why???

Any help would be appreciated...

5 REPLIES 5

SteveS
Kilo Expert

I know that for our instance, I had to use either If statements in the workflow itself or I created a business rules that sets assignment group by variable that I setup for the location selected which is setup as a global variable called assignment_group and is a select box on the catalog item which creates a drop down of 4 or 5 locations, text would be the name of the location, value is the name of the assignment group.

\\break
Bus Rule: assignment group from item
Condition: current.assignment_group == ""
When: before
insert
update
SCript:
current.assignment_group.setDisplayValue(current.variable_pool.assignment_group);

I did find another post that also might help you out - http://community.service-now.com/node/1000478- but it looks like a either If statements in the workflow itself or business rule is the way to go


That does not really work well for me because I have 7 techs that cover 60+ locations, which is why I setup assignment rules. According to the wiki they should work, and they do but only after the ticket is created and then saved the first time which is the part that is driving me a little nuts, it should do it at creation if the wiki is correct.

Thanks for the reply.


Have you checked to make sure that the site (or whatever other assignment rule condition) is actually in place at the time the assignment rule runs? You're correct in assuming that it should work. My guess is that it does work, but the task doesn't meet the conditions when the assignment rule gets evaluated. What happens if you put no condition on your assignment rule (or a condition that will always evaluate to 'true')?

http://wiki.service-now.com/index.php?title=Execution_Order_of_Scripts_and_Engines


Try putting in a 5 second wait timer before your task gets generated. I think the task is just getting generated too quickly after the field population that the assignment depends on. They're probably happening within milliseconds of each other and the task doesn't see the information hit the database in time. A small wait timer in your workflow immediately before your task gets generated should fix the problem.