What is the purpose of the Business Rule 'Flows and Subflows'DescriptionAn error appears with an API call that triggers a SubFlow. In the system log this error is appearing: JavaScript evaluation error on: (function executeRule(current, previous /*null when async*/ ) { var view_name = ""; if (gs.getSession().isInteractive()) { var map = gs.action.getGlideURI().getMap(); if (map.get('sysparm_view') != null) { view_name = map.get('sysparm_view').toString(); if (view_name == 'welcome_hub_flow') { var condition = current.addQuery('type', '=', 'flow'); current.appendOrQuery(condition, 'type', '=', ''); } else if (view_name == 'welcome_hub_subflow') current.addQuery('type', 'subflow'); } } })(current, previous); Root cause of JavaScriptException: java.lang.NullPointerException: java.lang.NullPointerException:ResolutionThe business rule we see is a query business rule on sys_hub_flow table which has records which are flows and subflows in the instance.Now this query business rule based on if it is interaction session, line number 3:"An interactive session is one that involves an end-user interacting with a user interface that then retrieves information from a server. An example of this type of session is when a user logs in using the log-in screen or uses a form to query a data store. A non-interactive session is one that only involves programmatic interaction with a server such as a SOAP request to retrieve data."It will then check the sysparm_view value from the URL it gets as an input if it is a flow or a subflow and based on that add the query for flow type field.