]
Kabir Khan resolved WFCORE-543.
-------------------------------
Resolution: Done
Revisit how the model validation happens
----------------------------------------
Key: WFCORE-543
URL:
https://issues.jboss.org/browse/WFCORE-543
Project: WildFly Core
Issue Type: Feature Request
Components: Domain Management
Reporter: Kabir Khan
Assignee: Kabir Khan
Fix For: 1.0.0.Beta1
Currently the ValidateModelStepHandler is triggered by AbstractAddStepHandler. Not all
add handlers extend AbstractAddStepHandler. Also, it does not seem to be triggered for
writes.
Also if used in a composite along the lines of
{code}
[standalone@localhost:9990 /] batch
[standalone@localhost:9990 / #] /system-property=xxx:add(value=test)
[standalone@localhost:9990 / #] /system-property=xxx:remove
[standalone@localhost:9990 / #] run-batch
{code}
the handler will get triggered at the end for the add. It will fail for the add since
there is no such resource. While that is easy to work around by checking for a
NoSuchResourceException around the OC.readResource() it seems that what triggers the use
of the ValidateModelStepHandler should be more an intrinsic part of the controller which
knows what has and has not been added/removed/written to.