Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily.
X
Workflow Activity boolean Variable Required does not work
Guys,
I think the deal is that "Required" means the value cannot be null. In Java a boolean cannot be set to null. It must have a value of either true or false.
Therefore, in the case of the boolean variable "Required" will have no affect.
David Graham Windchill Developer/Administrator CAx Administrator
Emhart Glass Manufacturing Inc. Emhart Glass Research Center 123 Great Pond Drive | Windsor, CT 06095 | USA Telephone +1 (203) 376-3144 | Telefax +1 (860) 298 7397 Mobile +1 (203) 376-3144 |
Boolean is an "object" and like any "object" in Java it can be set to null. The reason it can be set to null is that an object does not store data. It simple points to where the data is stored.
boolean on the other hand is a primitive data type and like all primitives in Java it can never be null. This is because primitives directly store data.
This is why you can't code for example:
int i = null; long l = null; double d = null; float f = null; boolean b = null; etc.
but you can code
java.lang.Integer i = null; java.lang.Long l = null; java.lang.Double d = null; java.lang.Boolean = null; etc.
Hope this helps
David Graham Windchill Developer/Administrator CAx Administrator
Emhart Glass Manufacturing Inc. Emhart Glass Research Center 123 Great Pond Drive | Windsor, CT 06095 | USA Telephone +1 (203) 376-3144 | Telefax +1 (860) 298 7397 Mobile +1 (203) 376-3144 |