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

How to query more than one type objects using a webject in windchill PDMLink?

SOLVED
Highlighted
Regular Member

How to query more than one type objects using a webject in windchill PDMLink?

Hi,

Someone can help me on this. I will appreciate it. I want to query two type objects using webject. I found the article CS195365 from PTC support, which has an example:

  • Example:

<%@page language="java"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core" prefix="ie"%>
<!-- get wtproperties -->
<ie:webject name="Get-Properties" type="MGT">
<ieSmiley Tonguearam name="ATTRIBUTE" data="wt.federation.ie.VMName"/>
<ieSmiley Tonguearam name="GROUP_OUT" data="properties"/>
</ie:webject>

<ie:webject name="Search-Objects" type="OBJ">
<ieSmiley Tonguearam name="INSTANCE" data="$(properties[0]wt.federation.ie.VMName[0])"/>
<ieSmiley Tonguearam name="type" data="wt.part.WTPart"/>
<ieSmiley Tonguearam name="type" data="wt.epm.EPMDocument"/>

<ieSmiley Tonguearam name="type" data="wt.doc.WTDocument"/>
<ieSmiley Tonguearam name="ATTRIBUTE_TYPE_CONTEXT" data="wt.fc.Persistable"/>
<ieSmiley Tonguearam name="where" data="(containerName='<CONTEXT_NAME_HERE>')"/>
<ieSmiley Tonguearam name="attribute" data="number,name,version,lifeCycleState" delim=","/>
<ieSmiley Tonguearam name="group_out" data="objectsSearched"/>
</ie:webject>

But I tried it. I got the error.

Here is my code;

<ie:webject name="Query-Objects" type="OBJ">

<ieSmiley Tonguearam name="INSTANCE" data="localdomain.vm-windchill.Windchill"/>

<ieSmiley Tonguearam name="authorization" data="$(@SERVER[]AUTHORIZATION[0])"/>

<ieSmiley Tonguearam name="type" data="wt.part.WTPart"/>

<ieSmiley Tonguearam name="type" data="wt.doc.WTDocument"/>

<ieSmiley Tonguearam name="where" data="(number='$(@FORM[]number[0])')"/>

<ieSmiley Tonguearam name="attribute" data="name,number,version,lifeCycleState,checkoutInfo.state,containerName,type,obid,containerID" delim=","/>

<ieSmiley Tonguearam name="group_out" data="objectsSearched"/>

</ie:webject>

<ie:webject name="Sort-Group" type="GRP">

<ieSmiley Tonguearam name="GROUP_IN" data="objectsSearched"/>

<ieSmiley Tonguearam name="SORTBY" data="name"/>

<ieSmiley Tonguearam name="GROUP_OUT" data="objectsSearched"/>

</ie:webject>

Here is the error I got:

javax.servlet.ServletException: com.infoengine.util.IEException: Query-Objects: Parameter "TYPE" may only be specified 1 times.

at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:908)

at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:841)

at org.apache.jsp.infoengine.jsp.ext.queryDrawingByDrawingNumber_jsp._jspService(queryDrawingByDrawingNumber_jsp.java:154)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)

at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)

at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)

Thank you so much!

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to query more than one type objects using a webject in windchill PDMLink?

CS195365 uses webject "Search-Objects" whereas you are using "Query-Objects"

2 REPLIES 2

Re: How to query more than one type objects using a webject in windchill PDMLink?

CS195365 uses webject "Search-Objects" whereas you are using "Query-Objects"

Re: How to query more than one type objects using a webject in windchill PDMLink?

Thank you! I thought they were the same way. Thanks again!