Hi Manish,
Can we use this below code of PTC Knowledge-base, CS129817,
- Use LWCNormalizedObject to access soft attributes values and use this for routing
- Example routing expression to route based on value of some soft attribute names ‘soft_attribbute_name’:
if (primaryBusinessObject != null)
{
try
{
com.ptc.core.lwc.server.LWCNormalizedObject obj = new com.ptc.core.lwc.server.LWCNormalizedObject(primaryBusinessObject,null, java.util.Locale.US, new com.ptc.core.meta.common.DisplayOperationIdentifier());
obj.load("<soft_attribbute_name>");
java.lang.String string_value = (java.lang.String) obj.get("<soft_attribbute_name>");
System.out.println("Soft attibute value : " + string_value);
if ( string_value != null )
{
result = "Route1";
}
else
result="Route2";
}
catch ( Exception e )
{
e.printStackTrace();
}
}
Note: Additional details about LWCNormalizedObject API in Windchill Javadoc
LWCNormalizedObject is server side API
Regards,
Mahesh