From 38ac6f3ccd0ce732a5a7919486410717b017f56c Mon Sep 17 00:00:00 2001 From: admin Date: Fri, 4 Oct 2024 09:01:45 -0700 Subject: [PATCH 1/2] Adds a new instance check to notify about the possible risk associated with the usage of setWorkflow(false) method in business rule --- ca8467c41b9abc10ce0f62c3b24bcbaa/checksum.txt | 2 +- ...check_110515e547819210b8ca0b02d16d4308.xml | 41 +++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 ca8467c41b9abc10ce0f62c3b24bcbaa/update/scan_table_check_110515e547819210b8ca0b02d16d4308.xml diff --git a/ca8467c41b9abc10ce0f62c3b24bcbaa/checksum.txt b/ca8467c41b9abc10ce0f62c3b24bcbaa/checksum.txt index f62fca1..e02742d 100644 --- a/ca8467c41b9abc10ce0f62c3b24bcbaa/checksum.txt +++ b/ca8467c41b9abc10ce0f62c3b24bcbaa/checksum.txt @@ -1 +1 @@ -GMk-wMVtcl0e4HaeuZQZANxo2HAMeWyfhL8rbFLl_woCVyXOjsXdR7O1LSNRPaNARvxgRvjRsKeUMqXi-LPK4EoClDxNqk3Wx6qpPBGYVmhF9S7jsLROWoO5Rj1jiSisMbIsOVFuPN_ts_kAcUOlpwRSywuUD0Go7N2jHUFGg45f63KMtuZQRGtfAWwxSNNpZ9gtoq4JYulVrcmKdf_bKDyX1bSlzCzeXiL8ezaAI_l2Zj2hHdxsqF5hUEZLNFugquKGb_fR7WLoPsz2a8dJejAFgKLGI_Foz1ZekVncgM8k0Kbx13zj8ZYdn5BVnKE6gLQL12k2cr6Xr6ohpUJrLHpEdBaLri5zcAhQo35qtifNeIzKxZrfkoG72CJ2rgXkbjXwZjxVbQtwN1beAznnjjsw3nmQ7DyR3ytpRq_8X1nTg9NZ7qwmp8iYFEGm3A9vaZ2Gan1bgkcvFG5Kne80TqOTh2ev1oTZ1YI1xKYa7fQutdvMPSt-MEr5oj8Eu3uxtn0RVcKVMXOEh5WSDEBB69BmLGm1GIggD9gpCY6-a3_tvQ8Eb5CycVyH02LWYkgZJJOhB0ueIUo-_ldLl7BmTynkXFF0zouPxPQdKYb5jNfzXRi5p-okzqjdDsHP5XnV8ZnyEs_xdvSQHTHCnr7-AxjdnvzPtCTKH5mFzbLhID4 \ No newline at end of file +CuRfUCF5TEEar0o-4-1zN_c4AEm04tYOYyitzaQ_ex8I7N1JnJYMxjgZkKwGNaxquET4kyKZwNGgOGLwBZBGQqV0ad_q9I2iqmSUNivzapvftarN9j3ub-8HHtzDLdZBhLnOsB8_AjaPv-Eh_ggd7Hq1LXsfJR-l2YKbNaYWGEXz3eOtbbMEtaN3alsPdg5xSkjvK9JKAkrc5bGTECXU4roa_kZ-uGIFs-qEsoX2JLGSCx_aN3WFyHzUxK0G_TeT80_oLemMf-ZR5tSP0MOFefZs3yckoTXG35VZfAHf4Y7GLJ2ue-KUTTVyHcmBeXwWVAvAHqfZufjne18FtwGdyXbVMV2NmSYcIfMhjkRVvI-DFT1zbEVdkhZAfueYlHevUDcAbwJlY0d0jAe9XbcK_z8b0jdGgruv6aO-NQiekLsMi2uQtb2XsEs7ZNRpSJ_uMGL4SaEIJRjF-Tvcaw-Lls2ejcFD8cZGsUMlfOSHGkNL7N4gjjSZSayzWZSYAnFYGV85NzxJSHt9TDSD0k1TsUiFplvaPqh8sjPvhCk4CbsEadTIm73aWOwmakBfWH6uENaUgBxAwOFayH2fN4r0PkrjsP1Yj6kHxkWBZhIZT8nhMDGM1eTWhP6duu2uY3ANpE2Hl3tv_6LEqDQbZjFNa5o3mL2r7GHxwheQBmq-Cv4 \ No newline at end of file diff --git a/ca8467c41b9abc10ce0f62c3b24bcbaa/update/scan_table_check_110515e547819210b8ca0b02d16d4308.xml b/ca8467c41b9abc10ce0f62c3b24bcbaa/update/scan_table_check_110515e547819210b8ca0b02d16d4308.xml new file mode 100644 index 0000000..2b8fdea --- /dev/null +++ b/ca8467c41b9abc10ce0f62c3b24bcbaa/update/scan_table_check_110515e547819210b8ca0b02d16d4308.xml @@ -0,0 +1,41 @@ + + + true + false + manageability + scriptLIKEsetWorklfow(false)^EQ + + + 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., + https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0867584 + scan_finding + Limit use of setWorkflow(false) in business rules + 2 + 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 + + 100 + 0 + 1 + + Use of setWorkflow(false) in business rules will cause unexpected issues + scan_table_check + admin + 2024-10-04 15:57:42 + 110515e547819210b8ca0b02d16d4308 + 1 + Limit use of setWorkflow(false) in business rules + ca8467c41b9abc10ce0f62c3b24bcbaa + + ca8467c41b9abc10ce0f62c3b24bcbaa + scan_table_check_110515e547819210b8ca0b02d16d4308 + admin + 2024-10-04 16:00:33 + sys_script
+ false +
+ +
From 622dcfacbe58d5c5872e979d2483c342f75acc3e Mon Sep 17 00:00:00 2001 From: aswamy93 <92323937+aswamy93@users.noreply.github.com> Date: Sat, 5 Oct 2024 07:36:42 +0530 Subject: [PATCH 2/2] Update README.md Updated description of the instance scan definition --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index d34a19a..bc63ff4 100644 --- a/README.md +++ b/README.md @@ -322,6 +322,9 @@ It is recommended to use an OOB library for modals in order to improve the user ### Use "last run datetime" for JDBC data loads In your JDBC data load configuration, ensure that the 'last run datetime' option is set to true and configure the target database field to serve as a timestamp, as this best practice enables incremental data loading and improves performance in data integration processes using JDBC. +### Use of setWorkflow(false) in business rules will cause unexpected issues +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., + # Additional resources Please check these additional links for more information and details: