95a31d0f by Ean Schuessler

Fix tool name decoding for complex screen paths - handle multiple naming patterns

- Simplify tool name decoding logic to handle different naming conventions
- Remove complex regex patterns that may cause Groovy compilation issues
- Add debug logging to track decoding behavior
- Tool names like screen_PopCommerce_screen_PopCommerceAdmin_Catalog.Product_FindProduct should now decode correctly
- This should resolve 'Service returned null result' errors for complex screen tools
1 parent ba1ee557
......@@ -215,7 +215,7 @@
def screenPath
def subscreenName = null
// Check if this is a subscreen (contains dot after the initial prefix)
// Check if this is a subscreen (contains dot after initial prefix)
if (toolNameSuffix.contains('.')) {
// Split on dot to separate parent screen path from subscreen name
def lastDotIndex = toolNameSuffix.lastIndexOf('.')
......@@ -229,7 +229,12 @@
// Regular screen path: _ -> /, prepend component://, append .xml
screenPath = "component://" + toolNameSuffix.replace('_', '/') + ".xml"
ec.logger.info("Decoded screen path for tool ${name}: ${screenPath}")
}
}
} else {
// Regular screen path: _ -> /, prepend component://, append .xml
screenPath = "component://" + toolNameSuffix.replace('_', '/') + ".xml"
ec.logger.info("Decoded screen path for tool ${name}: ${screenPath}")
}
// Now call the screen tool with proper user context
def screenParams = arguments ?: [:]
......