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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Generating a productstructure using Query-Tree webject

spaul
2-Explorer

Generating a productstructure using Query-Tree webject

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.


8 REPLIES 8
murucbe
1-Visitor
(To:spaul)

Sujit,

How are you rendering the table ?

If you are using JCA you can use the defaultValueDisplayMode="none" on
JCA:describeProperty

Regards,

Murugesh


MartyRoss
1-Visitor
(To:spaul)

(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?

MartyRoss
1-Visitor
(To:spaul)

I just created a simple bom task and confirmed the same behavior. I have
some usagelink attributes that aren't populate for a particular BOM and
when it gets pulled up in the task it shows the default values and not
what the UI shows.


> Simply doing HTTP GET on URL of the form:
> ">http://myhost.my.org:8080/Windchill/servlet/IE/tasks/org/myorg/myfolder/Bom.xml?OBJECT_REF=<myobid>
>
MartyRoss
1-Visitor
(To:spaul)

Great! 😉 Now what? ;-(



  • The description of default attributes in the "Windchill Business Administration Guide" that seems to imply that default values are only good for ensuring there exists a single value that meets all the criteria set by the constraints in effect for the attribute


Could any of these be related and help us? Does anyone know of any other documentation / idea trails we might follow?

MartyRoss
1-Visitor
(To:spaul)

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?

MartyRoss
1-Visitor
(To:spaul)

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..

Announcements


Top Tags