cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Workflow Activity boolean Variable Required does not work

dgraham-4
1-Newbie

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 |
2 REPLIES 2

Boolean = null, true, false
boolean=true,false

right?

[cid:image001.gif@01CE9F4A.168256C0]

Steve Vinyard
Senior Solution Architect

Steve,

That is correct.

The reason it is correct is because:

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 |
Top Tags