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_512ea0493bac7210b61f3c8c24e45abd.xml b/b812ceb69337a210633378917cba10bc/update/sys_hub_action_type_definition_512ea0493bac7210b61f3c8c24e45abd.xml new file mode 100644 index 0000000..d847ce0 --- /dev/null +++ b/b812ceb69337a210633378917cba10bc/update/sys_hub_action_type_definition_512ea0493bac7210b61f3c8c24e45abd.xml @@ -0,0 +1,5825 @@ + + + public + + + + true + + {labelCacheCleanUpExecuted=true} + 27000 + false + + + + Secure Dynamic Execution + +A secure Flow Designer custom action that enables dynamic server-side script execution within flows with built-in security controls to prevent privilege escalation and destructive operations. + +## Overview + +This Flow Action allows builders and developers to execute ad-hoc server-side JavaScript code directly in Flow Designer without creating dedicated Script Actions or Script Includes. It's designed for rapid prototyping, conditional logic, and development workflows while maintaining security boundaries. + + false + execute_script_action + [{"name":"{{action.script}}","label":"action➛Script","type":"action","ref":"","reference_display":"","base_type":"string","parent_table_name":"","column_name":"","choices":null,"attributes":{"sourceId":"","uiTypeLabel":"String","element_mapping_provider":"com.glide.flow_design.action.data.FlowDesignVariableMapper","sourceUiUniqueId":"","sourceType":"","uiType":"string","uiUniqueId":"75c20b6f-d0db-4f1b-97f3-590c5f6197e1"}},{"name":"{{action.temp_table}}","label":"action➛Temp table","type":"action","ref":"","reference_display":"","base_type":"string","parent_table_name":"","column_name":"","choices":null,"attributes":{"sourceId":"","uiTypeLabel":"String","element_mapping_provider":"com.glide.flow_design.action.data.FlowDesignVariableMapper","sourceUiUniqueId":"","sourceType":"","uiType":"string","uiUniqueId":"ce44ed42-643a-461e-8291-d3b587fa83d3"}},{"name":"{{action.script_field}}","label":"action➛Script field","type":"action","ref":"","reference_display":"","base_type":"string","parent_table_name":"","column_name":"","choices":null,"attributes":{"sourceId":"","uiTypeLabel":"String","element_mapping_provider":"com.glide.flow_design.action.data.FlowDesignVariableMapper","sourceUiUniqueId":"","sourceType":"","uiType":"string","uiUniqueId":"877d7eba-a992-4efc-89b8-b24ab40abd0e"}},{"name":"{{action.executed_by}}","label":"action➛Executed by","type":"action","ref":"","reference_display":"","base_type":"string","parent_table_name":"","column_name":"","choices":null,"attributes":{"uiTypeLabel":"String","element_mapping_provider":"com.glide.flow_design.action.data.FlowDesignVariableMapper","uiType":"string","uiUniqueId":"9571fe19-c921-46e1-9d7b-0586a4ae1897"}},{"name":"{{action.variable}}","label":"action➛variable","type":"action","ref":"","reference_display":"","base_type":"string","parent_table_name":"","column_name":"","choices":null,"attributes":{}},{"name":"{{action.executed_by_name}}","label":"action➛Executed by name","type":"action","ref":"","reference_display":"","base_type":"string","parent_table_name":"","column_name":"","choices":null,"attributes":{"uiTypeLabel":"String","element_mapping_provider":"com.glide.flow_design.action.data.FlowDesignVariableMapper","uiType":"string","uiUniqueId":"567c3a55-1859-4a5e-9505-6eb8c69bfc4c"}},{"name":"{{action.exceuted}}","label":"action➛Exceuted","type":"action","ref":"","reference_display":"","base_type":"string","parent_table_name":"","column_name":"","choices":null,"attributes":{}},{"name":"{{action.excecuted}}","label":"action➛Excecuted","type":"action","ref":"","reference_display":"","base_type":"string","parent_table_name":"","column_name":"","choices":null,"attributes":{}},{"name":"{{action.execution_times}}","label":"action➛Execution times","type":"action","ref":"","reference_display":"","base_type":"string","parent_table_name":"","column_name":"","choices":null,"attributes":{}},{"name":"{{action.execution_time_fiels}}","label":"action➛Execution time fiels","type":"action","ref":"","reference_display":"","base_type":"string","parent_table_name":"","column_name":"","choices":null,"attributes":{}},{"name":"{{action.execution_time_field}}","label":"action➛Execution time field","type":"action","ref":"","reference_display":"","base_type":"string","parent_table_name":"","column_name":"","choices":null,"attributes":{"uiTypeLabel":"String","element_mapping_provider":"com.glide.flow_design.action.data.FlowDesignVariableMapper","uiType":"string","uiUniqueId":"e6174c82-b505-44ef-977c-79dce04539b0"}},{"name":"{{step[77201c1d-f571-4611-a709-fc911d854dff].success}}","label":"step➛Script step➛success","type":"step","ref":"","reference_display":"","base_type":"boolean","parent_table_name":"","column_name":"","choices":null,"attributes":{"sourceId":"","sourceUiUniqueId":"","sourceType":""}},{"name":"{{step[77201c1d-f571-4611-a709-fc911d854dff].error}}","label":"step➛Script step➛error","type":"step","ref":"","reference_display":"","base_type":"string","parent_table_name":"","column_name":"","choices":null,"attributes":{"sourceId":"","sourceUiUniqueId":"","sourceType":""}},{"name":"{{step[77201c1d-f571-4611-a709-fc911d854dff].result}}","label":"step➛Script step➛result","type":"step","ref":"","reference_display":"","base_type":"string","parent_table_name":"","column_name":"","choices":null,"attributes":{"sourceId":"","sourceUiUniqueId":"","sourceType":""}},{"name":"{{step[77201c1d-f571-4611-a709-fc911d854dff].execution_time_ms}}","label":"step➛Script step➛execution_time_ms","type":"step","ref":"","reference_display":"","base_type":"integer","parent_table_name":"","column_name":"","choices":null,"attributes":{"sourceId":"","sourceUiUniqueId":"","sourceType":""}}] + 1728b4c53bec7210b61f3c8c24e45a8f + + Execute Script Action + + + + false + draft + sys_hub_action_type_definition + admin + 2025-10-10 19:28:05 + global + / + 512ea0493bac7210b61f3c8c24e45abd + 22 + Execute Script Action + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + sys_hub_action_type_definition_512ea0493bac7210b61f3c8c24e45abd + admin + 2025-10-10 20:13:45 + false + + + + + + sys_hub_action_type_definition + 512ea0493bac7210b61f3c8c24e45abd + 6 + sys_variable_value + admin + 2025-10-10 19:31:47 + 23fee0893bac7210b61f3c8c24e45a9e + 0 + admin + 2025-10-10 19:31:47 + + 6ffee0893bac7210b61f3c8c24e45a6e + + + sys_hub_action_type_definition + 512ea0493bac7210b61f3c8c24e45abd + 1 + sys_variable_value + admin + 2025-10-10 19:31:47 + 6bfee0893bac7210b61f3c8c24e45a9e + 0 + admin + 2025-10-10 19:31:47 + {"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":""}}}} + abfee0893bac7210b61f3c8c24e45a3c + + + sys_hub_action_type_definition + 512ea0493bac7210b61f3c8c24e45abd + 2 + sys_variable_value + admin + 2025-10-10 19:31:47 + a7fee0893bac7210b61f3c8c24e45a9e + 0 + admin + 2025-10-10 19:31:47 + 0 + e7fee0893bac7210b61f3c8c24e45a4e + + + sys_hub_action_type_definition + 512ea0493bac7210b61f3c8c24e45abd + 3 + sys_variable_value + admin + 2025-10-10 19:31:47 + e3fee0893bac7210b61f3c8c24e45a9e + 0 + admin + 2025-10-10 19:31:47 + 0 + abfee0893bac7210b61f3c8c24e45a52 + + + + error + 512ea0493bac7210b61f3c8c24e45abd + admin + 2025-10-10 19:31:47 + ebfee0893bac7210b61f3c8c24e45a9d + 0 + admin + 2025-10-10 19:31:47 + var__m_sys_hub_action_output_512ea0493bac7210b61f3c8c24e45abd
+ {{step[77201c1d-f571-4611-a709-fc911d854dff].result}} +
+ + execution_time_ms + 512ea0493bac7210b61f3c8c24e45abd + admin + 2025-10-10 19:31:47 + a3fee0893bac7210b61f3c8c24e45a9d + 0 + admin + 2025-10-10 19:31:47 + var__m_sys_hub_action_output_512ea0493bac7210b61f3c8c24e45abd
+ {{step[77201c1d-f571-4611-a709-fc911d854dff].execution_time_ms}} +
+ + result + 512ea0493bac7210b61f3c8c24e45abd + admin + 2025-10-10 19:31:47 + effee0893bac7210b61f3c8c24e45a9c + 0 + admin + 2025-10-10 19:31:47 + var__m_sys_hub_action_output_512ea0493bac7210b61f3c8c24e45abd
+ {{step[77201c1d-f571-4611-a709-fc911d854dff].error}} +
+ + success + 512ea0493bac7210b61f3c8c24e45abd + admin + 2025-10-10 19:31:47 + 2bfee0893bac7210b61f3c8c24e45a9d + 0 + admin + 2025-10-10 19:31:47 + var__m_sys_hub_action_output_512ea0493bac7210b61f3c8c24e45abd
+ {{step[77201c1d-f571-4611-a709-fc911d854dff].success}} +
+ + __action_status__ + 512ea0493bac7210b61f3c8c24e45abd + admin + 2025-10-10 19:31:47 + affee0893bac7210b61f3c8c24e45a9d + 0 + admin + 2025-10-10 19:31:47 + var__m_sys_hub_action_output_512ea0493bac7210b61f3c8c24e45abd
+ +
+ + __dont_treat_as_error__ + 512ea0493bac7210b61f3c8c24e45abd + admin + 2025-10-10 19:31:47 + 67fee0893bac7210b61f3c8c24e45a9d + 0 + admin + 2025-10-10 19:31:47 + var__m_sys_hub_action_output_512ea0493bac7210b61f3c8c24e45abd
+ +
+ + + 512ea0493bac7210b61f3c8c24e45abd + 77201c1d-f571-4611-a709-fc911d854dff + 1 + + + + + + + 1 + +
+ 106afb6647032200b4fad7527c9a71e7 + admin + 2025-10-10 19:31:46 + 57fee0893bac7210b61f3c8c24e45a10 + 8 + b812ceb69337a210633378917cba10bc + admin + 2025-10-10 20:11:08 + + + + sys_hub_step_instance + 57fee0893bac7210b61f3c8c24e45a10 + 400 + sys_variable_value + admin + 2025-10-10 19:31:47 + 2ffee0893bac7210b61f3c8c24e45a38 + 0 + admin + 2025-10-10 19:31:47 + 35aa573fd7802200bdbaee5b5e610375 + f5e56d79b3101300176b051a16a8dce4 + + + sys_hub_step_instance + 57fee0893bac7210b61f3c8c24e45a10 + 600 + sys_variable_value + admin + 2025-10-10 19:31:47 + 67fee0893bac7210b61f3c8c24e45a39 + 7 + admin + 2025-10-10 20:11:08 + (function execute(inputs, outputs) { + // Security Configuration: Restricted Tables (High-Privilege Access) + var RESTRICTED_TABLES = [ + 'sys_user', + 'sys_user_group', + 'sys_user_role', + 'sys_user_has_role', + 'sys_user_grmember', + 'sys_security_acl', + 'sys_security_acl_role', + 'sys_db_object', + 'sys_dictionary', + 'sys_script', + 'sys_script_include', + 'sys_ui_script', + 'sys_ui_action', + 'sys_business_rule', + 'sys_properties', + 'sys_scope', + 'sys_app', + 'sys_package', + 'oauth_entity', + 'oauth_credential', + 'sys_auth_profile_application' + ]; + + // Security Configuration: Blocked Operations + var BLOCKED_OPERATIONS = [ + 'deleteRecord', + 'deleteMultiple', + 'setWorkflow', + 'setAbortAction', + 'autoSysFields', + 'setNewGuidValue' + ]; + + // Security Configuration: Whitelisted Classes (Safe to instantiate) + // Note: Some classes are excluded for scoped app compatibility + var WHITELISTED_CLASSES = [ + 'GlideRecord', + 'GlideDateTime', + 'GlideDate', + 'GlideTime', + 'GlideDuration', + 'GlideAggregate', + 'GlideElement', + 'GlideFilter', + 'GlideSchedule', + 'GlideStringUtil' + // GlideEncrypter - Not allowed in scoped apps + // GlideChecksum - May not be allowed in scoped apps + // GlideDigest - May not be allowed in scoped apps + ]; + + // Security Configuration: Blocked Script Include Patterns + var BLOCKED_SCRIPT_INCLUDE_PATTERNS = [ + 'gs.include(', // Block gs.include() calls + 'GlideScriptInclude' // Block Script Include API + ]; + + // Security Configuration: High-Privilege Role/User sys_ids to block + // These are well-known sys_ids that attackers might hardcode + var BLOCKED_SYSIDS = [ + '2831a114c611228501d4ea6c309d626d', // admin role + '6816f79cc0a8016401c5a33be04be441', // admin user + '5d7e6b13c611227a0146101de1d70f5b', // security_admin role + '0c441abbc6112275000025157c2f22de' // maint role (maintenance) + ]; + + // Initialize output variables + outputs.success = false; + outputs.result = ''; + outputs.error = ''; + outputs.execution_time_ms = 0; + + try { + // Validate required inputs + if (!inputs.script_input || inputs.script_input.trim() === '') { + throw new Error('Script input is required and cannot be empty'); + } + + if (!inputs.temp_table || inputs.temp_table.trim() === '') { + throw new Error('Temp table name is required (e.g., x_snc_actionpack_script_temp)'); + } + + if (!inputs.script_field || inputs.script_field.trim() === '') { + throw new Error('Script field name is required (e.g., script)'); + } + + var tempTableName = inputs.temp_table.trim(); + var scriptFieldName = inputs.script_field.trim(); + + // Optional audit field names (only use if provided) + var executedByField = inputs.executed_by_field ? inputs.executed_by_field.trim() : null; + var executedByNameField = inputs.executed_by_name_field ? inputs.executed_by_name_field.trim() : null; + var executionTimeField = inputs.execution_time_field ? inputs.execution_time_field.trim() : null; + + // Validate that the table exists and is accessible + var testTable = new GlideRecord(tempTableName); + if (!testTable.isValid()) { + throw new Error('Table "' + tempTableName + '" does not exist or is not accessible. Please create it in your scoped app.'); + } + + // Validate that the script field exists + if (!testTable.isValidField(scriptFieldName)) { + throw new Error('Field "' + scriptFieldName + '" does not exist on table "' + tempTableName + '". Please add a Script-type field with this name.'); + } + + var scriptToExecute = inputs.script_input.trim(); + var startTime = new GlideDateTime(); + + // Security Check 1: Scan for restricted table access + var scriptLower = scriptToExecute.toLowerCase(); + for (var i = 0; i < RESTRICTED_TABLES.length; i++) { + var tableName = RESTRICTED_TABLES[i]; + // Check for GlideRecord instantiation or table references + if (scriptLower.indexOf("'" + tableName + "'") !== -1 || + scriptLower.indexOf('"' + tableName + '"') !== -1 || + scriptLower.indexOf('`' + tableName + '`') !== -1) { + throw new Error('SECURITY VIOLATION: Access to restricted table "' + tableName + '" is not allowed'); + } + } + + // Security Check 1b: Block hardcoded high-privilege sys_ids + // Prevents attackers from bypassing table checks by using direct sys_ids + for (var s = 0; s < BLOCKED_SYSIDS.length; s++) { + var sysId = BLOCKED_SYSIDS[s]; + if (scriptToExecute.indexOf(sysId) !== -1) { + throw new Error('SECURITY VIOLATION: Reference to high-privilege sys_id is not allowed - prevents hardcoded admin/security role manipulation'); + } + } + + // Security Check 2: Block delete operations + if (scriptLower.indexOf('deleterecord') !== -1 || + scriptLower.indexOf('deletemultiple') !== -1) { + throw new Error('SECURITY VIOLATION: Delete operations are not allowed'); + } + + // Security Check 3: Block dangerous GlideRecord methods + for (var j = 0; j < BLOCKED_OPERATIONS.length; j++) { + var operation = BLOCKED_OPERATIONS[j].toLowerCase(); + if (scriptLower.indexOf(operation) !== -1) { + throw new Error('SECURITY VIOLATION: Operation "' + BLOCKED_OPERATIONS[j] + '" is not allowed'); + } + } + + // Security Check 4: Block eval and Function constructor + // Note: We allow regular function declarations/IIFEs, but block Function constructor + if (scriptLower.indexOf('eval(') !== -1 || + scriptLower.indexOf('new function') !== -1) { + throw new Error('SECURITY VIOLATION: Dynamic code evaluation (eval, Function constructor) is not allowed'); + } + + // Security Check 5: Block system-level operations and indirect code execution + var dangerousPatterns = [ + 'eval(', + 'new Function(', // Block Function constructor, but allow regular function declarations + 'gs.executeNow(', + 'gs.eventQueue(', + 'gs.setProperty(', // Prevents system property manipulation + 'Packages.java', + 'java.lang', + 'GlideScopedEvaluator', + 'GlideEvaluator', + 'SncTriggerSynchronizer', // Prevents triggering scheduled jobs + 'GlideScheduler', // Prevents scheduling jobs + 'GlideScriptedProcessor', // Prevents processor execution + 'GlideScriptedHierarchicalWorker', // Prevents worker execution + 'sysauto', // Prevents scheduled job manipulation + 'sys_trigger', // Prevents trigger manipulation + 'GlideController', // Prevents UI action execution + 'GlideServlet', // Prevents servlet access + 'GlideSession.get(', // Prevents session hijacking + 'gs.getSession().impersonate', // Prevents impersonation + 'gs.getSession().setUser' // Prevents session user manipulation + ]; + + for (var k = 0; k < dangerousPatterns.length; k++) { + if (scriptLower.indexOf(dangerousPatterns[k].toLowerCase()) !== -1) { + throw new Error('SECURITY VIOLATION: System-level operation "' + dangerousPatterns[k] + '" is not allowed'); + } + } + + // Security Check 6: Block Script Include instantiation (indirect privilege escalation) + // This prevents users from calling custom Script Includes that may have elevated privileges + + // First, block gs.include() and GlideScriptInclude + for (var m = 0; m < BLOCKED_SCRIPT_INCLUDE_PATTERNS.length; m++) { + var pattern = BLOCKED_SCRIPT_INCLUDE_PATTERNS[m].toLowerCase(); + if (scriptLower.indexOf(pattern) !== -1) { + throw new Error('SECURITY VIOLATION: Script Include loading ("' + BLOCKED_SCRIPT_INCLUDE_PATTERNS[m] + '") is not allowed - prevents indirect privilege escalation'); + } + } + + // Second, check for 'new' keyword usage and validate against whitelist + var newKeywordRegex = /new\s+([A-Za-z_][A-Za-z0-9_]*)/gi; + var matches = scriptToExecute.match(newKeywordRegex); + + if (matches) { + for (var n = 0; n < matches.length; n++) { + var match = matches[n]; + // Extract class name after 'new' + var className = match.replace(/new\s+/i, '').trim(); + + // Check if class is in whitelist + var isWhitelisted = false; + for (var w = 0; w < WHITELISTED_CLASSES.length; w++) { + if (className.toLowerCase() === WHITELISTED_CLASSES[w].toLowerCase()) { + isWhitelisted = true; + break; + } + } + + if (!isWhitelisted) { + throw new Error('SECURITY VIOLATION: Instantiation of non-whitelisted class "' + className + '" is not allowed. Only ServiceNow API classes (GlideRecord, GlideDateTime, etc.) are permitted - prevents indirect privilege escalation via Script Includes'); + } + } + } + + // Execute script with controlled scope + // Note: GlideSandbox is not available in Flow Designer scope, so we use + // GlideScopedEvaluator for scoped app compatibility + var executionResult; + + try { + // Create isolated execution context + // We pass only whitelisted variables to limit scope access + + try { + // Use GlideScopedEvaluator for scoped app compatibility + // IMPORTANT: GlideScopedEvaluator runs in system context for security isolation + // This is mitigated by the 8 layers of security checks above + + // Check if script is already wrapped in a function + var scriptTrimmed = scriptToExecute.trim(); + var isAlreadyWrapped = scriptTrimmed.match(/^\(?function\s*\(/i) || + scriptTrimmed.match(/^\(\s*function\s*\(/i); + + // Wrap script in IIFE to support return statements (if not already wrapped) + var wrappedScript = isAlreadyWrapped ? scriptToExecute : '(function() { ' + scriptToExecute + ' })()'; + + // Create a temporary record in the specified table to hold the script + var tempScript = new GlideRecord(tempTableName); + tempScript.initialize(); + tempScript.setValue(scriptFieldName, wrappedScript); + + // Add audit information if field names were provided and fields exist + if (executedByField && tempScript.isValidField(executedByField)) { + tempScript.setValue(executedByField, gs.getUserID()); + } + if (executedByNameField && tempScript.isValidField(executedByNameField)) { + tempScript.setValue(executedByNameField, gs.getUserName()); + } + if (executionTimeField && tempScript.isValidField(executionTimeField)) { + tempScript.setValue(executionTimeField, new GlideDateTime()); + } + + // Insert the record - GlideScopedEvaluator needs a persisted record + var tempSysId = tempScript.insert(); + + // Re-query to get the actual record + tempScript = new GlideRecord(tempTableName); + tempScript.get(tempSysId); + + // Create evaluator + var evaluator = new GlideScopedEvaluator(); + + // Put variables into the evaluator context + // Note: We don't pass GlideRecord and other classes as they're globally available + // Passing them as variables can cause scope issues with methods like setLimit() + var variables = { + inputs: inputs, + outputs: outputs, + gs: gs + }; + + // Execute the script from the temporary record + // evaluateScript(GlideRecord, scriptField, variables) + executionResult = evaluator.evaluateScript(tempScript, scriptFieldName, variables); + + // Clean up: Delete the temporary record + if (tempSysId) { + tempScript.deleteRecord(); + } + + } finally { + // Cleanup handled above + } + + } catch (executionError) { + throw new Error('Script execution failed: ' + executionError.message); + } + + // Calculate execution time + var endTime = new GlideDateTime(); + var duration = GlideDateTime.subtract(startTime, endTime); + outputs.execution_time_ms = duration.getNumericValue(); + + // Compile results + var resultOutput = ''; + + if (executionResult !== undefined && executionResult !== null) { + resultOutput = 'Return Value: ' + String(executionResult); + } + + outputs.success = true; + outputs.result = resultOutput || 'Script executed successfully with no return value. End your script with the expression you want to return.'; + + // Log successful execution for audit + gs.info('Flow Action - Run Script: Executed successfully by ' + gs.getUserName() + + ' | Duration: ' + outputs.execution_time_ms + 'ms'); + + } catch (error) { + outputs.success = false; + outputs.error = 'Error: ' + error.message; + outputs.result = ''; + + // Log security violations and errors for audit + if (error.message.indexOf('SECURITY VIOLATION') !== -1) { + gs.error('Flow Action - Run Script: SECURITY VIOLATION by ' + gs.getUserName() + + ' | Error: ' + error.message); + } else { + gs.warn('Flow Action - Run Script: Execution failed for ' + gs.getUserName() + + ' | Error: ' + error.message); + } + } + +})(inputs, outputs); + 71aa7f6647032200b4fad7527c9a719b + + + + application + 57fee0893bac7210b61f3c8c24e45a10 + admin + 2025-10-10 19:31:47 + e3fee0893bac7210b61f3c8c24e45a38 + 0 + admin + 2025-10-10 19:31:47 + var__m_sys_flow_step_definition_input_106afb6647032200b4fad7527c9a71e7
+ +
+ + executed_by_field + 57fee0893bac7210b61f3c8c24e45a10 + admin + 2025-10-10 20:01:49 + e3d5f0053bec7210b61f3c8c24e45acc + 0 + admin + 2025-10-10 20:01:49 + var__m_sys_hub_step_ext_input_57fee0893bac7210b61f3c8c24e45a10
+ {{action.executed_by}} +
+ + executed_by_name_field + 57fee0893bac7210b61f3c8c24e45a10 + admin + 2025-10-10 20:01:49 + a7d5f0053bec7210b61f3c8c24e45acc + 0 + admin + 2025-10-10 20:01:49 + var__m_sys_hub_step_ext_input_57fee0893bac7210b61f3c8c24e45a10
+ {{action.executed_by_name}} +
+ + execution_time_field + 57fee0893bac7210b61f3c8c24e45a10 + admin + 2025-10-10 20:01:49 + 6bd5f0053bec7210b61f3c8c24e45acc + 0 + admin + 2025-10-10 20:01:49 + var__m_sys_hub_step_ext_input_57fee0893bac7210b61f3c8c24e45a10
+ {{action.execution_time_field}} +
+ + script + 57fee0893bac7210b61f3c8c24e45a10 + admin + 2025-10-10 19:31:47 + abfee0893bac7210b61f3c8c24e45a38 + 0 + admin + 2025-10-10 19:31:47 + var__m_sys_flow_step_definition_input_106afb6647032200b4fad7527c9a71e7
+ +
+ + script_field + 57fee0893bac7210b61f3c8c24e45a10 + admin + 2025-10-10 19:38:19 + 1370380d3bac7210b61f3c8c24e45ad4 + 0 + admin + 2025-10-10 19:38:19 + var__m_sys_hub_step_ext_input_57fee0893bac7210b61f3c8c24e45a10
+ {{action.script_field}} +
+ + script_input + 57fee0893bac7210b61f3c8c24e45a10 + admin + 2025-10-10 19:38:19 + d370380d3bac7210b61f3c8c24e45ad4 + 0 + admin + 2025-10-10 19:38:19 + var__m_sys_hub_step_ext_input_57fee0893bac7210b61f3c8c24e45a10
+ {{action.script}} +
+ + temp_table + 57fee0893bac7210b61f3c8c24e45a10 + admin + 2025-10-10 19:38:19 + 9770380d3bac7210b61f3c8c24e45ad4 + 0 + admin + 2025-10-10 19:38:19 + var__m_sys_hub_step_ext_input_57fee0893bac7210b61f3c8c24e45a10
+ {{action.temp_table}} +
+ + + + + + true + false + false + element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,uiType=string,uiTypeLabel=String + false + + + + + + + + + + + + + false + false + + + + script_input + false + + + + false + + + string + + + true + false + false + element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,uiType=string,uiTypeLabel=String + false + + + + + + + + + + + + + false + false + + + + executed_by_field + false + + + + false + + + string + + + true + false + false + element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,uiType=string,uiTypeLabel=String + false + + + + + + + + + + + + + false + false + + + + executed_by_name_field + false + + + + false + + + string + + + true + false + false + element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,uiType=string,uiTypeLabel=String + false + + + + + + + + + + + + + false + false + + + + temp_table + false + + + + false + + + string + + + true + false + false + element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,uiType=string,uiTypeLabel=String + false + + + + + + + + + + + + + false + false + + + + script_field + false + + + + false + + + string + + + true + false + false + element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,uiType=string,uiTypeLabel=String + false + + + + + + + + + + + + + false + false + + + + execution_time_field + false + + + + false + + + string + + + + true + false + false + element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,uiType=string,uiTypeLabel=String,uiUniqueId=0234b644-f6b2-47e3-a607-f9dad0c9b1b9 + false + + + + + + + + + + + + + false + false + + + + error + false + + + + false + + + string + + false + 8000 + 57fee0893bac7210b61f3c8c24e45a10 + 57fee0893bac7210b61f3c8c24e45a10 + sys_hub_step_instance + var__m_sys_hub_step_ext_output_57fee0893bac7210b61f3c8c24e45a10 + + 2 + false + false + + + + false + + + + + + false + false + sys_hub_step_ext_output + admin + 2025-10-10 19:31:46 + a3fee0893bac7210b61f3c8c24e45a1b + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 19:31:46 + false + false + false + false + false + simple + false + script + + + false + + + true + false + false + element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,uiType=integer,uiTypeLabel=Integer,uiUniqueId=35f087e7-dda4-4515-a3d9-6e1645f8587b + false + + + + + + + + + + + + + false + false + + + + execution_time_ms + false + + + + false + + + integer + + false + 40 + 57fee0893bac7210b61f3c8c24e45a10 + 57fee0893bac7210b61f3c8c24e45a10 + sys_hub_step_instance + var__m_sys_hub_step_ext_output_57fee0893bac7210b61f3c8c24e45a10 + + 4 + false + false + + + + false + + + + + + false + false + sys_hub_step_ext_output + admin + 2025-10-10 19:31:46 + a3fee0893bac7210b61f3c8c24e45a22 + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 19:31:46 + 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=f3f1624f-ad97-43ce-b2d6-af8e4001cac1 + false + + + + + + + + + + + + + false + false + + + + result + false + + + + false + + + string + + false + 8000 + 57fee0893bac7210b61f3c8c24e45a10 + 57fee0893bac7210b61f3c8c24e45a10 + sys_hub_step_instance + var__m_sys_hub_step_ext_output_57fee0893bac7210b61f3c8c24e45a10 + + 3 + false + false + + + + false + + + + + + false + false + sys_hub_step_ext_output + admin + 2025-10-10 19:31:46 + abfee0893bac7210b61f3c8c24e45a1e + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 19:31:46 + 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=7c5e0b93-987b-44b6-8d7f-59c97ec0f7b5 + false + + + + + + + + + + + + + false + false + + + + success + false + + + + false + + + boolean + + false + 40 + 57fee0893bac7210b61f3c8c24e45a10 + 57fee0893bac7210b61f3c8c24e45a10 + sys_hub_step_instance + var__m_sys_hub_step_ext_output_57fee0893bac7210b61f3c8c24e45a10 + + 1 + false + false + + + + false + + + + + + false + false + sys_hub_step_ext_output + admin + 2025-10-10 19:31:46 + d7fee0893bac7210b61f3c8c24e45a16 + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 19:31:46 + false + false + false + false + false + simple + false + script + + + false + + + + success + + + + en + var__m_sys_hub_step_ext_output_57fee0893bac7210b61f3c8c24e45a10 + + sys_documentation + admin + 2025-10-10 19:31:46 + a3fee0893bac7210b61f3c8c24e45a1a + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 19:31:46 + + + + + result + + + + en + var__m_sys_hub_step_ext_output_57fee0893bac7210b61f3c8c24e45a10 + + sys_documentation + admin + 2025-10-10 19:31:46 + a3fee0893bac7210b61f3c8c24e45a21 + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 19:31:46 + + + + + error + + + + en + var__m_sys_hub_step_ext_output_57fee0893bac7210b61f3c8c24e45a10 + + sys_documentation + admin + 2025-10-10 19:31:46 + abfee0893bac7210b61f3c8c24e45a1d + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 19:31:46 + + + + + execution_time_ms + + + + en + var__m_sys_hub_step_ext_output_57fee0893bac7210b61f3c8c24e45a10 + + sys_documentation + admin + 2025-10-10 19:31:46 + abfee0893bac7210b61f3c8c24e45a24 + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 19:31:46 + + + + + + true + false + false + element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,uiType=string,uiTypeLabel=String,uiUniqueId=e6174c82-b505-44ef-977c-79dce04539b0 + false + + + + + + + + + + + + + false + false + + + + execution_time_field + false + + + + false + + + string + + false + 8000 + 512ea0493bac7210b61f3c8c24e45abd + 512ea0493bac7210b61f3c8c24e45abd + sys_hub_action_type_definition + var__m_sys_hub_action_input_512ea0493bac7210b61f3c8c24e45abd + + 6 + false + false + + + + false + + + + + + false + false + sys_hub_action_input + admin + 2025-10-10 19:59:30 + 395538c13bec7210b61f3c8c24e45a4e + 1 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:09:58 + 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=877d7eba-a992-4efc-89b8-b24ab40abd0e + false + + + + + + + + + + + + + false + false + + + + script_field + false + + + + false + + + string + + true + 8000 + 512ea0493bac7210b61f3c8c24e45abd + 512ea0493bac7210b61f3c8c24e45abd + sys_hub_action_type_definition + var__m_sys_hub_action_input_512ea0493bac7210b61f3c8c24e45abd + + 3 + false + false + + + + false + + + + + + false + false + sys_hub_action_input + admin + 2025-10-10 19:31:46 + 57fea0893bac7210b61f3c8c24e45af5 + 1 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 19:45:28 + 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=9571fe19-c921-46e1-9d7b-0586a4ae1897 + false + + + + + + + + + + + + + false + false + + + + executed_by + false + + + + false + + + string + + false + 8000 + 512ea0493bac7210b61f3c8c24e45abd + 512ea0493bac7210b61f3c8c24e45abd + sys_hub_action_type_definition + var__m_sys_hub_action_input_512ea0493bac7210b61f3c8c24e45abd + + 4 + false + false + + + + false + + + + + + false + false + sys_hub_action_input + admin + 2025-10-10 19:59:30 + 6d5538c13bec7210b61f3c8c24e45a46 + 1 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:09:58 + 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=ce44ed42-643a-461e-8291-d3b587fa83d3 + false + + + + + + + + + + + + + false + false + + + + temp_table + false + + + + false + + + string + + true + 8000 + 512ea0493bac7210b61f3c8c24e45abd + 512ea0493bac7210b61f3c8c24e45abd + sys_hub_action_type_definition + var__m_sys_hub_action_input_512ea0493bac7210b61f3c8c24e45abd + + 2 + false + false + + + + false + + + + + + false + false + sys_hub_action_input + admin + 2025-10-10 19:31:46 + 93fea0893bac7210b61f3c8c24e45af1 + 1 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 19:45:28 + 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=75c20b6f-d0db-4f1b-97f3-590c5f6197e1 + false + + + + + + + + + + + + + false + false + + + + script + false + + + + false + + + string + + true + 8000 + 512ea0493bac7210b61f3c8c24e45abd + 512ea0493bac7210b61f3c8c24e45abd + sys_hub_action_type_definition + var__m_sys_hub_action_input_512ea0493bac7210b61f3c8c24e45abd + + 1 + false + false + + + + false + + + + + + false + false + sys_hub_action_input + admin + 2025-10-10 19:31:46 + 97fea0893bac7210b61f3c8c24e45aeb + 1 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 19:45:28 + 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=567c3a55-1859-4a5e-9505-6eb8c69bfc4c + false + + + + + + + + + + + + + false + false + + + + executed_by_name + false + + + + false + + + string + + false + 8000 + 512ea0493bac7210b61f3c8c24e45abd + 512ea0493bac7210b61f3c8c24e45abd + sys_hub_action_type_definition + var__m_sys_hub_action_input_512ea0493bac7210b61f3c8c24e45abd + + 5 + false + false + + + + false + + + + + + false + false + sys_hub_action_input + admin + 2025-10-10 19:59:30 + f95538c13bec7210b61f3c8c24e45a4a + 1 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:09:58 + false + false + false + false + false + simple + false + script + + + false + + + + + true + false + false + element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,pwd2droppable=true,uiType=string,uiTypeLabel=String,uiUniqueId=be3fca04-d561-4623-9a53-984d48549350 + false + + + + + + + + + + + + + false + false + + + + result + + false + + + + false + + + + string + + false + 8000 + 512ea0493bac7210b61f3c8c24e45abd + 512ea0493bac7210b61f3c8c24e45abd + sys_hub_action_type_definition + var__m_sys_hub_action_output_512ea0493bac7210b61f3c8c24e45abd + + 4 + false + false + + + + false + + + + + + false + false + sys_hub_action_output + admin + 2025-10-10 19:31:47 + 67fee0893bac7210b61f3c8c24e45a66 + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 19:31:47 + false + false + false + false + false + simple + false + script + + + false + + + + + true + false + false + element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,pwd2droppable=true,uiType=string,uiTypeLabel=String,uiUniqueId=bba8524a-5296-4af0-b517-7264797c53a8 + false + + + + + + + + + + + + + false + false + + + + error + + false + + + + false + + + + string + + false + 8000 + 512ea0493bac7210b61f3c8c24e45abd + 512ea0493bac7210b61f3c8c24e45abd + sys_hub_action_type_definition + var__m_sys_hub_action_output_512ea0493bac7210b61f3c8c24e45abd + + 5 + false + false + + + + false + + + + + + false + false + sys_hub_action_output + admin + 2025-10-10 19:31:47 + 6bfee0893bac7210b61f3c8c24e45a6a + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 19:31:47 + false + false + false + false + false + simple + false + script + + + false + + + + + true + false + false + element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,uiType=integer,uiTypeLabel=Integer,uiUniqueId=2c277d78-0870-440d-b89b-f23beeeab49c + false + + + + + + + + + + + + + false + false + + + + execution_time_ms + + false + + + + false + + + + integer + + false + 40 + 512ea0493bac7210b61f3c8c24e45abd + 512ea0493bac7210b61f3c8c24e45abd + sys_hub_action_type_definition + var__m_sys_hub_action_output_512ea0493bac7210b61f3c8c24e45abd + + 6 + false + false + + + + false + + + + + + false + false + sys_hub_action_output + admin + 2025-10-10 19:31:47 + 6ffee0893bac7210b61f3c8c24e45a6e + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 19:31:47 + 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=c1d3b6a3-a51c-4ede-bd4b-caaeec9842dd + false + + + + + + + + + + + + + false + false + + + + __action_status__ + + false + + + + false + + + + string + + false + 65000 + 512ea0493bac7210b61f3c8c24e45abd + 512ea0493bac7210b61f3c8c24e45abd + sys_hub_action_type_definition + var__m_sys_hub_action_output_512ea0493bac7210b61f3c8c24e45abd + + 1 + false + false + + + + false + + + + + + false + false + sys_hub_action_output + admin + 2025-10-10 19:31:47 + abfee0893bac7210b61f3c8c24e45a3c + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 19:31:47 + 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=116c297d-6040-4807-abe7-affd59b3615a,visible_in_ui=false + false + + + + + + + + true + + + + + false + false + + + + __dont_treat_as_error__ + + false + + + + false + + + + boolean + + false + 40 + 512ea0493bac7210b61f3c8c24e45abd + 512ea0493bac7210b61f3c8c24e45abd + sys_hub_action_type_definition + var__m_sys_hub_action_output_512ea0493bac7210b61f3c8c24e45abd + + 3 + false + false + + + + false + + + + + + false + false + sys_hub_action_output + admin + 2025-10-10 19:31:47 + abfee0893bac7210b61f3c8c24e45a52 + 25 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:13:45 + 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=563ee479-1668-40d2-aa9d-67c96ad41f08 + false + + + + + + + + + + + + + false + false + + + + success + + false + + + + false + + + + boolean + + false + 40 + 512ea0493bac7210b61f3c8c24e45abd + 512ea0493bac7210b61f3c8c24e45abd + sys_hub_action_type_definition + var__m_sys_hub_action_output_512ea0493bac7210b61f3c8c24e45abd + + 2 + false + false + + + + false + + + + + + false + false + sys_hub_action_output + admin + 2025-10-10 19:31:47 + e7fee0893bac7210b61f3c8c24e45a4e + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 19:31:47 + false + false + false + false + false + simple + false + script + + + false + + + + + + + 512ea0493bac7210b61f3c8c24e45abd + admin + 2025-10-10 19:31:47 + ebfee0893bac7210b61f3c8c24e45aa0 + 0 + admin + 2025-10-10 19:31:47 + + + + script_field + + + + en + var__m_sys_hub_action_input_512ea0493bac7210b61f3c8c24e45abd + + sys_documentation + admin + 2025-10-10 19:31:46 + 1bfea0893bac7210b61f3c8c24e45af8 + 1 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 19:45:28 + + + + + temp_table + + + + en + var__m_sys_hub_action_input_512ea0493bac7210b61f3c8c24e45abd + + sys_documentation + admin + 2025-10-10 19:31:46 + 57fea0893bac7210b61f3c8c24e45af4 + 1 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 19:45:28 + + + + + script + + + + en + var__m_sys_hub_action_input_512ea0493bac7210b61f3c8c24e45abd + + sys_documentation + admin + 2025-10-10 19:31:46 + 93fea0893bac7210b61f3c8c24e45af0 + 1 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 19:45:28 + + + + + executed_by + + + + en + var__m_sys_hub_action_input_512ea0493bac7210b61f3c8c24e45abd + + sys_documentation + admin + 2025-10-10 19:59:30 + bd5538c13bec7210b61f3c8c24e45a49 + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 19:59:30 + + + + + execution_time_field + + + + en + var__m_sys_hub_action_input_512ea0493bac7210b61f3c8c24e45abd + + sys_documentation + admin + 2025-10-10 19:59:30 + f55538c13bec7210b61f3c8c24e45a51 + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 19:59:30 + + + + + executed_by_name + + + + en + var__m_sys_hub_action_input_512ea0493bac7210b61f3c8c24e45abd + + sys_documentation + admin + 2025-10-10 19:59:30 + f95538c13bec7210b61f3c8c24e45a4d + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 19:59:30 + + + + + + execution_time_ms + + + + en + var__m_sys_hub_action_output_512ea0493bac7210b61f3c8c24e45abd + + sys_documentation + admin + 2025-10-10 19:31:47 + 23fee0893bac7210b61f3c8c24e45a72 + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 19:31:47 + + + + + result + + + + en + var__m_sys_hub_action_output_512ea0493bac7210b61f3c8c24e45abd + + sys_documentation + admin + 2025-10-10 19:31:47 + 6bfee0893bac7210b61f3c8c24e45a69 + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 19:31:47 + + + + + error + + + + en + var__m_sys_hub_action_output_512ea0493bac7210b61f3c8c24e45abd + + sys_documentation + admin + 2025-10-10 19:31:47 + 6ffee0893bac7210b61f3c8c24e45a6d + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 19:31:47 + + + + + success + + + + en + var__m_sys_hub_action_output_512ea0493bac7210b61f3c8c24e45abd + + sys_documentation + admin + 2025-10-10 19:31:47 + abfee0893bac7210b61f3c8c24e45a51 + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 19:31:47 + + + + + __dont_treat_as_error__ + + + + en + var__m_sys_hub_action_output_512ea0493bac7210b61f3c8c24e45abd + + sys_documentation + admin + 2025-10-10 19:31:47 + affee0893bac7210b61f3c8c24e45a58 + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 19:31:47 + + + + + __action_status__ + + + + en + var__m_sys_hub_action_output_512ea0493bac7210b61f3c8c24e45abd + + sys_documentation + admin + 2025-10-10 19:31:47 + e7fee0893bac7210b61f3c8c24e45a4d + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 19:31:47 + + + + + + + 512ea0493bac7210b61f3c8c24e45abd + {"type":"PlanProxy","persistor":{"@class":".ChunkingPlanPersistor","table":"sys_hub_action_plan","id":"8038f4c53bec7210b61f3c8c24e45ae5","name":"plan","plan_signature":null}} + 3728f4c53bec7210b61f3c8c24e45a8b + admin + 2025-10-10 20:11:57 + global + / + 8038f4c53bec7210b61f3c8c24e45ae5 + 0 + + + admin + 2025-10-10 20:11:57 + + + public + + + + + {labelCacheCleanUpExecuted=true} + 27000 + false + + + + # Run Script - Secure Dynamic Execution + +A secure Flow Designer custom action that enables dynamic server-side script execution within flows with built-in security controls to prevent privilege escalation and destructive operations. + +## Overview + +This Flow Action allows builders and developers to execute ad-hoc server-side JavaScript code directly in Flow Designer without creating dedicated Script Actions or Script Includes. It's designed for rapid prototyping, conditional logic, and development workflows while maintaining security boundaries. + + execute_script_action + [{"name":"{{action.script}}","label":"action➛Script","type":"action","ref":"","reference_display":"","base_type":"string","parent_table_name":"","column_name":"","choices":null,"attributes":{"sourceId":"","uiTypeLabel":"String","element_mapping_provider":"com.glide.flow_design.action.data.FlowDesignVariableMapper","sourceUiUniqueId":"","sourceType":"","uiType":"string","uiUniqueId":"75c20b6f-d0db-4f1b-97f3-590c5f6197e1"}},{"name":"{{action.temp_table}}","label":"action➛Temp table","type":"action","ref":"","reference_display":"","base_type":"string","parent_table_name":"","column_name":"","choices":null,"attributes":{"sourceId":"","uiTypeLabel":"String","element_mapping_provider":"com.glide.flow_design.action.data.FlowDesignVariableMapper","sourceUiUniqueId":"","sourceType":"","uiType":"string","uiUniqueId":"ce44ed42-643a-461e-8291-d3b587fa83d3"}},{"name":"{{action.script_field}}","label":"action➛Script field","type":"action","ref":"","reference_display":"","base_type":"string","parent_table_name":"","column_name":"","choices":null,"attributes":{"sourceId":"","uiTypeLabel":"String","element_mapping_provider":"com.glide.flow_design.action.data.FlowDesignVariableMapper","sourceUiUniqueId":"","sourceType":"","uiType":"string","uiUniqueId":"877d7eba-a992-4efc-89b8-b24ab40abd0e"}},{"name":"{{action.executed_by}}","label":"action➛Executed by","type":"action","ref":"","reference_display":"","base_type":"string","parent_table_name":"","column_name":"","choices":null,"attributes":{"uiTypeLabel":"String","element_mapping_provider":"com.glide.flow_design.action.data.FlowDesignVariableMapper","uiType":"string","uiUniqueId":"9571fe19-c921-46e1-9d7b-0586a4ae1897"}},{"name":"{{action.variable}}","label":"action➛variable","type":"action","ref":"","reference_display":"","base_type":"string","parent_table_name":"","column_name":"","choices":null,"attributes":{}},{"name":"{{action.executed_by_name}}","label":"action➛Executed by name","type":"action","ref":"","reference_display":"","base_type":"string","parent_table_name":"","column_name":"","choices":null,"attributes":{"uiTypeLabel":"String","element_mapping_provider":"com.glide.flow_design.action.data.FlowDesignVariableMapper","uiType":"string","uiUniqueId":"567c3a55-1859-4a5e-9505-6eb8c69bfc4c"}},{"name":"{{action.exceuted}}","label":"action➛Exceuted","type":"action","ref":"","reference_display":"","base_type":"string","parent_table_name":"","column_name":"","choices":null,"attributes":{}},{"name":"{{action.excecuted}}","label":"action➛Excecuted","type":"action","ref":"","reference_display":"","base_type":"string","parent_table_name":"","column_name":"","choices":null,"attributes":{}},{"name":"{{action.execution_times}}","label":"action➛Execution times","type":"action","ref":"","reference_display":"","base_type":"string","parent_table_name":"","column_name":"","choices":null,"attributes":{}},{"name":"{{action.execution_time_fiels}}","label":"action➛Execution time fiels","type":"action","ref":"","reference_display":"","base_type":"string","parent_table_name":"","column_name":"","choices":null,"attributes":{}},{"name":"{{action.execution_time_field}}","label":"action➛Execution time field","type":"action","ref":"","reference_display":"","base_type":"string","parent_table_name":"","column_name":"","choices":null,"attributes":{"uiTypeLabel":"String","element_mapping_provider":"com.glide.flow_design.action.data.FlowDesignVariableMapper","uiType":"string","uiUniqueId":"e6174c82-b505-44ef-977c-79dce04539b0"}},{"name":"{{step[77201c1d-f571-4611-a709-fc911d854dff].success}}","label":"step➛Script step➛success","type":"step","ref":"","reference_display":"","base_type":"boolean","parent_table_name":"","column_name":"","choices":null,"attributes":{"sourceId":"","sourceUiUniqueId":"","sourceType":""}},{"name":"{{step[77201c1d-f571-4611-a709-fc911d854dff].error}}","label":"step➛Script step➛error","type":"step","ref":"","reference_display":"","base_type":"string","parent_table_name":"","column_name":"","choices":null,"attributes":{"sourceId":"","sourceUiUniqueId":"","sourceType":""}},{"name":"{{step[77201c1d-f571-4611-a709-fc911d854dff].result}}","label":"step➛Script step➛result","type":"step","ref":"","reference_display":"","base_type":"string","parent_table_name":"","column_name":"","choices":null,"attributes":{"sourceId":"","sourceUiUniqueId":"","sourceType":""}},{"name":"{{step[77201c1d-f571-4611-a709-fc911d854dff].execution_time_ms}}","label":"step➛Script step➛execution_time_ms","type":"step","ref":"","reference_display":"","base_type":"integer","parent_table_name":"","column_name":"","choices":null,"attributes":{"sourceId":"","sourceUiUniqueId":"","sourceType":""}}] + true + Execute Script Action + + + + 512ea0493bac7210b61f3c8c24e45abd + sys_hub_action_type_snapshot + admin + 2025-10-10 20:11:54 + global + / + 1728b4c53bec7210b61f3c8c24e45a8f + 0 + + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:54 + false + + + + + + sys_hub_action_type_snapshot + 1728b4c53bec7210b61f3c8c24e45a8f + 2 + sys_variable_value + admin + 2025-10-10 20:11:56 + 3f28f4c53bec7210b61f3c8c24e45a88 + 0 + admin + 2025-10-10 20:11:56 + 0 + 6f28f4c53bec7210b61f3c8c24e45a60 + + + sys_hub_action_type_snapshot + 1728b4c53bec7210b61f3c8c24e45a8f + 3 + sys_variable_value + admin + 2025-10-10 20:11:56 + 7b28f4c53bec7210b61f3c8c24e45a88 + 0 + admin + 2025-10-10 20:11:56 + 0 + 6b28f4c53bec7210b61f3c8c24e45a64 + + + sys_hub_action_type_snapshot + 1728b4c53bec7210b61f3c8c24e45a8f + 6 + sys_variable_value + admin + 2025-10-10 20:11:56 + b728f4c53bec7210b61f3c8c24e45a88 + 0 + admin + 2025-10-10 20:11:56 + + 3f28f4c53bec7210b61f3c8c24e45a71 + + + sys_hub_action_type_snapshot + 1728b4c53bec7210b61f3c8c24e45a8f + 1 + sys_variable_value + admin + 2025-10-10 20:11:56 + ff28f4c53bec7210b61f3c8c24e45a88 + 0 + admin + 2025-10-10 20:11:56 + {"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":""}}}} + 6b28f4c53bec7210b61f3c8c24e45a43 + + + + error + 1728b4c53bec7210b61f3c8c24e45a8f + admin + 2025-10-10 20:11:56 + 7328f4c53bec7210b61f3c8c24e45a88 + 0 + admin + 2025-10-10 20:11:56 + var__m_sys_hub_action_output_1728b4c53bec7210b61f3c8c24e45a8f
+ {{step[77201c1d-f571-4611-a709-fc911d854dff].result}} +
+ + execution_time_ms + 1728b4c53bec7210b61f3c8c24e45a8f + admin + 2025-10-10 20:11:56 + 3b28f4c53bec7210b61f3c8c24e45a87 + 0 + admin + 2025-10-10 20:11:56 + var__m_sys_hub_action_output_1728b4c53bec7210b61f3c8c24e45a8f
+ {{step[77201c1d-f571-4611-a709-fc911d854dff].execution_time_ms}} +
+ + result + 1728b4c53bec7210b61f3c8c24e45a8f + admin + 2025-10-10 20:11:56 + 7728f4c53bec7210b61f3c8c24e45a87 + 0 + admin + 2025-10-10 20:11:56 + var__m_sys_hub_action_output_1728b4c53bec7210b61f3c8c24e45a8f
+ {{step[77201c1d-f571-4611-a709-fc911d854dff].error}} +
+ + success + 1728b4c53bec7210b61f3c8c24e45a8f + admin + 2025-10-10 20:11:56 + bf28f4c53bec7210b61f3c8c24e45a87 + 0 + admin + 2025-10-10 20:11:56 + var__m_sys_hub_action_output_1728b4c53bec7210b61f3c8c24e45a8f
+ {{step[77201c1d-f571-4611-a709-fc911d854dff].success}} +
+ + __action_status__ + 1728b4c53bec7210b61f3c8c24e45a8f + admin + 2025-10-10 20:11:56 + 3728f4c53bec7210b61f3c8c24e45a88 + 0 + admin + 2025-10-10 20:11:56 + var__m_sys_hub_action_output_1728b4c53bec7210b61f3c8c24e45a8f
+ +
+ + __dont_treat_as_error__ + 1728b4c53bec7210b61f3c8c24e45a8f + admin + 2025-10-10 20:11:56 + fb28f4c53bec7210b61f3c8c24e45a87 + 0 + admin + 2025-10-10 20:11:56 + var__m_sys_hub_action_output_1728b4c53bec7210b61f3c8c24e45a8f
+ +
+ + + 1728b4c53bec7210b61f3c8c24e45a8f + 77201c1d-f571-4611-a709-fc911d854dff + 1 + + + + + + + 1 + +
+ 106afb6647032200b4fad7527c9a71e7 + admin + 2025-10-10 20:11:55 + ef28b4c53bec7210b61f3c8c24e45ad2 + 1 + b812ceb69337a210633378917cba10bc + admin + 2025-10-10 20:11:55 + + + + sys_hub_step_instance + ef28b4c53bec7210b61f3c8c24e45ad2 + 600 + sys_variable_value + admin + 2025-10-10 20:11:56 + ab28f4c53bec7210b61f3c8c24e45a3e + 0 + admin + 2025-10-10 20:11:56 + (function execute(inputs, outputs) { + // Security Configuration: Restricted Tables (High-Privilege Access) + var RESTRICTED_TABLES = [ + 'sys_user', + 'sys_user_group', + 'sys_user_role', + 'sys_user_has_role', + 'sys_user_grmember', + 'sys_security_acl', + 'sys_security_acl_role', + 'sys_db_object', + 'sys_dictionary', + 'sys_script', + 'sys_script_include', + 'sys_ui_script', + 'sys_ui_action', + 'sys_business_rule', + 'sys_properties', + 'sys_scope', + 'sys_app', + 'sys_package', + 'oauth_entity', + 'oauth_credential', + 'sys_auth_profile_application' + ]; + + // Security Configuration: Blocked Operations + var BLOCKED_OPERATIONS = [ + 'deleteRecord', + 'deleteMultiple', + 'setWorkflow', + 'setAbortAction', + 'autoSysFields', + 'setNewGuidValue' + ]; + + // Security Configuration: Whitelisted Classes (Safe to instantiate) + // Note: Some classes are excluded for scoped app compatibility + var WHITELISTED_CLASSES = [ + 'GlideRecord', + 'GlideDateTime', + 'GlideDate', + 'GlideTime', + 'GlideDuration', + 'GlideAggregate', + 'GlideElement', + 'GlideFilter', + 'GlideSchedule', + 'GlideStringUtil' + // GlideEncrypter - Not allowed in scoped apps + // GlideChecksum - May not be allowed in scoped apps + // GlideDigest - May not be allowed in scoped apps + ]; + + // Security Configuration: Blocked Script Include Patterns + var BLOCKED_SCRIPT_INCLUDE_PATTERNS = [ + 'gs.include(', // Block gs.include() calls + 'GlideScriptInclude' // Block Script Include API + ]; + + // Security Configuration: High-Privilege Role/User sys_ids to block + // These are well-known sys_ids that attackers might hardcode + var BLOCKED_SYSIDS = [ + '2831a114c611228501d4ea6c309d626d', // admin role + '6816f79cc0a8016401c5a33be04be441', // admin user + '5d7e6b13c611227a0146101de1d70f5b', // security_admin role + '0c441abbc6112275000025157c2f22de' // maint role (maintenance) + ]; + + // Initialize output variables + outputs.success = false; + outputs.result = ''; + outputs.error = ''; + outputs.execution_time_ms = 0; + + try { + // Validate required inputs + if (!inputs.script_input || inputs.script_input.trim() === '') { + throw new Error('Script input is required and cannot be empty'); + } + + if (!inputs.temp_table || inputs.temp_table.trim() === '') { + throw new Error('Temp table name is required (e.g., x_snc_actionpack_script_temp)'); + } + + if (!inputs.script_field || inputs.script_field.trim() === '') { + throw new Error('Script field name is required (e.g., script)'); + } + + var tempTableName = inputs.temp_table.trim(); + var scriptFieldName = inputs.script_field.trim(); + + // Optional audit field names (only use if provided) + var executedByField = inputs.executed_by_field ? inputs.executed_by_field.trim() : null; + var executedByNameField = inputs.executed_by_name_field ? inputs.executed_by_name_field.trim() : null; + var executionTimeField = inputs.execution_time_field ? inputs.execution_time_field.trim() : null; + + // Validate that the table exists and is accessible + var testTable = new GlideRecord(tempTableName); + if (!testTable.isValid()) { + throw new Error('Table "' + tempTableName + '" does not exist or is not accessible. Please create it in your scoped app.'); + } + + // Validate that the script field exists + if (!testTable.isValidField(scriptFieldName)) { + throw new Error('Field "' + scriptFieldName + '" does not exist on table "' + tempTableName + '". Please add a Script-type field with this name.'); + } + + var scriptToExecute = inputs.script_input.trim(); + var startTime = new GlideDateTime(); + + // Security Check 1: Scan for restricted table access + var scriptLower = scriptToExecute.toLowerCase(); + for (var i = 0; i < RESTRICTED_TABLES.length; i++) { + var tableName = RESTRICTED_TABLES[i]; + // Check for GlideRecord instantiation or table references + if (scriptLower.indexOf("'" + tableName + "'") !== -1 || + scriptLower.indexOf('"' + tableName + '"') !== -1 || + scriptLower.indexOf('`' + tableName + '`') !== -1) { + throw new Error('SECURITY VIOLATION: Access to restricted table "' + tableName + '" is not allowed'); + } + } + + // Security Check 1b: Block hardcoded high-privilege sys_ids + // Prevents attackers from bypassing table checks by using direct sys_ids + for (var s = 0; s < BLOCKED_SYSIDS.length; s++) { + var sysId = BLOCKED_SYSIDS[s]; + if (scriptToExecute.indexOf(sysId) !== -1) { + throw new Error('SECURITY VIOLATION: Reference to high-privilege sys_id is not allowed - prevents hardcoded admin/security role manipulation'); + } + } + + // Security Check 2: Block delete operations + if (scriptLower.indexOf('deleterecord') !== -1 || + scriptLower.indexOf('deletemultiple') !== -1) { + throw new Error('SECURITY VIOLATION: Delete operations are not allowed'); + } + + // Security Check 3: Block dangerous GlideRecord methods + for (var j = 0; j < BLOCKED_OPERATIONS.length; j++) { + var operation = BLOCKED_OPERATIONS[j].toLowerCase(); + if (scriptLower.indexOf(operation) !== -1) { + throw new Error('SECURITY VIOLATION: Operation "' + BLOCKED_OPERATIONS[j] + '" is not allowed'); + } + } + + // Security Check 4: Block eval and Function constructor + // Note: We allow regular function declarations/IIFEs, but block Function constructor + if (scriptLower.indexOf('eval(') !== -1 || + scriptLower.indexOf('new function') !== -1) { + throw new Error('SECURITY VIOLATION: Dynamic code evaluation (eval, Function constructor) is not allowed'); + } + + // Security Check 5: Block system-level operations and indirect code execution + var dangerousPatterns = [ + 'eval(', + 'new Function(', // Block Function constructor, but allow regular function declarations + 'gs.executeNow(', + 'gs.eventQueue(', + 'gs.setProperty(', // Prevents system property manipulation + 'Packages.java', + 'java.lang', + 'GlideScopedEvaluator', + 'GlideEvaluator', + 'SncTriggerSynchronizer', // Prevents triggering scheduled jobs + 'GlideScheduler', // Prevents scheduling jobs + 'GlideScriptedProcessor', // Prevents processor execution + 'GlideScriptedHierarchicalWorker', // Prevents worker execution + 'sysauto', // Prevents scheduled job manipulation + 'sys_trigger', // Prevents trigger manipulation + 'GlideController', // Prevents UI action execution + 'GlideServlet', // Prevents servlet access + 'GlideSession.get(', // Prevents session hijacking + 'gs.getSession().impersonate', // Prevents impersonation + 'gs.getSession().setUser' // Prevents session user manipulation + ]; + + for (var k = 0; k < dangerousPatterns.length; k++) { + if (scriptLower.indexOf(dangerousPatterns[k].toLowerCase()) !== -1) { + throw new Error('SECURITY VIOLATION: System-level operation "' + dangerousPatterns[k] + '" is not allowed'); + } + } + + // Security Check 6: Block Script Include instantiation (indirect privilege escalation) + // This prevents users from calling custom Script Includes that may have elevated privileges + + // First, block gs.include() and GlideScriptInclude + for (var m = 0; m < BLOCKED_SCRIPT_INCLUDE_PATTERNS.length; m++) { + var pattern = BLOCKED_SCRIPT_INCLUDE_PATTERNS[m].toLowerCase(); + if (scriptLower.indexOf(pattern) !== -1) { + throw new Error('SECURITY VIOLATION: Script Include loading ("' + BLOCKED_SCRIPT_INCLUDE_PATTERNS[m] + '") is not allowed - prevents indirect privilege escalation'); + } + } + + // Second, check for 'new' keyword usage and validate against whitelist + var newKeywordRegex = /new\s+([A-Za-z_][A-Za-z0-9_]*)/gi; + var matches = scriptToExecute.match(newKeywordRegex); + + if (matches) { + for (var n = 0; n < matches.length; n++) { + var match = matches[n]; + // Extract class name after 'new' + var className = match.replace(/new\s+/i, '').trim(); + + // Check if class is in whitelist + var isWhitelisted = false; + for (var w = 0; w < WHITELISTED_CLASSES.length; w++) { + if (className.toLowerCase() === WHITELISTED_CLASSES[w].toLowerCase()) { + isWhitelisted = true; + break; + } + } + + if (!isWhitelisted) { + throw new Error('SECURITY VIOLATION: Instantiation of non-whitelisted class "' + className + '" is not allowed. Only ServiceNow API classes (GlideRecord, GlideDateTime, etc.) are permitted - prevents indirect privilege escalation via Script Includes'); + } + } + } + + // Execute script with controlled scope + // Note: GlideSandbox is not available in Flow Designer scope, so we use + // GlideScopedEvaluator for scoped app compatibility + var executionResult; + + try { + // Create isolated execution context + // We pass only whitelisted variables to limit scope access + + try { + // Use GlideScopedEvaluator for scoped app compatibility + // IMPORTANT: GlideScopedEvaluator runs in system context for security isolation + // This is mitigated by the 8 layers of security checks above + + // Check if script is already wrapped in a function + var scriptTrimmed = scriptToExecute.trim(); + var isAlreadyWrapped = scriptTrimmed.match(/^\(?function\s*\(/i) || + scriptTrimmed.match(/^\(\s*function\s*\(/i); + + // Wrap script in IIFE to support return statements (if not already wrapped) + var wrappedScript = isAlreadyWrapped ? scriptToExecute : '(function() { ' + scriptToExecute + ' })()'; + + // Create a temporary record in the specified table to hold the script + var tempScript = new GlideRecord(tempTableName); + tempScript.initialize(); + tempScript.setValue(scriptFieldName, wrappedScript); + + // Add audit information if field names were provided and fields exist + if (executedByField && tempScript.isValidField(executedByField)) { + tempScript.setValue(executedByField, gs.getUserID()); + } + if (executedByNameField && tempScript.isValidField(executedByNameField)) { + tempScript.setValue(executedByNameField, gs.getUserName()); + } + if (executionTimeField && tempScript.isValidField(executionTimeField)) { + tempScript.setValue(executionTimeField, new GlideDateTime()); + } + + // Insert the record - GlideScopedEvaluator needs a persisted record + var tempSysId = tempScript.insert(); + + // Re-query to get the actual record + tempScript = new GlideRecord(tempTableName); + tempScript.get(tempSysId); + + // Create evaluator + var evaluator = new GlideScopedEvaluator(); + + // Put variables into the evaluator context + // Note: We don't pass GlideRecord and other classes as they're globally available + // Passing them as variables can cause scope issues with methods like setLimit() + var variables = { + inputs: inputs, + outputs: outputs, + gs: gs + }; + + // Execute the script from the temporary record + // evaluateScript(GlideRecord, scriptField, variables) + executionResult = evaluator.evaluateScript(tempScript, scriptFieldName, variables); + + // Clean up: Delete the temporary record + if (tempSysId) { + tempScript.deleteRecord(); + } + + } finally { + // Cleanup handled above + } + + } catch (executionError) { + throw new Error('Script execution failed: ' + executionError.message); + } + + // Calculate execution time + var endTime = new GlideDateTime(); + var duration = GlideDateTime.subtract(startTime, endTime); + outputs.execution_time_ms = duration.getNumericValue(); + + // Compile results + var resultOutput = ''; + + if (executionResult !== undefined && executionResult !== null) { + resultOutput = 'Return Value: ' + String(executionResult); + } + + outputs.success = true; + outputs.result = resultOutput || 'Script executed successfully with no return value. End your script with the expression you want to return.'; + + // Log successful execution for audit + gs.info('Flow Action - Run Script: Executed successfully by ' + gs.getUserName() + + ' | Duration: ' + outputs.execution_time_ms + 'ms'); + + } catch (error) { + outputs.success = false; + outputs.error = 'Error: ' + error.message; + outputs.result = ''; + + // Log security violations and errors for audit + if (error.message.indexOf('SECURITY VIOLATION') !== -1) { + gs.error('Flow Action - Run Script: SECURITY VIOLATION by ' + gs.getUserName() + + ' | Error: ' + error.message); + } else { + gs.warn('Flow Action - Run Script: Execution failed for ' + gs.getUserName() + + ' | Error: ' + error.message); + } + } + +})(inputs, outputs); + 71aa7f6647032200b4fad7527c9a719b + + + sys_hub_step_instance + ef28b4c53bec7210b61f3c8c24e45ad2 + 400 + sys_variable_value + admin + 2025-10-10 20:11:56 + e728f4c53bec7210b61f3c8c24e45a3e + 0 + admin + 2025-10-10 20:11:56 + 35aa573fd7802200bdbaee5b5e610375 + f5e56d79b3101300176b051a16a8dce4 + + + + application + ef28b4c53bec7210b61f3c8c24e45ad2 + admin + 2025-10-10 20:11:55 + a328f4c53bec7210b61f3c8c24e45a3e + 0 + admin + 2025-10-10 20:11:55 + var__m_sys_flow_step_definition_input_106afb6647032200b4fad7527c9a71e7
+ +
+ + executed_by_field + ef28b4c53bec7210b61f3c8c24e45ad2 + admin + 2025-10-10 20:11:56 + 6b28f4c53bec7210b61f3c8c24e45a3f + 0 + admin + 2025-10-10 20:11:56 + var__m_sys_hub_step_ext_input_ef28b4c53bec7210b61f3c8c24e45ad2
+ {{action.executed_by}} +
+ + executed_by_name_field + ef28b4c53bec7210b61f3c8c24e45ad2 + admin + 2025-10-10 20:11:56 + 2f28f4c53bec7210b61f3c8c24e45a3f + 0 + admin + 2025-10-10 20:11:56 + var__m_sys_hub_step_ext_input_ef28b4c53bec7210b61f3c8c24e45ad2
+ {{action.executed_by_name}} +
+ + execution_time_field + ef28b4c53bec7210b61f3c8c24e45ad2 + admin + 2025-10-10 20:11:56 + ef28f4c53bec7210b61f3c8c24e45a3f + 0 + admin + 2025-10-10 20:11:56 + var__m_sys_hub_step_ext_input_ef28b4c53bec7210b61f3c8c24e45ad2
+ {{action.execution_time_field}} +
+ + script + ef28b4c53bec7210b61f3c8c24e45ad2 + admin + 2025-10-10 20:11:55 + 6728f4c53bec7210b61f3c8c24e45a3e + 0 + admin + 2025-10-10 20:11:55 + var__m_sys_flow_step_definition_input_106afb6647032200b4fad7527c9a71e7
+ +
+ + script_field + ef28b4c53bec7210b61f3c8c24e45ad2 + admin + 2025-10-10 20:11:56 + e328f4c53bec7210b61f3c8c24e45a3f + 0 + admin + 2025-10-10 20:11:56 + var__m_sys_hub_step_ext_input_ef28b4c53bec7210b61f3c8c24e45ad2
+ {{action.script_field}} +
+ + script_input + ef28b4c53bec7210b61f3c8c24e45ad2 + admin + 2025-10-10 20:11:56 + a728f4c53bec7210b61f3c8c24e45a3f + 0 + admin + 2025-10-10 20:11:56 + var__m_sys_hub_step_ext_input_ef28b4c53bec7210b61f3c8c24e45ad2
+ {{action.script}} +
+ + temp_table + ef28b4c53bec7210b61f3c8c24e45ad2 + admin + 2025-10-10 20:11:56 + a328f4c53bec7210b61f3c8c24e45a40 + 0 + admin + 2025-10-10 20:11:56 + var__m_sys_hub_step_ext_input_ef28b4c53bec7210b61f3c8c24e45ad2
+ {{action.temp_table}} +
+ + + + + + true + false + false + element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,uiType=string,uiTypeLabel=String + false + + + + + + + + + + + + + false + false + + + + script_input + false + + + + false + + + string + + true + 8000 + ef28b4c53bec7210b61f3c8c24e45ad2 + ef28b4c53bec7210b61f3c8c24e45ad2 + sys_hub_step_instance + var__m_sys_hub_step_ext_input_ef28b4c53bec7210b61f3c8c24e45ad2 + + 100 + false + false + + + + false + + + + + + false + false + sys_hub_step_ext_input + admin + 2025-10-10 20:11:55 + 2328b4c53bec7210b61f3c8c24e45ae7 + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:55 + 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 + false + + + + + + + + + + + + + false + false + + + + script_field + false + + + + false + + + string + + true + 8000 + ef28b4c53bec7210b61f3c8c24e45ad2 + ef28b4c53bec7210b61f3c8c24e45ad2 + sys_hub_step_instance + var__m_sys_hub_step_ext_input_ef28b4c53bec7210b61f3c8c24e45ad2 + + 200 + false + false + + + + false + + + + + + false + false + sys_hub_step_ext_input + admin + 2025-10-10 20:11:55 + 6328b4c53bec7210b61f3c8c24e45aea + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:55 + 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 + false + + + + + + + + + + + + + false + false + + + + executed_by_name_field + false + + + + false + + + string + + true + 8000 + ef28b4c53bec7210b61f3c8c24e45ad2 + ef28b4c53bec7210b61f3c8c24e45ad2 + sys_hub_step_instance + var__m_sys_hub_step_ext_input_ef28b4c53bec7210b61f3c8c24e45ad2 + + 400 + false + false + + + + false + + + + + + false + false + sys_hub_step_ext_input + admin + 2025-10-10 20:11:55 + 6328f4c53bec7210b61f3c8c24e45a09 + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:55 + 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 + false + + + + + + + + + + + + + false + false + + + + executed_by_field + false + + + + false + + + string + + true + 8000 + ef28b4c53bec7210b61f3c8c24e45ad2 + ef28b4c53bec7210b61f3c8c24e45ad2 + sys_hub_step_instance + var__m_sys_hub_step_ext_input_ef28b4c53bec7210b61f3c8c24e45ad2 + + 300 + false + false + + + + false + + + + + + false + false + sys_hub_step_ext_input + admin + 2025-10-10 20:11:55 + a328b4c53bec7210b61f3c8c24e45aed + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:55 + 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 + false + + + + + + + + + + + + + false + false + + + + execution_time_field + false + + + + false + + + string + + true + 8000 + ef28b4c53bec7210b61f3c8c24e45ad2 + ef28b4c53bec7210b61f3c8c24e45ad2 + sys_hub_step_instance + var__m_sys_hub_step_ext_input_ef28b4c53bec7210b61f3c8c24e45ad2 + + 500 + false + false + + + + false + + + + + + false + false + sys_hub_step_ext_input + admin + 2025-10-10 20:11:55 + a328f4c53bec7210b61f3c8c24e45a0c + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:55 + 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 + false + + + + + + + + + + + + + false + false + + + + temp_table + false + + + + false + + + string + + true + 8000 + ef28b4c53bec7210b61f3c8c24e45ad2 + ef28b4c53bec7210b61f3c8c24e45ad2 + sys_hub_step_instance + var__m_sys_hub_step_ext_input_ef28b4c53bec7210b61f3c8c24e45ad2 + + 0 + false + false + + + + false + + + + + + false + false + sys_hub_step_ext_input + admin + 2025-10-10 20:11:55 + e328b4c53bec7210b61f3c8c24e45ae3 + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:55 + 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=0234b644-f6b2-47e3-a607-f9dad0c9b1b9 + false + + + + + + + + + + + + + false + false + + + + error + false + + + + false + + + string + + false + 8000 + ef28b4c53bec7210b61f3c8c24e45ad2 + ef28b4c53bec7210b61f3c8c24e45ad2 + sys_hub_step_instance + var__m_sys_hub_step_ext_output_ef28b4c53bec7210b61f3c8c24e45ad2 + + 2 + false + false + + + + false + + + + + + false + false + sys_hub_step_ext_output + admin + 2025-10-10 20:11:55 + 2728f4c53bec7210b61f3c8c24e45a13 + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:55 + 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=f3f1624f-ad97-43ce-b2d6-af8e4001cac1 + false + + + + + + + + + + + + + false + false + + + + result + false + + + + false + + + string + + false + 8000 + ef28b4c53bec7210b61f3c8c24e45ad2 + ef28b4c53bec7210b61f3c8c24e45ad2 + sys_hub_step_instance + var__m_sys_hub_step_ext_output_ef28b4c53bec7210b61f3c8c24e45ad2 + + 3 + false + false + + + + false + + + + + + false + false + sys_hub_step_ext_output + admin + 2025-10-10 20:11:55 + 6f28f4c53bec7210b61f3c8c24e45a22 + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:55 + 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=7c5e0b93-987b-44b6-8d7f-59c97ec0f7b5 + false + + + + + + + + + + + + + false + false + + + + success + false + + + + false + + + boolean + + false + 40 + ef28b4c53bec7210b61f3c8c24e45ad2 + ef28b4c53bec7210b61f3c8c24e45ad2 + sys_hub_step_instance + var__m_sys_hub_step_ext_output_ef28b4c53bec7210b61f3c8c24e45ad2 + + 1 + false + false + + + + false + + + + + + false + false + sys_hub_step_ext_output + admin + 2025-10-10 20:11:55 + ab28f4c53bec7210b61f3c8c24e45a0f + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:55 + false + false + false + false + false + simple + false + script + + + false + + + true + false + false + element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,uiType=integer,uiTypeLabel=Integer,uiUniqueId=35f087e7-dda4-4515-a3d9-6e1645f8587b + false + + + + + + + + + + + + + false + false + + + + execution_time_ms + false + + + + false + + + integer + + false + 40 + ef28b4c53bec7210b61f3c8c24e45ad2 + ef28b4c53bec7210b61f3c8c24e45ad2 + sys_hub_step_instance + var__m_sys_hub_step_ext_output_ef28b4c53bec7210b61f3c8c24e45ad2 + + 4 + false + false + + + + false + + + + + + false + false + sys_hub_step_ext_output + admin + 2025-10-10 20:11:55 + ef28f4c53bec7210b61f3c8c24e45a25 + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:55 + false + false + false + false + false + simple + false + script + + + false + + + + error + + + + en + var__m_sys_hub_step_ext_output_ef28b4c53bec7210b61f3c8c24e45ad2 + + sys_documentation + admin + 2025-10-10 20:11:55 + 2328f4c53bec7210b61f3c8c24e45a22 + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:55 + + + + + execution_time_ms + + + + en + var__m_sys_hub_step_ext_output_ef28b4c53bec7210b61f3c8c24e45ad2 + + sys_documentation + admin + 2025-10-10 20:11:55 + 2728f4c53bec7210b61f3c8c24e45a28 + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:55 + + + + + result + + + + en + var__m_sys_hub_step_ext_output_ef28b4c53bec7210b61f3c8c24e45ad2 + + sys_documentation + admin + 2025-10-10 20:11:55 + a328f4c53bec7210b61f3c8c24e45a25 + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:55 + + + + + success + + + + en + var__m_sys_hub_step_ext_output_ef28b4c53bec7210b61f3c8c24e45ad2 + + sys_documentation + admin + 2025-10-10 20:11:55 + e728f4c53bec7210b61f3c8c24e45a12 + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:55 + + + + + + true + false + false + element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,uiType=string,uiTypeLabel=String,uiUniqueId=9571fe19-c921-46e1-9d7b-0586a4ae1897 + false + + + + + + + + + + + + + false + false + + + + executed_by + false + + + + false + + + string + + false + 8000 + 1728b4c53bec7210b61f3c8c24e45a8f + 1728b4c53bec7210b61f3c8c24e45a8f + sys_hub_action_type_snapshot + var__m_sys_hub_action_input_1728b4c53bec7210b61f3c8c24e45a8f + + 4 + false + false + + + + false + + + + + + false + false + sys_hub_action_input + admin + 2025-10-10 20:11:55 + 1328b4c53bec7210b61f3c8c24e45ab7 + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:55 + 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=877d7eba-a992-4efc-89b8-b24ab40abd0e + false + + + + + + + + + + + + + false + false + + + + script_field + false + + + + false + + + string + + true + 8000 + 1728b4c53bec7210b61f3c8c24e45a8f + 1728b4c53bec7210b61f3c8c24e45a8f + sys_hub_action_type_snapshot + var__m_sys_hub_action_input_1728b4c53bec7210b61f3c8c24e45a8f + + 3 + false + false + + + + false + + + + + + false + false + sys_hub_action_input + admin + 2025-10-10 20:11:55 + 1728b4c53bec7210b61f3c8c24e45ab3 + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:55 + 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=567c3a55-1859-4a5e-9505-6eb8c69bfc4c + false + + + + + + + + + + + + + false + false + + + + executed_by_name + false + + + + false + + + string + + false + 8000 + 1728b4c53bec7210b61f3c8c24e45a8f + 1728b4c53bec7210b61f3c8c24e45a8f + sys_hub_action_type_snapshot + var__m_sys_hub_action_input_1728b4c53bec7210b61f3c8c24e45a8f + + 5 + false + false + + + + false + + + + + + false + false + sys_hub_action_input + admin + 2025-10-10 20:11:55 + 2f28b4c53bec7210b61f3c8c24e45aba + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:55 + 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=75c20b6f-d0db-4f1b-97f3-590c5f6197e1 + false + + + + + + + + + + + + + false + false + + + + script + false + + + + false + + + string + + true + 8000 + 1728b4c53bec7210b61f3c8c24e45a8f + 1728b4c53bec7210b61f3c8c24e45a8f + sys_hub_action_type_snapshot + var__m_sys_hub_action_input_1728b4c53bec7210b61f3c8c24e45a8f + + 1 + false + false + + + + false + + + + + + false + false + sys_hub_action_input + admin + 2025-10-10 20:11:54 + 9328b4c53bec7210b61f3c8c24e45a92 + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:54 + 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=ce44ed42-643a-461e-8291-d3b587fa83d3 + false + + + + + + + + + + + + + false + false + + + + temp_table + false + + + + false + + + string + + true + 8000 + 1728b4c53bec7210b61f3c8c24e45a8f + 1728b4c53bec7210b61f3c8c24e45a8f + sys_hub_action_type_snapshot + var__m_sys_hub_action_input_1728b4c53bec7210b61f3c8c24e45a8f + + 2 + false + false + + + + false + + + + + + false + false + sys_hub_action_input + admin + 2025-10-10 20:11:55 + 9b28b4c53bec7210b61f3c8c24e45a96 + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:55 + 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=e6174c82-b505-44ef-977c-79dce04539b0 + false + + + + + + + + + + + + + false + false + + + + execution_time_field + false + + + + false + + + string + + false + 8000 + 1728b4c53bec7210b61f3c8c24e45a8f + 1728b4c53bec7210b61f3c8c24e45a8f + sys_hub_action_type_snapshot + var__m_sys_hub_action_input_1728b4c53bec7210b61f3c8c24e45a8f + + 6 + false + false + + + + false + + + + + + false + false + sys_hub_action_input + admin + 2025-10-10 20:11:55 + ef28b4c53bec7210b61f3c8c24e45aca + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:55 + false + false + false + false + false + simple + false + script + + + false + + + + + true + false + false + element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,uiType=integer,uiTypeLabel=Integer,uiUniqueId=2c277d78-0870-440d-b89b-f23beeeab49c + false + + + + + + + + + + + + + false + false + + + + execution_time_ms + + false + + + + false + + + + integer + + false + 40 + 1728b4c53bec7210b61f3c8c24e45a8f + 1728b4c53bec7210b61f3c8c24e45a8f + sys_hub_action_type_snapshot + var__m_sys_hub_action_output_1728b4c53bec7210b61f3c8c24e45a8f + + 6 + false + false + + + + false + + + + + + false + false + sys_hub_action_output + admin + 2025-10-10 20:11:56 + 3f28f4c53bec7210b61f3c8c24e45a71 + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:56 + 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=c1d3b6a3-a51c-4ede-bd4b-caaeec9842dd + false + + + + + + + + + + + + + false + false + + + + __action_status__ + + false + + + + false + + + + string + + false + 65000 + 1728b4c53bec7210b61f3c8c24e45a8f + 1728b4c53bec7210b61f3c8c24e45a8f + sys_hub_action_type_snapshot + var__m_sys_hub_action_output_1728b4c53bec7210b61f3c8c24e45a8f + + 1 + false + false + + + + false + + + + + + false + false + sys_hub_action_output + admin + 2025-10-10 20:11:56 + 6b28f4c53bec7210b61f3c8c24e45a43 + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:56 + 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=116c297d-6040-4807-abe7-affd59b3615a,visible_in_ui=false + false + + + + + + + + true + + + + + false + false + + + + __dont_treat_as_error__ + + false + + + + false + + + + boolean + + false + 40 + 1728b4c53bec7210b61f3c8c24e45a8f + 1728b4c53bec7210b61f3c8c24e45a8f + sys_hub_action_type_snapshot + var__m_sys_hub_action_output_1728b4c53bec7210b61f3c8c24e45a8f + + 3 + false + false + + + + false + + + + + + false + false + sys_hub_action_output + admin + 2025-10-10 20:11:56 + 6b28f4c53bec7210b61f3c8c24e45a64 + 1 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:56 + 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=563ee479-1668-40d2-aa9d-67c96ad41f08 + false + + + + + + + + + + + + + false + false + + + + success + + false + + + + false + + + + boolean + + false + 40 + 1728b4c53bec7210b61f3c8c24e45a8f + 1728b4c53bec7210b61f3c8c24e45a8f + sys_hub_action_type_snapshot + var__m_sys_hub_action_output_1728b4c53bec7210b61f3c8c24e45a8f + + 2 + false + false + + + + false + + + + + + false + false + sys_hub_action_output + admin + 2025-10-10 20:11:56 + 6f28f4c53bec7210b61f3c8c24e45a60 + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:56 + false + false + false + false + false + simple + false + script + + + false + + + + + true + false + false + element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,pwd2droppable=true,uiType=string,uiTypeLabel=String,uiUniqueId=be3fca04-d561-4623-9a53-984d48549350 + false + + + + + + + + + + + + + false + false + + + + result + + false + + + + false + + + + string + + false + 8000 + 1728b4c53bec7210b61f3c8c24e45a8f + 1728b4c53bec7210b61f3c8c24e45a8f + sys_hub_action_type_snapshot + var__m_sys_hub_action_output_1728b4c53bec7210b61f3c8c24e45a8f + + 4 + false + false + + + + false + + + + + + false + false + sys_hub_action_output + admin + 2025-10-10 20:11:56 + b328f4c53bec7210b61f3c8c24e45a6a + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:56 + false + false + false + false + false + simple + false + script + + + false + + + + + true + false + false + element_mapping_provider=com.glide.flow_design.action.data.FlowDesignVariableMapper,pwd2droppable=true,uiType=string,uiTypeLabel=String,uiUniqueId=bba8524a-5296-4af0-b517-7264797c53a8 + false + + + + + + + + + + + + + false + false + + + + error + + false + + + + false + + + + string + + false + 8000 + 1728b4c53bec7210b61f3c8c24e45a8f + 1728b4c53bec7210b61f3c8c24e45a8f + sys_hub_action_type_snapshot + var__m_sys_hub_action_output_1728b4c53bec7210b61f3c8c24e45a8f + + 5 + false + false + + + + false + + + + + + false + false + sys_hub_action_output + admin + 2025-10-10 20:11:56 + ff28f4c53bec7210b61f3c8c24e45a6d + 0 + + + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:56 + false + false + false + false + false + simple + false + script + + + false + + + + + + + 1728b4c53bec7210b61f3c8c24e45a8f + admin + 2025-10-10 20:11:56 + 7328f4c53bec7210b61f3c8c24e45a8b + 0 + admin + 2025-10-10 20:11:56 + + + + script + + + + en + var__m_sys_hub_action_input_1728b4c53bec7210b61f3c8c24e45a8f + + sys_documentation + admin + 2025-10-10 20:11:55 + 5f28b4c53bec7210b61f3c8c24e45a95 + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:55 + + + + + executed_by_name + + + + en + var__m_sys_hub_action_input_1728b4c53bec7210b61f3c8c24e45a8f + + sys_documentation + admin + 2025-10-10 20:11:55 + a328b4c53bec7210b61f3c8c24e45aca + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:55 + + + + + execution_time_field + + + + en + var__m_sys_hub_action_input_1728b4c53bec7210b61f3c8c24e45a8f + + sys_documentation + admin + 2025-10-10 20:11:55 + af28b4c53bec7210b61f3c8c24e45acd + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:55 + + + + + script_field + + + + en + var__m_sys_hub_action_input_1728b4c53bec7210b61f3c8c24e45a8f + + sys_documentation + admin + 2025-10-10 20:11:55 + d328b4c53bec7210b61f3c8c24e45ab6 + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:55 + + + + + temp_table + + + + en + var__m_sys_hub_action_input_1728b4c53bec7210b61f3c8c24e45a8f + + sys_documentation + admin + 2025-10-10 20:11:55 + d728b4c53bec7210b61f3c8c24e45ab2 + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:55 + + + + + executed_by + + + + en + var__m_sys_hub_action_input_1728b4c53bec7210b61f3c8c24e45a8f + + sys_documentation + admin + 2025-10-10 20:11:55 + ef28b4c53bec7210b61f3c8c24e45ab9 + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:55 + + + + + + __action_status__ + + + + en + var__m_sys_hub_action_output_1728b4c53bec7210b61f3c8c24e45a8f + + sys_documentation + admin + 2025-10-10 20:11:56 + 2328f4c53bec7210b61f3c8c24e45a60 + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:56 + + + + + success + + + + en + var__m_sys_hub_action_output_1728b4c53bec7210b61f3c8c24e45a8f + + sys_documentation + admin + 2025-10-10 20:11:56 + 2f28f4c53bec7210b61f3c8c24e45a63 + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:56 + + + + + __dont_treat_as_error__ + + + + en + var__m_sys_hub_action_output_1728b4c53bec7210b61f3c8c24e45a8f + + sys_documentation + admin + 2025-10-10 20:11:56 + 7728f4c53bec7210b61f3c8c24e45a69 + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:56 + + + + + result + + + + en + var__m_sys_hub_action_output_1728b4c53bec7210b61f3c8c24e45a8f + + sys_documentation + admin + 2025-10-10 20:11:56 + b328f4c53bec7210b61f3c8c24e45a6d + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:56 + + + + + execution_time_ms + + + + en + var__m_sys_hub_action_output_1728b4c53bec7210b61f3c8c24e45a8f + + sys_documentation + admin + 2025-10-10 20:11:56 + fb28f4c53bec7210b61f3c8c24e45a74 + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:56 + + + + + error + + + + en + var__m_sys_hub_action_output_1728b4c53bec7210b61f3c8c24e45a8f + + sys_documentation + admin + 2025-10-10 20:11:56 + ff28f4c53bec7210b61f3c8c24e45a70 + 0 + + b812ceb69337a210633378917cba10bc + + b812ceb69337a210633378917cba10bc + + admin + 2025-10-10 20:11:56 + + + + + + 512ea0493bac7210b61f3c8c24e45abd + 1728b4c53bec7210b61f3c8c24e45a8f + glide-yokohama-12-18-2024__patch7-hotfix2-09-18-2025_09-21-2025_1435.zip + +