moqui / moqui-framework

Use Moqui Framework to build enterprise applications based on Java. It includes tools for databases (relational, graph, document), local and web services, web and other UI with screens and forms, security, file/resource access, scripts, templates, l10n, caching, logging, search, rules, workflow, multi-instance, and integration.
http://www.moqui.org
Other
279 stars 200 forks source link

Improve handling of service-special when incorrect parameters are given. #583

Open eigood opened 1 year ago

eigood commented 1 year ago

When using service special, and parameters are given that do not pass validation, moqui will attempt to log this. However, doing so requires an active transaction. Service special runs this after the current transaction has completed, so the validate logic fails to run, and a NO_TRANSACTION message is printed instead, hiding the root cause of the error.

So, now we implicitly validate the service call in beforeCompletion(), so the current transaction will fail, and the root cause(incorrect parameter specification) can be shown.

acetousk commented 1 year ago

Assuming there was some testing on this, this looks good to me. @eigood Have you used this patch in production or a test environment?