Imported from previous forum
I've been tasked with keeping my algo group's markup working well for clients, and have some questions about ATDL client implementations, particularly atdl4j.
When I set for example StartTime, a pretty common example, per the ATDL 1.1 spec, I want to omit the tag for order start time entirely if the user selects a "Now" radio button. The spec describes clearly how to do it, and I do so using a StateRule value="{NULL}" stipulation. Unfortunately the validation stage in atdl4j has a NullPointerException. The reason this happens, is that, while the parameter value is successfully nulled, the control is still mapped to that parameter. The SWT version of atdl4j iterates through the controls, and for each one with a parameter attached (via parameterRef) it tries to get the type of the generic it sees, to use that type's conversion methods. Unfortunately when it gets a null instance of a parameter value and get its type, it throws.
This seems contrary to the FIXATDL spec v1.1, e.g. on page 15, where it says "To the extent that a control’s value determines the “wire-value” of a particular parameter, if the control is un-initialized or has been set to the value of “{NULL}” then the associated parameter will not have a “wire-value” and will not have its tag-value pair included in a New Order Single, Order Cancel Request or Order Cancel/Replace Request message".
I could "fix" atdl4j by telling it to test if the parameter value is null, a la "short circuit validation" mentioned in previous posts, but that would not be to the point.
My questions are: 1) Is this actually an incorrectly implemented feature in atdl4j? 2) How likely is it in general that ATDL vendor implementations correctly, or incorrectly handle this case, where the parameter value is conditionally nulled? 3) Should I resort to a workaround -- is there some way to conditionally modify the control/parameter link (e.g. unset the parameterRef), so that when building a FIX message the client app will have to ignore that parameter?
Thanks
Hi David,
Sorry to hear your having some troubles. To answer your questions:
(1) Looks like you find a bug in atld4j. I'd go with you workaround and make changes to the code.
(2) It is very common to have a filed omitted from the wire in this way. E.g. un-checked check boxes are often left out of a message. Usually, though, a blank StartTime indicates that nothing gets pout on the wire.
(3)
I would not implement a workaround by changing the ATDL code. This is basic functionality that any ATDL-supporting order-entry application should be able to handle.
I hope this helps.
-Greg