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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

How do I use the SetStateUtil.setObjectsState(Collection,State,boolean) method if my Collection consists of FlexObject types. The method is expecting LifecycleManaged objects types.

bpalm
3-Newcomer

How do I use the SetStateUtil.setObjectsState(Collection,State,boolean) method if my Collection consists of FlexObject types. The method is expecting LifecycleManaged objects types.

I'm creating a Collection object using the code below.  The objects in the Collection are FlexObject type.  I would assume that the setObjectsState method would convert the FlexObject types to LifeCycleManaged, but it doesn't.  Do I really have to walk through the Collection and type cast each object and put it into a new Collection to use this method?

 

com.lcs.wc.placeholder.Placeholder ph = (com.lcs.wc.placeholder.Placeholder)primaryBusinessObject;

java.util.Collection col = com.lcs.wc.placeholder.PlaceholderQuery.findProductsForPlaceholder(ph);

com.lcs.wc.lifecycle.SetStateUtil.setObjectsState(col, wt.lifecycle.State.toState("ESTIMATED"), true);

0 REPLIES 0
Announcements

Top Tags