diff --git a/b812ceb69337a210633378917cba10bc/README.md b/b812ceb69337a210633378917cba10bc/README.md index 1aa7e3e..05cd6fa 100644 --- a/b812ceb69337a210633378917cba10bc/README.md +++ b/b812ceb69337a210633378917cba10bc/README.md @@ -24,4 +24,4 @@ If you find yourself unable to import your repository due to the presence of fil 2.2 Activate/install all required dependencies 2.3 Re-import the application from source control Currently listed dependencies: - * ServiceNow IntegrationHub Enterprise Pack Installer + * diff --git a/b812ceb69337a210633378917cba10bc/update/sys_hub_action_type_definition_ef3ced0a83747650f89fc730ceaad383.xml b/b812ceb69337a210633378917cba10bc/update/sys_hub_action_type_definition_ef3ced0a83747650f89fc730ceaad383.xml new file mode 100644 index 0000000..03444af --- /dev/null +++ b/b812ceb69337a210633378917cba10bc/update/sys_hub_action_type_definition_ef3ced0a83747650f89fc730ceaad383.xml @@ -0,0 +1,1625 @@ + + + public + + + + true + Check user group membership + {labelCacheCleanUpExecuted=true} + 28100 + false + + + + + Check if give user is part of given groups with OR/AND operations and return true/false. User logged in user if given user is empty. + + false + check_group_membership + + + + + Check Group Membership + + + + false + draft + sys_hub_action_type_definition + nilesh + 2025-10-26 12:49:00 + global + / + ef3ced0a83747650f89fc730ceaad383 + 1 + Check Group Membership + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + sys_hub_action_type_definition_ef3ced0a83747650f89fc730ceaad383 + nilesh + 2025-10-26 12:49:02 + false + + + + + + sys_hub_action_type_definition + ef3ced0a83747650f89fc730ceaad383 + 4 + sys_variable_value + nilesh + 2025-10-26 12:49:02 + 333c214a83747650f89fc730ceaad353 + 0 + nilesh + 2025-10-26 12:49:02 + 0 + b33c214a83747650f89fc730ceaad341 + + + sys_hub_action_type_definition + ef3ced0a83747650f89fc730ceaad383 + 3 + sys_variable_value + nilesh + 2025-10-26 12:49:02 + 773c214a83747650f89fc730ceaad353 + 0 + nilesh + 2025-10-26 12:49:02 + 0 + b33c214a83747650f89fc730ceaad33b + + + sys_hub_action_type_definition + ef3ced0a83747650f89fc730ceaad383 + 2 + sys_variable_value + nilesh + 2025-10-26 12:49:02 + bb3c214a83747650f89fc730ceaad353 + 0 + nilesh + 2025-10-26 12:49:02 + {"version":"1.0","complexObjectSchema":{"FlowDesigner:FDACTIONSTATUS":{"code":"Integer","code.$field_facets":{"SimpleMapFacet":"{\"uiTypeLabel\":\"Integer\",\"read_only\":\"false\",\"hint\":\"\",\"uiType\":\"integer\",\"default_value\":\"\",\"label\":\"Code\",\"action_error_output\":\"true\",\"mandatory\":\"false\",\"order\":\"1\",\"max_length\":\"40\"}"},"message":"String","message.$field_facets":{"SimpleMapFacet":"{\"uiTypeLabel\":\"String\",\"read_only\":\"false\",\"hint\":\"\",\"uiType\":\"string\",\"default_value\":\"\",\"label\":\"Message\",\"action_error_output\":\"true\",\"mandatory\":\"false\",\"order\":\"2\",\"max_length\":\"4000\"}"}},"FlowDesigner:FDACTIONSTATUS.$type_facets":{"SimpleMapFacet":"{\"default_value\":\"\",\"label\":\"Action Status\",\"action_error_output\":\"true\",\"mandatory\":\"false\",\"uiUniqueId\":\"794bc342-9c9d-444b-a3f2-dd4b6a5a0173\",\"uiTypeLabel\":\"Object\",\"co_type_name\":\"FDACTIONSTATUS\",\"element_mapping_provider\":\"com.glide.flow_design.action.data.FlowDesignVariableMapper\",\"read_only\":\"false\",\"hint\":null,\"uiType\":\"object\",\"order\":\"1\",\"max_length\":\"65000\"}"}},"serializationFormat":"JSON","complexObject":{"code":{"$cv":{"$c":"java.lang.String","$v":""}},"message":{"$cv":{"$c":"java.lang.String","$v":""}}}} + bf3c214a83747650f89fc730ceaad334 + + + sys_hub_action_type_definition + ef3ced0a83747650f89fc730ceaad383 + 1 + sys_variable_value + nilesh + 2025-10-26 12:49:02 + fb3c214a83747650f89fc730ceaad352 + 0 + nilesh + 2025-10-26 12:49:02 + 0 + 7b3ced0a83747650f89fc730ceaad3fb + + + + is_member + ef3ced0a83747650f89fc730ceaad383 + nilesh + 2025-10-26 12:49:02 + 7b3c214a83747650f89fc730ceaad351 + 0 + nilesh + 2025-10-26 12:49:02 + var__m_sys_hub_action_output_ef3ced0a83747650f89fc730ceaad383
+ {{step[d1170653-c391-4d29-98ed-7a4fa236db80].is_member}} +
+ + is_success + ef3ced0a83747650f89fc730ceaad383 + nilesh + 2025-10-26 12:49:02 + bf3c214a83747650f89fc730ceaad351 + 0 + nilesh + 2025-10-26 12:49:02 + var__m_sys_hub_action_output_ef3ced0a83747650f89fc730ceaad383
+ {{step[d1170653-c391-4d29-98ed-7a4fa236db80].is_success}} +
+ + __action_status__ + ef3ced0a83747650f89fc730ceaad383 + nilesh + 2025-10-26 12:49:02 + 3b3c214a83747650f89fc730ceaad352 + 0 + nilesh + 2025-10-26 12:49:02 + var__m_sys_hub_action_output_ef3ced0a83747650f89fc730ceaad383
+ +
+ + __dont_treat_as_error__ + ef3ced0a83747650f89fc730ceaad383 + nilesh + 2025-10-26 12:49:02 + f33c214a83747650f89fc730ceaad352 + 0 + nilesh + 2025-10-26 12:49:02 + var__m_sys_hub_action_output_ef3ced0a83747650f89fc730ceaad383
+ +
+ + + ef3ced0a83747650f89fc730ceaad383 + d1170653-c391-4d29-98ed-7a4fa236db80 + 1 + + + + + + + 1 + +
+ 106afb6647032200b4fad7527c9a71e7 + nilesh + 2025-10-26 12:49:01 + 233ced0a83747650f89fc730ceaad3b5 + 1 + b812ceb69337a210633378917cba10bc + nilesh + 2025-10-26 12:49:01 + + + + sys_hub_step_instance + 233ced0a83747650f89fc730ceaad3b5 + 600 + sys_variable_value + nilesh + 2025-10-26 12:49:01 + 3b3ced0a83747650f89fc730ceaad3f3 + 0 + nilesh + 2025-10-26 12:49:01 + (function execute(inputs, outputs) { + try { + // Check membership using sys_user_grmember table + function isUserInGroup(userId, groupId) { + var membership = new GlideRecord("sys_user_grmember"); + membership.addQuery("user", userId); + membership + .addQuery("group", groupId) + .addOrCondition("group.name", groupId); + membership.query(); + return membership.hasNext(); + } + + var operator = inputs.operator; + var groups = inputs.groups || []; + var user = inputs.user || gs.getUserID(); + + var isMember = false; + var groupId; + + if (operator === "OR") { + for (var i = 0; i < groups.length; i++) { + groupId = groups[i].trim(); + if (isUserInGroup(user, groupId)) { + isMember = true; + break; + } + } + } else if (operator === "AND") { + isMember = true; + for (var i = 0; i < groups.length; i++) { + groupId = groups[i].trim(); + if (!isUserInGroup(user, groupId)) { + isMember = false; + break; + } + } + } + + outputs.is_member = isMember; + outputs.is_success = true; + } catch (error) { + gs.error("Error in group membership check: " + error.message); + outputs.is_member = false; + outputs.is_success = false; + } +})(inputs, outputs); + + 71aa7f6647032200b4fad7527c9a719b + + + sys_hub_step_instance + 233ced0a83747650f89fc730ceaad3b5 + 400 + sys_variable_value + nilesh + 2025-10-26 12:49:01 + 7b3ced0a83747650f89fc730ceaad3f2 + 0 + nilesh + 2025-10-26 12:49:01 + 35aa573fd7802200bdbaee5b5e610375 + f5e56d79b3101300176b051a16a8dce4 + + + + application + 233ced0a83747650f89fc730ceaad3b5 + nilesh + 2025-10-26 12:49:01 + 7b3ced0a83747650f89fc730ceaad3f1 + 0 + nilesh + 2025-10-26 12:49:01 + var__m_sys_flow_step_definition_input_106afb6647032200b4fad7527c9a71e7
+ +
+ + groups + 233ced0a83747650f89fc730ceaad3b5 + nilesh + 2025-10-26 12:49:01 + 7f3ced0a83747650f89fc730ceaad3f4 + 0 + nilesh + 2025-10-26 12:49:01 + var__m_sys_hub_step_ext_input_233ced0a83747650f89fc730ceaad3b5
+ {{action.assignment_groups}} +
+ + operator + 233ced0a83747650f89fc730ceaad3b5 + nilesh + 2025-10-26 12:49:01 + f73ced0a83747650f89fc730ceaad3f5 + 0 + nilesh + 2025-10-26 12:49:01 + var__m_sys_hub_step_ext_input_233ced0a83747650f89fc730ceaad3b5
+ {{action.operator}} +
+ + script + 233ced0a83747650f89fc730ceaad3b5 + nilesh + 2025-10-26 12:49:01 + b73ced0a83747650f89fc730ceaad3f2 + 0 + nilesh + 2025-10-26 12:49:01 + var__m_sys_flow_step_definition_input_106afb6647032200b4fad7527c9a71e7
+ +
+ + user + 233ced0a83747650f89fc730ceaad3b5 + nilesh + 2025-10-26 12:49:01 + b33ced0a83747650f89fc730ceaad3f5 + 0 + nilesh + 2025-10-26 12:49:01 + var__m_sys_hub_step_ext_input_233ced0a83747650f89fc730ceaad3b5
+ {{action.user_sysid}} +
+ + + + + + true + false + false + element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,uiType=choice,uiTypeLabel=Choice + false + + 1 + + + + + + + + + + + false + false + + + + operator + false + + + + false + + + choice + + + true + false + false + element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,uiType=string,uiTypeLabel=String + false + + + + + + + + + + + + + false + false + + + + user + false + + + + false + + + string + + + true + false + false + element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,uiType=string,uiTypeLabel=String + false + + + + + + + + + + + + + false + false + + + + groups + false + + + + false + + + string + + + + true + false + false + element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,uiType=boolean,uiTypeLabel=True/False,uiUniqueId=bc670969-8d67-4a45-9459-dafcbe5569e1 + false + + + + + + + + + + + + + false + false + + + + is_success + false + + + + false + + + boolean + + true + 40 + 233ced0a83747650f89fc730ceaad3b5 + 233ced0a83747650f89fc730ceaad3b5 + sys_hub_step_instance + var__m_sys_hub_step_ext_output_233ced0a83747650f89fc730ceaad3b5 + + 2 + false + false + + + + false + + + + + + false + false + sys_hub_step_ext_output + nilesh + 2025-10-26 12:49:01 + b33ced0a83747650f89fc730ceaad3d5 + 0 + + + + b812ceb69337a210633378917cba10bc + + nilesh + 2025-10-26 12:49:01 + false + false + false + false + false + simple + false + script + + + false + + + true + false + false + element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,uiType=boolean,uiTypeLabel=True/False,uiUniqueId=7f90f270-e831-4e22-b972-e045a386554f + false + + + + + + + + + + + + + false + false + + + + is_member + false + + + + false + + + boolean + + true + 40 + 233ced0a83747650f89fc730ceaad3b5 + 233ced0a83747650f89fc730ceaad3b5 + sys_hub_step_instance + var__m_sys_hub_step_ext_output_233ced0a83747650f89fc730ceaad3b5 + + 1 + false + false + + + + false + + + + + + false + false + sys_hub_step_ext_output + nilesh + 2025-10-26 12:49:01 + bb3ced0a83747650f89fc730ceaad3ce + 0 + + + + b812ceb69337a210633378917cba10bc + + nilesh + 2025-10-26 12:49:01 + false + false + false + false + false + simple + false + script + + + false + + + + is_member + + + + en + var__m_sys_hub_step_ext_output_233ced0a83747650f89fc730ceaad3b5 + + sys_documentation + nilesh + 2025-10-26 12:49:01 + 333ced0a83747650f89fc730ceaad3d4 + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + nilesh + 2025-10-26 12:49:01 + + + + + is_success + + + + en + var__m_sys_hub_step_ext_output_233ced0a83747650f89fc730ceaad3b5 + + sys_documentation + nilesh + 2025-10-26 12:49:01 + ff3ced0a83747650f89fc730ceaad3d8 + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + nilesh + 2025-10-26 12:49:01 + + + + + + true + false + false + element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,uiType=choice,uiTypeLabel=Choice,uiUniqueId=343171b9-f958-4bd9-84c8-fc6837745c3c + false + + 3 + + + + + + OR + + + + + false + false + + + + operator + false + + + + false + + + choice + + true + 32 + ef3ced0a83747650f89fc730ceaad383 + ef3ced0a83747650f89fc730ceaad383 + sys_hub_action_type_definition + var__m_sys_hub_action_input_ef3ced0a83747650f89fc730ceaad383 + + 1 + false + false + + + + false + + + + + + false + false + sys_hub_action_input + nilesh + 2025-10-26 12:49:00 + 673ced0a83747650f89fc730ceaad392 + 1 + + + + b812ceb69337a210633378917cba10bc + + nilesh + 2025-10-26 12:49:00 + false + false + false + false + false + simple + false + script + + + false + + + + true + false + false + element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,uiType=string,uiTypeLabel=String,uiUniqueId=a45d0ac4-d059-43cc-99f1-445d896806c9 + false + + + + + + + + + + + + + false + false + + + + user_sysid + false + + + + false + + + string + + false + 8000 + ef3ced0a83747650f89fc730ceaad383 + ef3ced0a83747650f89fc730ceaad383 + sys_hub_action_type_definition + var__m_sys_hub_action_input_ef3ced0a83747650f89fc730ceaad383 + + 2 + false + false + + + + false + + + + + + false + false + sys_hub_action_input + nilesh + 2025-10-26 12:49:01 + af3ced0a83747650f89fc730ceaad3a0 + 0 + + + + b812ceb69337a210633378917cba10bc + + nilesh + 2025-10-26 12:49:01 + false + false + false + false + false + simple + false + script + + + false + + + + + + true + false + false + child_label=Assignment Group,child_name=assignment_group,child_type=string,child_type_label=String,child_uiUniqueId=2aa52aaf-da60-40b6-b845-8934ec582907,co_type_name=FDd4e6ed0e16347650a01170fe9429ac99,element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,uiType=array.string,uiTypeLabel=Array.String,uiUniqueId=f4356fc2-f9fd-4745-8083-f2e6f2b24c34 + false + + + + + + + + + + + + + false + false + + + + assignment_groups + false + + + + false + + + string + + true + 65000 + ef3ced0a83747650f89fc730ceaad383 + ef3ced0a83747650f89fc730ceaad383 + sys_hub_action_type_definition + var__m_sys_hub_action_input_ef3ced0a83747650f89fc730ceaad383 + + 3 + false + false + + + + false + + + + + + false + false + sys_hub_action_input + nilesh + 2025-10-26 12:49:01 + ef3ced0a83747650f89fc730ceaad3a6 + 0 + + + + b812ceb69337a210633378917cba10bc + + nilesh + 2025-10-26 12:49:01 + false + false + false + false + false + simple + false + script + + + false + + + + + true + false + false + element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,uiType=boolean,uiTypeLabel=True/False,uiUniqueId=b38adda6-b12c-4fe2-af55-94d18c087d91 + false + + + + + + + + + + + + + false + false + + + + is_member + + false + + + + false + + + + boolean + + true + 40 + ef3ced0a83747650f89fc730ceaad383 + ef3ced0a83747650f89fc730ceaad383 + sys_hub_action_type_definition + var__m_sys_hub_action_output_ef3ced0a83747650f89fc730ceaad383 + + 1 + false + false + + + + false + + + + + + false + false + sys_hub_action_output + nilesh + 2025-10-26 12:49:01 + 7b3ced0a83747650f89fc730ceaad3fb + 0 + + + + b812ceb69337a210633378917cba10bc + + nilesh + 2025-10-26 12:49:01 + false + false + false + false + false + simple + false + script + + + false + + + + + true + false + false + element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,uiType=boolean,uiTypeLabel=True/False,uiUniqueId=3e33fa76-3d72-4080-ae2c-c2e7a45fd8a9 + false + + + + + + + + + + + + + false + false + + + + is_success + + false + + + + false + + + + boolean + + true + 40 + ef3ced0a83747650f89fc730ceaad383 + ef3ced0a83747650f89fc730ceaad383 + sys_hub_action_type_definition + var__m_sys_hub_action_output_ef3ced0a83747650f89fc730ceaad383 + + 3 + false + false + + + + false + + + + + + false + false + sys_hub_action_output + nilesh + 2025-10-26 12:49:01 + b33c214a83747650f89fc730ceaad33b + 0 + + + + b812ceb69337a210633378917cba10bc + + nilesh + 2025-10-26 12:49:01 + false + false + false + false + false + simple + false + script + + + false + + + + + true + false + false + action_error_output=true,element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,uiType=boolean,uiTypeLabel=True/False,uiUniqueId=e3140877-db0c-4387-a8dd-92209334d77c,visible_in_ui=false + false + + + + + + + + true + + + + + false + false + + + + __dont_treat_as_error__ + + false + + + + false + + + + boolean + + false + 40 + ef3ced0a83747650f89fc730ceaad383 + ef3ced0a83747650f89fc730ceaad383 + sys_hub_action_type_definition + var__m_sys_hub_action_output_ef3ced0a83747650f89fc730ceaad383 + + 4 + false + false + + + + false + + + + + + false + false + sys_hub_action_output + nilesh + 2025-10-26 12:49:01 + b33c214a83747650f89fc730ceaad341 + 1 + + + + b812ceb69337a210633378917cba10bc + + nilesh + 2025-10-26 12:49:02 + false + false + false + false + false + simple + false + script + + + false + + + + + true + false + false + action_error_output=true,co_type_name=FDACTIONSTATUS,element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,uiType=object,uiTypeLabel=Object,uiUniqueId=5eb3780a-d5c1-4b59-9bef-f9a7edc7d97d + false + + + + + + + + + + + + + false + false + + + + __action_status__ + + false + + + + false + + + + string + + false + 65000 + ef3ced0a83747650f89fc730ceaad383 + ef3ced0a83747650f89fc730ceaad383 + sys_hub_action_type_definition + var__m_sys_hub_action_output_ef3ced0a83747650f89fc730ceaad383 + + 2 + false + false + + + + false + + + + + + false + false + sys_hub_action_output + nilesh + 2025-10-26 12:49:01 + bf3c214a83747650f89fc730ceaad334 + 0 + + + + b812ceb69337a210633378917cba10bc + + nilesh + 2025-10-26 12:49:01 + false + false + false + false + false + simple + false + script + + + false + + + + + + + ef3ced0a83747650f89fc730ceaad383 + nilesh + 2025-10-26 12:49:02 + 3b3c214a83747650f89fc730ceaad356 + 0 + nilesh + 2025-10-26 12:49:02 + + + + operator + + + + en + var__m_sys_hub_action_input_ef3ced0a83747650f89fc730ceaad383 + + sys_documentation + nilesh + 2025-10-26 12:49:01 + 2f3ced0a83747650f89fc730ceaad39f + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + nilesh + 2025-10-26 12:49:01 + + + + + user_sysid + + If empty or not provided, will automatically check for the currently logged-in user + + en + var__m_sys_hub_action_input_ef3ced0a83747650f89fc730ceaad383 + + sys_documentation + nilesh + 2025-10-26 12:49:01 + 6f3ced0a83747650f89fc730ceaad3a5 + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + nilesh + 2025-10-26 12:49:01 + + + + + assignment_groups + + + + en + var__m_sys_hub_action_input_ef3ced0a83747650f89fc730ceaad383 + + sys_documentation + nilesh + 2025-10-26 12:49:01 + ab3ced0a83747650f89fc730ceaad3ac + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + nilesh + 2025-10-26 12:49:01 + + + + + + + + operator + + false + + en + var__m_sys_hub_action_input_ef3ced0a83747650f89fc730ceaad383 + 1 + + nilesh + 2025-10-26 12:49:00 + global + / + a33ced0a83747650f89fc730ceaad39a + 0 + nilesh + 2025-10-26 12:49:00 + AND + + + + operator + + false + + en + var__m_sys_hub_action_input_ef3ced0a83747650f89fc730ceaad383 + 0 + + nilesh + 2025-10-26 12:49:00 + global + / + ef3ced0a83747650f89fc730ceaad397 + 0 + nilesh + 2025-10-26 12:49:00 + OR + + + + __action_status__ + + + + en + var__m_sys_hub_action_output_ef3ced0a83747650f89fc730ceaad383 + + sys_documentation + nilesh + 2025-10-26 12:49:01 + 333c214a83747650f89fc730ceaad33a + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + nilesh + 2025-10-26 12:49:01 + + + + + is_success + + + + en + var__m_sys_hub_action_output_ef3ced0a83747650f89fc730ceaad383 + + sys_documentation + nilesh + 2025-10-26 12:49:01 + 333c214a83747650f89fc730ceaad340 + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + nilesh + 2025-10-26 12:49:01 + + + + + is_member + + + + en + var__m_sys_hub_action_output_ef3ced0a83747650f89fc730ceaad383 + + sys_documentation + nilesh + 2025-10-26 12:49:01 + 3f3c214a83747650f89fc730ceaad333 + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + nilesh + 2025-10-26 12:49:01 + + + + + __dont_treat_as_error__ + + + + en + var__m_sys_hub_action_output_ef3ced0a83747650f89fc730ceaad383 + + sys_documentation + nilesh + 2025-10-26 12:49:02 + 3f3c214a83747650f89fc730ceaad349 + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + nilesh + 2025-10-26 12:49:02 + + + + + +