Notifications

11 views

Description

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

Cause

Too many records on "item_option_new"  table.

Resolution

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');
itemVars.addNotNullQuery('name');
itemVars.query();
while (itemVars.next()) {
if (itemVars.name != '') {
variables[itemVars.name.toString()] = itemVars.name.toString();
}
}
}

 

Article Information

Last Updated:2019-11-24 08:50:01
Published:2019-11-24