While generating a productstructure using Query-Tree webject. If we haven't defined any value for part attribute, BOM is getting generated by Query-Tree webject is returning default value for the attribute. If we see the property page "more ..." attribute shows as blank.
We don't want Query-Tree webject to return the default values for attributes.
(This is Marty, I work with Sujit and am also investigating this problem)
We're pulling the part structure using the standard "Query-Tree" webject, from a Windchill task. We have not configured any nonstandard webjects in $WT_HOME/codebase/wt.adapter.delegates.properties.
We've searched the documentation of the Query-Tree webject, and so far have not found any parameter(s) that indicate they could be used to suppress the (apparent) substitution of default values for attributes having no assigned value in the part structure, yet we're seeing these default values appearing in the BOM structure produced by "Query-Tree".
Are you only looking at the output of the InfoEngine task, or are you displaying this on a JSP page?
Simply doing HTTP GET onURL of the form:
http://myhost.my.org:8080/Windchill/servlet/IE/tasks/org/myorg/myfolder/Bom.xml?OBJECT_REF=<myobid< a=">>
Great! 😉 Now what? ;-(
Could any of these be related and help us? Does anyone know of any other documentation / idea trails we might follow?
So here's the answer we received from PTC, and initial testing has indicated it might be doing exactly what we want. However, I've found uncomfortably little documentation to help confirm that it's exactly what we want, so we're gearing up for a round of thorough empirical testing...
Basically, the suggestion is to write a little scriptlet in our task to post-process the group returned by Query-Tree, and call the I*E API:
void purgeDefaultContent()
Removes all content that is considered DEFAULT.
recursively for all Element values found in the group.
Anyone see any "gotchas" with this approach?
BTW, from reverse-engineering, I see this API is also triggered by using the parameter "PURGE_DEFAULT" in several of the webjects (including the Windchill Adapter's Query-Objects), however unfortunately, they haven't added it (yet?) to Query-Tree. Hmmm..