apiAccess in contract constraint expression

Not sure if this is as intended, but the “apiAccessor” is not accessible from a contract constraint - and neither are configuration parameters.

I’ve worked around it, but it seems a strange limitation - unless there is some logical reason for it that I cant yet see.

1 Like

Yes it’s actually intended. The contract constraint are specified at design-time and thus not meant to be modified at runtime.

The goal here is to validate that the input are valid from a semantic point of view. Then the task resolution will drive the more complex business logic that can depends from runtime information and/or external systems.

That seems a rather poor design choice. What (for example) if you want to validate that an ordered item is in stock, or an unknown post/zip code has been entered? It would be good to be able to detect and report the issue without moving away from the page at the point “submit” is clicked - giving the user the chance to correct the input rather than spawning a new task. I would have thought that was good “SPA” design.

Your point is definitely valid and there has been (and still are) a lot of discussions both internally and externally around this point.

I’ll keep you posted if things change in the future.

Hi there! Any changes? I'm using community edition 7.10.3 and apiAccessor, apparently, stills away.