|
| 1 | +<?xml version="1.0" encoding="UTF-8"?><record_update table="scan_table_check"> |
| 2 | + <scan_table_check action="INSERT_OR_UPDATE"> |
| 3 | + <active>true</active> |
| 4 | + <advanced>false</advanced> |
| 5 | + <category>manageability</category> |
| 6 | + <conditions table="sys_script">scriptLIKEsetWorklfow(false)^EQ<item endquery="false" field="script" goto="false" newquery="false" operator="LIKE" or="false" value="setWorklfow(false)"/> |
| 7 | + <item endquery="true" field="" goto="false" newquery="false" operator="=" or="false" value=""/> |
| 8 | + </conditions> |
| 9 | + <description>As setWorkflow(false) method will stop the execution of business rules on that particular GlideRecord object, this will result in unexpected behaviour where the execution of business rules skipped. Maintain caution while using this method and perform regression testing to avoid possible risk. It can have noticeable impact on Audit, Journal fields, notifications, SLA engine, workflow, flow engine etc.,</description> |
| 10 | + <documentation_url>https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0867584</documentation_url> |
| 11 | + <finding_type>scan_finding</finding_type> |
| 12 | + <name>Limit use of setWorkflow(false) in business rules</name> |
| 13 | + <priority>2</priority> |
| 14 | + <resolution_details>Based on the scenario or use case, think of alternative approach instead of using setWorkflow(false) especially in business rules. Reaserch about the system property trigger_engine.ignore.set_workflow</resolution_details> |
| 15 | + <run_condition/> |
| 16 | + <score_max>100</score_max> |
| 17 | + <score_min>0</score_min> |
| 18 | + <score_scale>1</score_scale> |
| 19 | + <script><![CDATA[(function (engine) { |
| 20 | +
|
| 21 | + // Add your code here |
| 22 | +
|
| 23 | +})(engine);]]></script> |
| 24 | + <short_description>Use of setWorkflow(false) in business rules will cause unexpected issues</short_description> |
| 25 | + <sys_class_name>scan_table_check</sys_class_name> |
| 26 | + <sys_created_by>admin</sys_created_by> |
| 27 | + <sys_created_on>2024-10-04 15:57:42</sys_created_on> |
| 28 | + <sys_id>110515e547819210b8ca0b02d16d4308</sys_id> |
| 29 | + <sys_mod_count>1</sys_mod_count> |
| 30 | + <sys_name>Limit use of setWorkflow(false) in business rules</sys_name> |
| 31 | + <sys_package display_value="Example Instance Checks" source="x_appe_exa_checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_package> |
| 32 | + <sys_policy/> |
| 33 | + <sys_scope display_value="Example Instance Checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_scope> |
| 34 | + <sys_update_name>scan_table_check_110515e547819210b8ca0b02d16d4308</sys_update_name> |
| 35 | + <sys_updated_by>admin</sys_updated_by> |
| 36 | + <sys_updated_on>2024-10-04 16:00:33</sys_updated_on> |
| 37 | + <table>sys_script</table> |
| 38 | + <use_manifest>false</use_manifest> |
| 39 | + </scan_table_check> |
| 40 | + <sys_translated_text action="delete_multiple" query="documentkey=110515e547819210b8ca0b02d16d4308"/> |
| 41 | +</record_update> |
0 commit comments