State Field When Creating Catalog Tasks from Workflows/Flows

jmiskey
Kilo Sage

We have experienced some strange behavior as we start using Flow Designer more and more and Workflow Editor less and less (note that we just converted from Tokyo to Vancouver, but this appears to be happening in both versions).

 

When we create new Catalog Tasks in Workflow Editor, it correctly creates them with a State of "Open", even though we do not explicitly set this value; it just defaults to that value.  However, when we try to create a Catalog Task using Flow Designer, it seems to create the new Catalog Task with a State of "Pending", and we aren't sure why it does this differently.

 

We know we can get around this by explicitly setting the State field to "Open" in the Catalog Task creation Action, but we are curious as to why it uses "Pending" as the default value. 

- Is there some setting somewhere that controls this? 

- Why does it do it differently than Workflow Editor?

 

If there is some default setting which we can control, we would prefer to update this to ensure the value gets set properly.

 

Thanks

1 ACCEPTED SOLUTION

OK, I think I found the issue!  It looks like there was a Dictionary Override on the State field for Catalog Task set to "-5" ("Pending").  I changed it to "1", and everything worked as expected.  

 

The odd thing about that is it looks like that was set in place in 2015, and it only seems to be affecting Catalog Tasks created in Flow Designer and not Catalog Tasks created in Workflow Editor.

View solution in original post

5 REPLIES 5

jonsan09
Giga Sage
Giga Sage

The flow designer action doesn't set a specific state, you might want to check the dictionary entry for state on sc_task and see what the default value is. OOB it is set to 1/Open.

That is precisely my confusion!  I checked and confirmed that the default value is "1" ("Open").  So why when we create a new Catalog Task with Flow Designer does it set the value to "Pending" instead?  It doesn't do that with Workflow Editor?  Something doesn't make sense here!

 

Here is what my Create Catalog Task action look like:

jmiskey_0-1699368910280.png

As you can see, there isn't anything in there explicitly telling it to use anything other than the default value for the State field.

 

Perhaps it is a bug to report to ServiceNow?

 

The only thing that I can think may be worth mentioning is that this Flow is in a Scoped Application.  I don't think it should have any affect on it, but when things aren't behaving as expected, you never know!

 

I'd check the template for the catalog task and see if there are any BRs on sc_task that might be changing the task.

I know all about Business Rules, but I am not familiar with Catalog Task templates.  I did a quick Google search, and it doesn't sound like anything we have ever used.  I took a look into the "sys_template" table, and we do not have any for any table with the word "task" in it.

 

I searched the Business Rules on the sc_task table, and found nothing that looks like it would be causing this to happen.

 

Might be time for a HI ticket...