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

We are happy to announce the new Windchill Customization board! Learn more.

Webject - 1st attempt

jlittle
6-Contributor

Webject - 1st attempt

My first attempt at creating a webject in Windchill. I have a general understanding, but things just aren't coming together. I have the following jsp file located under an infoengine\jsp sub-directory. When I execute the JSP, I don't get any error messages, but I don't get any results either. What am I missing???




<%@page language="java"%>
<%@page import="wt.util.*"%>
<%@page import="wt.util.*, java.io.*"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core" prefix="ie"%>
<%
WTProperties wtprops = WTProperties.getLocalProperties();
String wtInstance = wtprops.getProperty("wt.federation.ie.VMName");
%>



<process name="Generate" report&quot;=">


<description>Generates a report from the report template".</description>


<ie:webject name="Query-Objects" type="OBJ">
<ie:param name="INSTANCE" data="com.corning.na.kpwcdev.Windchill"/">
<ie:param name="TYPE" data="WCTYPE|wt.part.WTPart"/">
<ie:param name="ATTRIBUTE" data="name"/">
<ie:param name="WHERE" data="state.state='RELEASED"/">
<ie:param name="GROUP_OUT" data="PARTS"/">
</ie:webject>


<ie:webject name="Return-Groups" type="GRP">
<ie:param name="GROUP_IN" data="PARTS"/">
</ie:webject>


</process>




Any help is greatly appreciated.



Thanks,



James Little


CAD Admin


Corning Cable Systems


james.little@corning.com

4 REPLIES 4
ddemay
1-Newbie
(To:jlittle)

While you can use Info*Engine tag library in any jsp, you have not defined
any way for the information to be displayed. Therefore, what you have so
far is more like a 'task' and should be placed in a directory under
$WT_HOME/tasks/some-directory/webject.xml and executed from the Info*Engine

replace the return-groups section with this and give it a shot.


<ie:webject name="Display-Table" type="DSP">


<ie:param name="GROUP_IN" data="PARTS"/">


</ie:webject>





Regards,

Glen Herman
Sr Application Developer
Engineering And Technology
Trane Residential Systems
6200 Troup Hwy
Tyler, Texas, 75701

jlittle
6-Contributor
(To:jlittle)

Not confusing at all. Following your logic and going back over the
examples, I got the results for the example query I submitted below. I
now have another question. Trying to include a Document sub-type as
part of the WHERE statement, but can't get the syntax correct. The
class show up as:

WCTYPE|wt.doc.WTDocument|com.corning.Procedure

Any idea how I can filter for only a WTDocument that is classified as a
Procedure. Can this be part of the original query or should it be part
of the display webject? Also, would it make more sense to execute a
Search-Objects webject rather than a Query-Objects webject.

Thanks for the responses.

James Little
Corning Cable Systems
CAD Administrator
(817) 431-7678 - office
(817) 301-2274 - cell
Jeremiah 33:3 "Call to Me, and I will answer you, and show you great and
mighty things, which you do not know."

Change


<ie:param name="TYPE" data="WCTYPE|wt.part.WTPart"/">


to


<ie:param name="TYPE" data="WCTYPE|wt.doc.WTDocument|com.corning.Procedure"/">


then apply the where clause.



Search objects work very similar to Query Objects. One notable difference is Search Objects has Version arguments where Version="Latest" is useful.





Regards,

Glen Herman
Sr Application Developer
Engineering And Technology
Trane Residential Systems
6200 Troup Hwy
Tyler, Texas, 75701

Top Tags