I am getting odd results during the data validation phase of my dynamic task. Within my task I have getters and setters for all my task's properties. They all appear to work fine.
However, I can't strange results during my data validation phase. Within my Model I have:
public boolean validateProperties(List<String> w, List<String> e) {
boolean isValid = true;
if ((! WFUtil.validateMapping(w, e, getDataInputAssociations(), "authToken")) &&
(! WFUtil.validateEmptyProperty(authToken, "authToken", e))) {
isValid = false;
return super.validateProperties(w, e) && isValid;
}
if ((! WFUtil.validateMapping(w, e, getDataInputAssociations(), "deviceHID")) &&
(! WFUtil.validateEmptyProperty(deviceHID, "deviceHID", e))) {
isValid = false;
return super.validateProperties(w, e) && isValid;
}
if ((! WFUtil.validateMapping(w, e, getDataInputAssociations(), "telemetryFamily")) &&
(! WFUtil.validateEmptyProperty(telemetryFamily, "telemetryFamily", e))) {
isValid = false;
return super.validateProperties(w, e) && isValid;
}
return super.validateProperties(w, e) && isValid;
}
authToken deviceHID, and telemetry are all defined as private Strings. I can retrieve and use the data within the Execute code.
If I set all the values, Validate Workflow finds zero errors.
If I don't set any property values, Validate Workflow fails and it tells me that I am missing the three values.
If I only set authToken explicitly on the Property page, Validate Workflow doesn't find any problems.
If I only set authToken (or one of the other properties) through mapping, Validate Workflow tells me that I need values for the other two properties.
I based my code on the example in the development guide, but unfortunately, it only validates a single property. Do I need to do something different for multiple properties? I expect so, but I am not sure what I am supposed to do.
Thanks.
|