Global Variables

Dazler
Mega Sage

Hi,

 

I was thinking of making many of my variables global, so that they can show up on the catalog task without having to use the slush buck in Flow Designer.  Before I do that, I want to know if there is any downside to doing that?

 

I am asking this because we use Flow Designer more than we use Workflow Editor.  However, in workflow editor is it much easier to handle variables when you have 1 workflow setup for multiple catalog items.  In the slush bucket of the create catalog task activity you are choosing by variables, however, with Flow Designer you are choosing the variable set or the actual catalog item.  It makes it much more difficult to to create 1 flow for multiple catalog items unless you set the variables as global.

 

Can setting the variables global cause any platform issue?

9 REPLIES 9

Apologies, reading your response I may have misunderstood the question.
I am not sure exactly what the 'global' flag does on a Service Catalog Variable, meaning my replies may be out of context.

The doc's state that
If selected, the variable is available for all catalog tasks within service catalog workflows or execution plans by default. If deselected, the variable must be associated with individual catalog tasks.

So not the instantiation of a 'global' variable, just availability of\access to the catalog item variable 

Create a service catalog variable (servicenow.com)

I was thinking it was more in line with the docs based on what we found so far, but it also does some functionality not listed in the Docs site.

 

For example, the variable being added on catalog tasks created outside of the workflows / execution plans, such as tasks created by users manually on requested items, etc. This made me question if that documentation was 100% accurate.

Kit Cheong
Giga Guru

Hi Dazler,
It does not have a downside or cause platform issues, that I'm aware of.

Making the service catalog variable global, and clearing it's Catalog Item [cat_item] value is supposed to make it "available to all catalog task activities within the workflow" (see the first link).

I tested that on a z-booted Washington instance, it didn't work.

 

More info regarding the service catalog variable > Global field [item_option_new.global]:

https://docs.servicenow.com/csh?topicname=c_WorkflowCatalogVariables.html&version=latest

https://docs.servicenow.com/csh?topicname=t_CreateAVariableForACatalogItem.html&version=latest

https://docs.servicenow.com/csh?topicname=c_ServiceCatalogVariableSets.html&version=latest

 

Rajeev Vunukond
Tera Guru

Did you see any issues doing this?