Cannot add Catalog Task activity to worklfow


Page gets timed out when a "Catalog Task" activity is added to a new workflow.


Too many records on "item_option_new"  table.


While creating a new workflow, All the variables on "item_option_new" are displayed. As there are millions of records , the page is not loaded or timed out.

If the workflow is already associated to a catalog item, then only the variables that are on that item are shown.

This logic is controlled by a business rule "workflow item variables" on "addDefaultVariables" function. Reduce the number of variables on "item_option_new"  table.
Below is logic:

function addDefaultVariables(variables) {
var itemVars = new GlideRecord('item_option_new');
while ( {
if ( != '') {
variables[] =;