Sie sind auf Seite 1von 211

PTC Windchill® Adapter

Guide
P T C W i n d c h i l l ® 11 . 0 F 0 0 0
Copyright © 2015 PTC Inc. and/or Its Subsidiary Companies. All Rights Reserved.

User and training guides and related documentation from PTC Inc. and its subsidiary companies (collectively
"PTC") are subject to the copyright laws of the United States and other countries and are provided under a
license agreement that restricts copying, disclosure, and use of such documentation. PTC hereby grants to the
licensed software user the right to make copies in printed form of this documentation if provided on software
media, but only for internal/personal use and in accordance with the license agreement under which the
applicable software is licensed. Any copy made shall include the PTC copyright notice and any other
proprietary notice provided by PTC. Training materials may not be copied without the express written consent
of PTC. This documentation may not be disclosed, transferred, modified, or reduced to any form, including
electronic media, or transmitted or made publicly available by any means without the prior written consent of
PTC and no authorization is granted to make copies for such purposes.

Information described herein is furnished for general information only, is subject to change without notice,
and should not be construed as a warranty or commitment by PTC. PTC assumes no responsibility or liability
for any errors or inaccuracies that may appear in this document.

The software described in this document is provided under written license agreement, contains valuable trade
secrets and proprietary information, and is protected by the copyright laws of the United States and other
countries. It may not be copied or distributed in any form or medium, disclosed to third parties, or used in any
manner not provided for in the software licenses agreement except with written prior approval from PTC.

UNAUTHORIZED USE OF SOFTWARE OR ITS DOCUMENTATION CAN RESULT IN CIVIL


DAMAGES AND CRIMINAL PROSECUTION. PTC regards software piracy as the crime it is, and we view
offenders accordingly. We do not tolerate the piracy of PTC software products, and we pursue (both civilly
and criminally) those who do so using all legal means available, including public and private surveillance
resources. As part of these efforts, PTC uses data monitoring and scouring technologies to obtain and transmit
data on users of illegal copies of our software. This data collection is not performed on users of legally
licensed software from PTC and its authorized distributors. If you are using an illegal copy of our software
and do not consent to the collection and transmission of such data (including to the United States), cease
using the illegal version, and contact PTC to obtain a legally licensed copy.

I m p o r t a n t C o p y r i g h t , Tr a d e m a r k , P a t e n t , a n d L i c e n s i n g I n f o r m a t i o n : See the About Box, or copyright


notice, of your PTC software.

U N I T E D S TAT E S G O V E R N M E N T R E S T R I C T E D R I G H T S L E G E N D

This document and the software described herein are Commercial Computer Documentation and Software,
pursuant to FAR 12.212(a)-(b) (OCT’95) or DFARS 227.7202-1(a) and 227.7202-3(a) (JUN’95), and are
provided to the US Government under a limited commercial license only. For procurements predating the
above clauses, use, duplication, or disclosure by the Government is subject to the restrictions set forth in
subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software Clause at DFARS 252.227-
7013 (OCT’88) or Commercial Computer Software-Restricted Rights at FAR 52.227-19(c)(1)-(2) (JUN’87),
as applicable. 01012015

PTC Inc., 140 Kendrick Street, Needham, MA 02494 USA


Contents

About This Guide ........................................................................................................5


Info*Engine Architecture ..............................................................................................9
Identifying the Info*Engine Components ...............................................................10
Identifying Basic Components ............................................................................. 11
Setting Up Connections Through the Windchill Adapter ......................................... 11
Interacting with Info*Engine .................................................................................12
Interacting with the Naming Service .....................................................................16
Installing the Windchill Adapter...................................................................................19
Windchill Adapter Installation...............................................................................20
Installed Credentials Mapping Information ............................................................20
Installed Windchill Adapter LDAP Entry ................................................................21
Installed wt.properties File Settings ......................................................................21
Configuring the Windchill Adapter...............................................................................23
Setting the Windchill Adapter LDAP Properties .....................................................24
Windchill Adapter Properties................................................................................26
Configuring Windchill Adapter Logging .................................................................31
Using Windchill Adapter Webjects ..............................................................................33
Specifying the TYPE and WHERE Parameters .....................................................34
Specifying Contexts ............................................................................................37
Naming the Adapter in INSTANCE Parameters .....................................................38
Windchill Adapter Examples ................................................................................41
Windchill Adapter Webject Library ..............................................................................53
Adapter Webjects Overview ................................................................................54
Action Webjects..................................................................................................64
Query Webjects................................................................................................ 127
Custom Windchill Adapter Webjects ......................................................................... 195
Implementing Custom Windchill Adapter Webjects .............................................. 196
Hello-World Example ........................................................................................ 198
Type-Based Webject Delegate Example............................................................. 203
About the wt.adapter.delegates.properties File.................................................... 208

3
About This Guide

The PTC Windchill Adapter Guide documents the use of the Windchill adapter
software. This guide provides the following information:
• A description of the general Info*Engine architecture and adapter.
• Information about installing and configuring the Windchill adapter.
• Information about using Windchill adapter webjects, including details about
each of the webjects available for use with the adapter.
This guide assumes you are familiar with the basics of HTML, XML, and JSP as
defined by the World Wide Web Consortium (http://www.w3c.org).
To take advantage of the advanced functionality of Info*Engine, you must have
expert knowledge of HTML, XML, and JSP.

Related Documentation
The following documentation might be helpful:
• The Info*Engine User's Guide details the main functionality of the
Info*Engine server.
• Info*Engine Implementation Guide
• JNDI Adapter Guide
• JDBC Adapter Guide
• The Windchill Read This First document should be checked for additional
information about using the adapter that is not in this guide.

5
Te c h n i c a l S u p p o r t
Contact PTC Technical Support through the PTC website, or by phone, email, or
fax if you encounter problems using this product or the product documentation.
The PTC eSupport portal provides the resources and tools to support your PTC
Windchill implementation:
https://support.ptc.com/appserver/cs/portal/
For complete details, see the PTC Customer Support Guide:
http://support.ptc.com/appserver/support/csguide/csguide.jsp
You must have a Service Contract Number (SCN) before you can receive
technical support. If you do not know your SCN, see “Preparing to contact TS” on
the P r o c e s s e s tab of the PTC Customer Support Guide for information about how
to locate it.

Documentation for PTC Products


You can access PTC documentation using the following resources:
• P T C W i n d c h i l l H e l p C e n t e r —The PTC Windchill Help Center includes all PTC
Windchill documentation. You can browse the entire documentation set, or use
the search capability to perform a keyword search. To access the PTC
Windchill Help Center, you can:
○ Click any help icon in PTC Windchill
○ Select H e l p ▶ W i n d c h i l l H e l p C e n t e r from the Q u i c k L i n k s menu at the top
right of any PTC Windchill page
○ Use the following link to access all PTC help centers:
https://support.ptc.com/appserver/cs/help/help.jsp
• R e f e r e n c e D o c u m e n t s website—The Reference Documents website is a
library of all PTC guides:
http://support.ptc.com/appserver/cs/doc/refdoc.jsp
A Service Contract Number (SCN) is required to access the PTC
documentation from the Reference Documents website. If you do not know
your SCN, see “Preparing to contact TS” on the P r o c e s s e s tab of the PTC
Customer Support Guide for information about how to locate it:
http://support.ptc.com/appserver/support/csguide/csguide.jsp
When you enter a keyword in the S e a r c h O u r K n o w l e d g e field on the PTC
eSupport portal, your search results include both knowledge base articles and PDF
guides.

6 PTC Windchill® Adapter Guide


Comments
PTC welcomes your suggestions and comments on its documentation. To submit
your feedback, you can:
• Send an email to documentation@ptc.com. To help us more quickly address
your concern, include the name of the PTC product and its release number
with your comments. If your comments are about a specific help topic or
book, include the title.
• Click the feedback icon in the PTC Windchill Help Center toolbar and
complete the feedback form. The title of the help topic you were viewing
when you clicked the icon is automatically included with your feedback.

About This Guide 7


1
Info*Engine Architecture
Identifying the Info*Engine Components......................................................................10
Identifying Basic Components .................................................................................... 11
Setting Up Connections Through the Windchill Adapter ................................................ 11
Interacting with Info*Engine........................................................................................12
Interacting with the Naming Service ............................................................................16

In order to understand the operation of Info*Engine adapters, you must first


understand how adapters work within the Info*Engine architecture. The following
sections describe each component of the Info*Engine architecture and details how
those components work in concert.

9
Identifying the Info*Engine Components
The following components make up the Info*Engine architecture:
Info*Engine Servlets
Info*Engine servlets provide an interface between the web server and
Info*Engine.
Info*Engine Server
The Info*Engine server provides a mechanism for retrieving and manipulating
the data that users or custom applications want to view or receive.
Naming Service
The Naming Service is the software that supports the operation of Info*Engine
components. In the Info*Engine Naming Service, you can identify the LDAP
directory servers where entries for the network addresses of Info*Engine
components and entries for configuration properties reside.
Info*Engine Service Access Kit (SAK)
The Info*Engine Service Access Kit (SAK) is an application program
interface (API) that facilitates the development of Java applications, including
JSP pages, that directly utilize the functions and features of Info*Engine. For
example, high-level Info*Engine components such as the IE servlet and the
Info*Engine server use the SAK to invoke tasks and individual webjects.
Native Adapters
The native adapters provide a direct interface between Info*Engine and
information systems.
Non-Native Adapters
The non-native adapters provide an indirect interface between Info*Engine
and information systems. These adapters use a different protocol from the
protocol used by Info*Engine and therefore cannot connect directly to
Info*Engine.
Gateways
Gateways provide an interface between Info*Engine and non-native adapters.
Info*Engine SOAP Servlets
The Info*Engine SOAP servlets catch and process Info*Engine SOAP
requests that are made over the web. SOAP (Simple Object Access Protocol)
is a lightweight protocol that can be used by third-party applications. By using
this protocol, third-party applications can send requests to execute
Info*Engine code and return the output that is generated.
The remaining sections describe the relationships among the components.

10 PTC Windchill® Adapter Guide


Identifying Basic Components
Info*Engine components can be used in many different software and hardware
configurations to meet your business requirements for accessing, managing, and
presenting data from different information systems.
Setting up your Info*Engine environment can be accomplished by:
• Establishing interactions with Info*Engine.
• Managing the execution of Info*Engine tasks.
• Starting and managing Info*Engine components.
• Managing connections to the information systems where the data of interest
resides.

Setting Up Connections Through the


Windchill Adapter
The Windchill adapter provides a connection between Info*Engine components
and a Windchill system. This adapter is a native adapter, which means that it is
implemented in the Java language and conforms to the formal Info*Engine
interface specification for adapters.
The Windchill adapter serves as both a native Info*Engine adapter as well as an
Info*Engine server (a task processor).
Applications and JSP pages can request the Windchill adapter to execute
individual Windchill webjects, or they can request it to execute whole tasks, and
those tasks can specify webjects that reference other adapters.
When the Windchill adapter is executing a task and it detects a webject that
references the adapter itself, it executes the webject in-process. When it detects
webjects that references other adapters, it creates network connections to those
adapters, and routes the webjects to them for execution.
The Windchill adapter is an integral module of the Windchill method server. The
adapter and the Info*Engine server functionality are activated when the method
server is initiated. The adapter adds an Info*Engine API to the method server and
allows the method server to serve as an Info*Engine server.
The integrated Info*Engine adapter in the Windchill method server listens for
connection requests from Info*Engine servers, applications, and JSP pages which
are located throughout the enterprise network. The method server accepts
connections from remote Info*Engine components and responds to their requests
to execute both individual Windchill webjects as well as whole Info*Engine tasks.

Info*Engine Architecture 11
Interacting with Info*Engine
The Windchill adapter provides the API through which Info*Engine requests,
tasks, or custom Java applications (including JSP pages) access data in the
Windchill system.
The following sections show two ways that the Windchill adapter can interact
with Windchill.

Using a Custom Java Application to Access


Windchill
By coding a custom application in Java, you can have quick and easy access to
Windchill from Info*Engine without having to issue a URL request through a
Web server. By using the API defined in the SAK, you can execute Info*Engine
webjects, tasks, and other Info*Engine code in the Java Virtual Machine (JVM)
where the application resides.
The following diagram shows the SAK and adapter classes being used in the
application to access data in a Windchill database:

An Info*Engine task consists of a set of webjects and surrounding code that


supports the processing of the webjects. These tasks can then be processed either
in the JVM of any Info*Engine server or in the JVM of the application.

W i n d c h i l l A d a p t e r We b j e c t s a n d I n f o * E n g i n e
The Windchill adapter is a tightly integrated component of the Windchill server.
When the method server is started, the adapter is started automatically as a part of
the method server startup sequence. The Windchill adapter provides the API
through which Info*Engine accesses data in the Windchill system.
The Info*Engine primitive operators are called webjects. The Windchill adapter
contains two types of webjects:

12 PTC Windchill® Adapter Guide


Action webjects:
• Create, delete, and update Windchill business objects.
• Add content items to Windchill business objects.
• Create an association between two Windchill business objects.
• Return the results of a command.
• Start an instance of a workflow process.
• Subscribe and unsubscribe to a modeled event for specified instances of the
class and for specified subscribers.
Query webjects allow information systems to be queried for abstract business
objects. Queries are usually specified using SQL syntax. Query results are
returned as groups.
Query webjects:
• Return the life cycle history and information about all versions of a Windchill
object.
• Retrieve content and navigate associations between Windchill business
objects.
• Return information about previous and current versions of a Windchill object
and DisplayName values for the specified attributes.
• Describe specified attributes and give information for a modeled Windchill
class. For example, a specified EnumeratedType class.
• Execute a Windchill report template and returns its results as an Info*Engine
group.
• Query and return content items and information about the previous iterations
of a Windchill object, as well as a group containing the Windchill
configuration properties.
• Query for the master object of an identified version-controlled object, as well
as objects based upon generic Windchill search criteria.
• Navigate associations between Windchill business objects, producing a tree of
related objects.
• Follow and find relationships between objects based upon link classes and
Windchill search criteria.
• Indicate if the user name and credentials specified are valid.
For more information, about Info*Engine, webjects, and tasks, see the
Info*Engine User's Guide.

Info*Engine Architecture 13
M a n a g i n g t h e E x e c u t i o n o f I n f o * E n g i n e Ta s k s
Info*Engine tasks control the retrieval and manipulation of data. Tasks consist of
the following:
• Info*Engine webjects that retrieve and manipulate data.
• Surrounding Info*Engine tags that manage the execution of the webjects.
• Custom Java methods (similar to JSP declarations) and custom Java source
(similar to JSP scriptlets) that provide logic unattainable using other
Info*Engine constructs.
There are three basic ways to execute tasks:
• Incorporate tasks directly into any Java application, including JSP pages, using
Info*Engine tags.
• Put the tasks in individual text-based documents, and specify which tasks to
execute in the Info*Engine tags within a Java application (or JSP page).
• Put the tasks in individual text-based documents, configure them for access
using Info*Engine task delegation, and either use the Info*Engine Dispatch-
Tasks webject or Info*Engine SOAP requests to invoke them.
The decisions about how and where to execute Info*Engine tasks depend on your
system requirements. For example, you may have a dedicated environment where
one system contains both your Info*Engine application and all of the required
software components. The tasks to execute do not require any complex
processing, and you can choose to execute your tasks from within JSP pages that
are also used to display the results.

14 PTC Windchill® Adapter Guide


The JSP engine depicted in the diagram instantiates an instance of the SAK within
the JVM of the JSP engine. The SAK is then used to process the Info*Engine tags
in the task. The SAK processes the request and, as needed, uses the Windchill
adapter classes to communicate with a Windchill system. After the requested
information is obtained from the Windchill database, the process reverses itself
and ultimately displays information in the user’s browser window.
Some Info*Engine tags can execute webjects that extract data from Windchill
through the Windchill adapter classes, while others can display the data. In this
example, all of the webjects are contained in the same JSP page.

Note
When there is a need to invoke multiple Windchill adapter webjects from
within a JSP page, for performance reasons, it is best to encapsulate the
invocation of those webjects within an Info*Engine task and send a request to
invoke the task to the server. Running multiple Windchill adapter webjects
from a single JSP requires multiple round trips to the server; encapsulating the
same logic in the task and invoking once requires only one round trip.

The default installation of Windchill results in a method server that also acts as the
Info*Engine server and windchill adapter. Use of the Web Event Service required
additional third-party software and configuration changes.

U s i n g t h e W i n d c h i l l A d a p t e r t o E x e c u t e Ta s k s
After performing the basic Windchill installation, the Windchill adapter can
execute Info*Engine tasks automatically. Request objects are generated by any
Info*Engine component that requests service from another Info*Engine
component. The SAK creates and sends request objects when it is performing
work for a JSP page or standalone application.
In the following diagram, requests are sent to the webject processor through a
communication interface. The request queries information from the Windchill
method server before sending a response object back. Tasks and requests are
processed separately through a task processor, which pulls information from both
the Windchill adapter and Info*Engine.

Info*Engine Architecture 15
Interacting with the Naming Service
The Naming Service acts as a traffic director of sorts, using an LDAP directory to
provide the Info*Engine servlet, the Info*Engine server, the native adapters, and
the Info*Engine gateways a way to locate each other. The Windchill adapter
obtains some configuration properties through this service. The Windchill adapter
also functions as a server, which means that it looks up other adapters using the
Naming Service too.
In the following diagram, dashed lines represent the communication between the
Naming Service, Info*Engine components, and optional third party software.

16 PTC Windchill® Adapter Guide


Info*Engine Architecture 17
2
Installing the Windchill Adapter
Windchill Adapter Installation .....................................................................................20
Installed Credentials Mapping Information...................................................................20
Installed Windchill Adapter LDAP Entry.......................................................................21
Installed wt.properties File Settings.............................................................................21

The following topics provide details on your Windchill adapter installation.

19
Windchill Adapter Installation
The Windchill adapter is installed as a bundled component with Windchill.
The adapter consists of classes in the w t . m e t h o d base package as well as webject
delegate and attribute translation classes in the w t . a d a p t e r and c o m . p t c . c o r e .
a d a p t e r packages.
The Windchill installation completes the following adapter setup tasks:
• Sets adapter properties in the Windchill wt.properties file.
• Copies the Windchill adapter property form to the Info*Engine admin
directory.
• Creates an Info*Engine LDAP entry for the adapter so that it can be located
through the Naming Service.

Installed Credentials Mapping


Information
In a network comprised of various information systems, each system might
maintain its own user authentication scheme. Gaining access to ten different
systems might require ten different user names and passwords. Info*Engine hides
this complexity through a mechanism called credentials mapping. Credentials
mapping allows a user to authenticate explicitly once to Info*Engine, then
Info*Engine authenticates the user automatically to other enterprise information
systems. In effect, credentials mapping allows a single authenticated user name to
serve as a key that provides access information to all of the information systems to
which a user is permitted access.
Credentials mapping is accomplished by executing a special, configurable, task
implicitly at the beginning of each task invoked by a user or federated client
application. The credentials mapping task is responsible for returning a group,
called the Auth_Map group, that provides user names and credentials for
accessing all information systems permitted to the user.
Thus, the Info*Engine credentials mapping feature facilitates the development of
information portals tailored to user roles and preferences.
Ensure that the credentials mapping is set up correctly for your environment. The
installed mapping information is described in Configuring the Windchill Adapter
on page 23.
For more information, see the Info*Engine User's Guide.

20 PTC Windchill® Adapter Guide


Installed Windchill Adapter LDAP Entry
The Info*Engine service and adapter LDAP entries are objects stored in the
LDAP directory. Each entry defines an adapter service name, component type,
network address, and configuration properties. At installation time, an adapter
service definition is defined for the Windchill adapter.

Installed wt.properties File Settings


See <Windchill>/codebase/properties.html for descriptions of the
adapter-related properties. The adapter-related properties contain the prefix
wt.adapter or wt.federation.

Installing the Windchill Adapter 21


3
Configuring the Windchill Adapter
Setting the Windchill Adapter LDAP Properties ............................................................24
Windchill Adapter Properties ......................................................................................26
Configuring Windchill Adapter Logging........................................................................31

The following topics describe using the Info*Engine Property Administration


utility and setting your logging preferences.

23
Setting the Windchill Adapter LDAP
Properties
Adapter properties are maintained as attributes in LDAP directory entries.
Use the Info*Engine Property Administration utility to add or modify existing
Info*Engine adapter service LDAP entries.
To launch the Info*Engine Property Administration utility, log on to Windchill as
an administrator and navigate to S i t e ▶ U t i l i t i e s . Under S y s t e m A d m i n i s t r a t i o n ,
click the I n f o * E n g i n e A d m i n i s t r a t i o n link.
For general information about using the Info*Engine Property Administration
utility, see the Info*Engine Implementation Guide and the online help provided in
the Property Administration utility.
1. To create a new adapter LDAP entry, select C r e a t e E n t r y ▶ W i n d c h i l l A d a p t e r
from the Info*Engine Property Administration main page.
2. Enter values for the required fields.

24 PTC Windchill® Adapter Guide


Most forms include the following set of common fields:
When the form opens, the Property Administration
utility populates the S e r v i c e N a m e , D i s t i n g u i s h e d
Service Name N a m e , and R u n t i m e S e r v i c e N a m e fields with
suggested names. These names are based on
Distinguished Name
information provided when you logged into the
R u n t i m e S e r v i c e N a m e administration utility and also information that is
stored in the form. You can change these names to
match the criteria set up for your site LDAP entries.
S e r v i c e C l a s s contains the service class name used
for the adapter.
The Windchill adapter operates as both a native
Info*Engine adapter and an Info*Engine server.
As an adapter, it acts as both an in-process and an
out-of-process adapter. Consequently, you must
specify both the S e r v i c e C l a s s and the H o s t and
P o r t values.
When running in a multiple method server
environment, the Windchill adapter configuration is
automatically updated to use a port range of
Service Class
equivalent size to that in use by Windchill RMI
Host communications (as configured by the
wt.method.minPort and
Port
wt.method.maxPort wt.property values).
These entries are created and deleted as necessary
upon system startup to coincide with the current
configuration.
When in a multiple method server environment, all
Info*Engine property configurations for the
Windchill adapter should reside exclusively in the
base Windchill adapter property entry. This is the
entry whose p t c S e r v i c e N a m e matches the value of
the wt.federation.ie.VMName wt.property
value. No redundant Windchill adapter
configuration entries should be manually modified.

3. Set any remaining properties as appropriate for your site. For a description of
the remaining properties, see Windchill Adapter Properties on page 26.
4. Click C r e a t e A d a p t e r when finished.

Configuring the Windchill Adapter 25


For help on the A d d i t i o n a l P r o p e r t i e s , C o - R e s i d e n t S e r v i c e s , and A d d i t i o n a l
S e r v i c e s options, click the H e l p link available from the Property Administration
main page.
Additional information about setting up the criteria your site should use for
creating LDAP entries can be found in the PTC Windchill Installation and
Configuration Guide.

Windchill Adapter Properties


The Windchill adapter properties form is comprised of common properties and
properties specific to the adapter.
For information about common properties, click the help icon available from
the Windchill adapter property form.

General Properties
To specify general properties, use the following fields:
Home Directory
home
The Info*Engine root installation directory. The root installation directory for
Info*Engine is the same as the root installation directory for Windchill
(wt.home).
Load Balancer
load.balancer
The load balancer implementation that Info*Engine clients should use when
communicating with the Windchill adapter. This value is typically set to
wt.adapter.LoadBalancer, which leverages Windchill RMI in a multi-
method server environment to select the best method server to process the next
request.
Secret
secret.text
A string used to sign and validate requests sent to the adapter. The value you
enter acts as a password and is used to authenticate your request.
This property is not required, but adds additional security to the LDAP entry.
If you enter a value, the out-of-process adapter name specified in the webject
INSTANCE parameter must identify an LDAP entry that has this secret
password set.
Secret 2
secret.text2

26 PTC Windchill® Adapter Guide


Another string used to sign and validate requests sent to the adapter. This
property generates a more comprehensive request signature, and can be used
instead of or in addition to the S e c r e t property.
Secret Algorithm
secret.algorithm
The algorithm used to encrypt the values of the S e c r e t and S e c r e t 2 properties.
Valid values are SHA-1, MD2, and MD5. The default for this property is
SHA-1. The default value is SHA-1.
Default JMS Service
jms.defaultService
The name of the JMS service that should be used for any MSG and WES
webjects that are invoked without a SERVICE parameter.

Core JMS Properties


The following properties are commonly set when configuring Info*Engine with a
Java Messaging Service (JMS). Property descriptions are grouped based on the
location of the properties in the form and the function they perform.

Ti p
When configuring Info*Engine with a JMS MOM, it is best to instead create a
new JMS service entry. You can specify core and additional properties using
the property editor for that JMS service entry.
You can then enter the service name of that JMS service as the SERVICE
parameter for MSG and WES webjects. Or you can enter it as the value of the
D e f a u l t J M S S e r v i c e property for the Info*Engine server or adapter.

JMS Context Provider Factory


jms.CtxFactory
The class name of the factory used to return the initial JNDI context during
administered object lookup. If not specified, it is assumed administered objects
are stored in the LDAP.
The default value is com.sun.jndi.ldap.LdapCtxFactory.
JMS Base URI
jms.baseUri
The LDAP Uniform Resource Indicator (URI) to which JMS-related URIs are
relative.
This serves as a base location where JMS-related administered objects can be
found.

Configuring the Windchill Adapter 27


JMS Base URI Principal
jms.baseUri.principal
The username provided to authenticate the associated JNDI user to the J M S
Base URI.

JMS Base URI Password


jms.baseUri.password
The password associated with the J M S B a s e U R I P r i n c i p a l .
JMS User
jms.username
The default user associated with the JMS provider or MOM.
JMS Password
jms.password
The default password used to connect to the JMS provider or MOM.
Queue Connection Factory
msg.queueConnectionFactory
The location of an administered JMS queue connection factory used by the
JMS MOM.
To p i c C o n n e c t i o n F a c t o r y
wes.topicConnectionFactory
The location of an administered JMS topic connection factory. This value can
be a fully qualified URI or can be a distinguished name relative to a
configured base URI.
WES Subscription Identifier
wes.subscriptionIdentifier
Unique identifier used when creating topic subscriptions. Set this property if
multiple Info*Engine processes on a single host want to generate a
subscription to the same topic.
Each separate Info*Engine service must have its own unique identifier. If this
property is not specified, an identifier is generated based on the host name and
event name.
JMS Library Directory
jms.lib
The directory in which the third-party JAR files required to communicate with
a JMS service are located. If the JAR files are already included in the service
classpath, this property is optional.

28 PTC Windchill® Adapter Guide


Additional JMS Properties
The following properties can also be set when configuring Info*Engine with a
JMS service. Property descriptions are grouped based on the location of the
properties in the form and the function they perform.
JMS Recovery Retry Interval
jms.recoveryRetryInterval
The amount of time in seconds to wait between attempts to re-establish a
connection if the MOM becomes disconnected.
The default value is 30.
JMS Bad Message Queue
jms.badMessageQueue
If a message is received that cannot be translated into an Info*Engine request,
this property defines the queue where the message is placed for an
administrator to handle. If this property is not defined, the bad message is
discarded.
WES Context Provider Factory
wes.CtxFactory
The class name of the factory used to return the Windchill initial context
during administered object lookup.
The default value is com.sun.jndi.ldap.LdapCtxFactory.
WES Base URI
wes.baseUri
The LDAP Uniform Resource Indicator (URI) (a subtree within an LDAP
directory) where WES-related administered objects can be found.
If not specified, the j m s . b a s e U r i property is used.
WES User
wes.username
The WES username that should be provided when connecting to a JMS MOM.
If not specified, the j m s . u s e r n a m e property is used.
WES Password
wes.password
The password associated with W E S U s e r .
If not specified, the j m s . p a s s w o r d property is used.
WES Bad Message Queue
wes.badMessageQueue

Configuring the Windchill Adapter 29


If a message is received that cannot be translated into an Info*Engine request,
this property defines the queue where the message is placed for an
administrator to handle. If this property is not defined, the bad message is
discarded.
If not specified, the j m s . b a d M e s s a g e Q u e u e property is used.
MSG Context Provider Factory
msg.CtxFactory
The class name of the factory used to return the initial JNDI context during
administered object lookup.
The default value is com.sun.jndi.ldap.LdapCtxFactory.
Queue Base URI
msg.baseUri
The LDAP Uniform Resource Indicator (URI) (a subtree within an LDAP
directory) where queue-related administered objects can be found.
If not specified, the j m s . b a s e U r i property is used.
Queue User
msg.username
The username that should be provided when connecting to a JMS MOM.
If not specified, the j m s . u s e r n a m e property is used.
Queue Password
msg.password
The password associated with Q u e u e U s e r .
If not specified, the j m s . p a s s w o r d property is used.
MSG Bad Message Queue
msg.badMessageQueue
If a message is received that cannot be translated into an Info*Engine request,
this property defines the queue where the message is placed for an
administrator to handle. If this property is not defined, the bad message is
discarded.
If not specified, the j m s . b a d M e s s a g e Q u e u e property is used.
Default Subscribe/Submit Queue
msg.defaultExecutionQueue
The LDAP distinguished name of an administered queue. The value can be an
LDAP distinguished name relative to a configured base URI or a fully
qualified LDAP distinguished name. If relative, the c n = (common name
attribute) is implicit if not explicitly specified.
This queue location is used with the following webjects:

30 PTC Windchill® Adapter Guide


• Queue-Task—The location where queued tasks are placed. If this property
is not specified, the webject QUEUE parameter must be specified.
• Subscribe-Queue—The queue to subscribe to when using the webject. If
this property is not specified, the webject QUEUE parameter must be
specified.
Default Results Queue
msg.defaultResultsQueue
The LDAP distinguished name of an administered queue. The value can be an
LDAP distinguished name relative to a configured base URI or a fully
qualified LDAP distinguished name. If relative, the c n = (common name
attribute) is implicit if not explicitly specified.
This queue location is used with the following webjects:
• Query-Results—The queue location where results are placed. If this
property is not specified, the webject QUEUE parameter must be
specified.
• Delete-Results—The queue location where results are placed. If this
property is not specified, the webject QUEUE parameter must be
specified.
• Queue-Task—The queue location where results are placed. If this property
is not specified, the webject DESTINATION parameter must be specified.

Configuring Windchill Adapter Logging


Windchill uses the Apache log4j package to produce log messages. This package
is bundled with Windchill.
To manage logging, you should be familiar with the following:
• General information about the log4j package.
The following URL takes you to an introduction to log4j:
http://logging.apache.org/log4j/docs/manual.html
• General information about setting log levels, working with log files, and
viewing and emailing the log files for all Windchill products.
For more information, see the PTC Windchill Specialized Administration
Guide.
• The loggers that are used for the Windchill adapter logging.
For descriptions of the out-of-the-box Windchill loggers, view the following
file:
<Windchill>/codebase/loggers.html

Configuring the Windchill Adapter 31


As mentioned in loggers.html, the following loggers that are used by the
Windchill adapter replace the use of setting properties for logging:
Logger Description
wt.adapter.attribute Logs messages about the processing of attributes on objects,
including statistics associated with the retrieval and translation of
attribute values.
wt.adapter.exception Logs the stack traces associated with exceptions that are caught
by the Windchill adapter.
wt.adapter.session Logs messages related to Windchill session interactions
surrounding task and webject invocation by the Windchill
adapter.
wt.adapter.verbose Logs information about adapter operations that do not pertain to
any specific webject. This includes general information about
execution of tasks, information about time to execute webjects
and tasks, information about user authentication, so on.
wt.adapter.webject Logs detailed information about individual webject parameters
and internal webject operations.
wt.adapter.trace.timing Logs statistical information pertaining to how long specific
actions during webject invocation take to perform. Most
messages issued to this logger require a log level of TRACE.

These logger names mimic the previous adapter properties that had been used for
logging. Log messages issued based on property settings are now issued to the
corresponding log4j logger. Because these loggers replace the legacy logging,
each logger is either essentially on or off.
Out of the box, only error logging is enabled.

32 PTC Windchill® Adapter Guide


4
Us i ng Wi nd ch il l Ad ap ter Web je c ts
Specifying the TYPE and WHERE Parameters ............................................................34
Specifying Contexts...................................................................................................37
Naming the Adapter in INSTANCE Parameters............................................................38
Windchill Adapter Examples.......................................................................................41

The following sections provide additional information useful for working with
Windchill adapter webjects.

Note
JSPs using Info*Engine substitution syntax can no longer use the ${...}
syntax. Info*Engine now supports an alternate syntax: $(...)
Pre-existing JSPs need to be updated to use the new $(...) syntax or they
fail to compile and do not function as expected.
Pre-existing Info*Engine tasks continue to function as is and do not have to be
changed. All Info*Engine tasks function with either $(...) or ${...}.

33
Specifying the TYPE and WHERE
Parameters
Most webjects supported by the Windchill adapter accept parameters named
TYPE and WHERE. These parameters combine to specify database query criteria:
• The TYPE parameter identifies the type of business object to query.
An acceptable value of the TYPE parameter is the name of a modeled
Windchill business object class or a subtype defined in the Windchill Type and
Attribute Management utility. For more information, see Valid Syntax for
TYPE Parameters on page 34.
• The WHERE parameter identifies the attribute values and query criteria to be
matched.
An acceptable value of the WHERE parameter is a query expression. A valid
query expression contains one ore more query terms. For more information,
see Valid Syntax for WHERE Parameters on page 35.

Va l i d S y n t a x f o r T Y P E P a r a m e t e r s
Use the internal name of the type in the TYPE parameter. The internal name can
also be used in custom Info*Engine tasks and other code where there is a need to
refer to a type.
You can set the internal name of a type when loading out-of-the box types or when
you create (or update) a type through the Type and Attribute Management utility.
The following rules apply to the internal name:
• It must be unique across all types in the system.
• You are limited to 50 characters.
• Only letters, numbers, periods, and underscores are supported.
Often, the internal name is the same as the type name. If you are unsure of
whether a type has an internal name, you can view the information from the Type
and Attribute Management utility.

Ti p
If the type does not have a internal name, you can add one by updating the
type using the Type and Attribute Management utility. For details on accessing
the Type and Attribute Manager, see the PTC Windchill Basic Administration
Guide.

34 PTC Windchill® Adapter Guide


Va l i d S y n t a x f o r W H E R E P a r a m e t e r s
An acceptable value of the WHERE parameter is a query expression. A valid
query expression contains one ore more query terms:
• A term specifies an attribute name, a relational operator, and a value or
wildcard pattern.
• A negation operator might preface a term to request that an inverse database
matching operation be applied.
• Terms can be connected by boolean operators to produce conjunctive (AND)
and disjunctive (OR) expressions.
• Sub-expressions can be enclosed by parenthesis to control order of execution.
The following grammar defines the valid syntax for WHERE parameters:
• Quoted strings define terminal symbols (literal character sequences that must
occur in a valid WHERE value).
• A name enclosed by "<" and ">" is a non-terminal symbol.
• A sequence enclosed by "(" and ")*" indicates that zero or more
occurrences are accepted.
• Alternative productions for a non-terminal are delimited by the vertical line
character "|".
<expression> ::= <subexpr>
| "()"
<subexpr> ::= <term> (<boolean> <subexpr>)*
<term> ::= <name> <relational> <value>
| "!" <term>
| "(" <expression> ")"
<boolean> ::= "&" | "|"
<relational> ::= "=" | "!=" | "<" | "<=" | ">" | ">="
<name> ::= attribute-name
<value> ::= <quoted> | <unquoted>
<quoted> ::= "' " <unquoted-value> "' "
<unquoted> ::= <exact> | <wildcard>
<wildcard> ::= <wild_char> (<wildcard>)*
<wild_char> ::= "*" | character

Where:
• attribute-name—An acceptable value is the internal name for any attribute of
the business object type specified by the TYPE parameter.
○ The internal name of a hard (modeled) attribute is simply the name of the
attribute.
○ The internal name of a soft attribute is assigned in the Type and Attribute
Management utility.
These internal names can be overridden in <Windchill>/codebase/
LogicalAttributes.xml.
• "()"—The special expression "()" generates a query that returns all business
objects of the type specified by the TYPE parameter.

Using Windchill Adapter Webjects 35


This should be used with caution as it might return a very large number of
business objects. Other expressions generate queries that return the business
object, if any, that match the indicated criteria. In addition, webjects accept
multiple WHERE parameter values. In this case, the multiple values are
concatenated with the & operator to form the query expression that will be
executed.
• boolean—The boolean operator & is the AND operator, and the boolean
operator | is the OR operator.
When both are specified in an expression, "&" has higher precedence than "|",
so the sub-expressions connected by "&" are executed first. However,
parenthesized expressions are always executed before any other part of the
expression as a whole, so parenthesis can be used to override the default
precedence rules.
Nested parenthesized expressions are executed from the deepest to the most
shallow. If using a JSP page, an AND can be represented in the WHERE
clause as &. If using XML tasks, the AND must be specified using the HTML
encoded value for &, which is &amp.
• value—An acceptable attribute value is any value or wildcard string that is
valid for the attribute.

Note
Wildcards only work for those attributes whose type is a string. When pre-
processing a where clause, the value portion of a name=value pair is
translated to the type for the corresponding attribute. As a result, wildcards
only work for string attributes.
For example, assume you have an attribute named “count” and it is an
integer. A where clause containing “count=1” is valid because 1 can be
translated into an integer. However, “count=1*” is not valid because “1*”
cannot be translated into an integer.
If you would like to specify numeric ranges, use the > < operators.

Specifying Case with the WHERE Parameter


When using the WHERE parameter, searches are insensitive to case by default. To
make a search case sensitive, specify the WHERE_CASE_SENSITIVITY with a
value of TRUE. The WHERE_CASE_SENSITIVITY parameter can be specified
for all webjects which take a WHERE parameter.

36 PTC Windchill® Adapter Guide


WHERE and TYPE Examples
The following examples illustrate WHERE parameter values that might be
specified when the TYPE parameter is specified as wt.part.WTPart:
• Return all parts:
()

• Find a part named “engine”:


name=engine

• Find all parts whose names contain the substring “engine”:


name=*engine*

• Find all parts whose names contain the substring “en” followed by any
sequence of characters followed by “ine” ending with any sequence of
characters:
name=*en*ine*

• Find parts whose names begin with “engine” or end with “body”:
name=engine*|name=*body

• Two ways to find parts whose names end with “body” and do not contain
“engine”:
name=*body&!name=*engine*
name=*body&name!=*engine*

• Find parts whose names begin with “engine” or end with “body” and do not
have “9” in their part numbers:
(name=engine*|name=*body)&number!=*9*

Specifying Contexts
Contexts can be specified in three ways:
• Define the context in the @SERVER group. For more information, see the
Info*Engine User's Guide.
• Establish a method context using the Start-Session webject. Using the Start-
Session webject overrides a context defined in the @SERVER group. For
more information, see Start-Session on page 109.
• Specify the CONTAINER_REF parameter in a webject. Specifying
CONTAINER_REF overrides both the context defined in the @SERVER
group and a method context established by the Start-Session webject.
These options apply to all context-aware webjects. One exception is the Create-
Objects webject, which only recognizes CONTAINER_REF. Multiple contexts
can be specified when you use the CONTAINER_REF parameter.

Using Windchill Adapter Webjects 37


N a m i n g t h e A d a p t e r i n I N S TA N C E
Parameters
The INSTANCE parameter specifies the name of the adapter that executes the
webject. Adapter names are defined when the adapter is configured for use in your
Windchill environment. This parameter is required.
In order to provide the ability to connect to other adapters if a specific adapter is
not available, this parameter can be multi-valued. Info*Engine attempts to connect
to the adapters in the order given. If the first adapter specified is not available, the
next adapter listed is tried, and so on, until a connection is made. If a connection
cannot be established with any listed adapter, an error is returned.
In conjunction with this parameter, you can include two other parameters that
enable fail-over and load balancing: CONNECTION_ATTEMPTS and
CONNECTION_ATTEMPT_INTERVAL.
C O N N E C T I O N _ AT T E M P T S
Defines the maximum number of times to attempt establishing a connection to
an adapter before returning an error. The default value is 1. This parameter is
optional.
If multiple INSTANCE parameter values are specified, the value of
CONNECTION_ATTEMPTS defines the maximum number of times to iterate
through the list of adapter instances.
C O N N E C T I O N _ AT T E M P T _ I N T E RVA L
Defines the amount of time, in seconds, to delay between connection attempts.
The default value is 60 seconds. This parameter is optional.
If multiple INSTANCE parameter values are specified, the value of
CONNECTION_ATTEMPT_INTERVAL defines the number of seconds to
wait between the attempts to iterate through the entire list of adapter instances.

Manually Configuring the Adapter Name


You define the adapter name to use in the INSTANCE parameter when you
configure the adapter through the Info*Engine Property Administration utility.
An adapter name can be one of the following forms:
• A simple name.
This is defined in the S e r v i c e N a m e field on the Info*Engine Property
Administration LDAP form.
Simple names are stored in the p t c S e r v i c e N a m e attribute of the adapter
LDAP entry. To use a simple name, the adapter LDAP entry must reside
within the Naming Service search path.

38 PTC Windchill® Adapter Guide


For example, assume that “com.myCompany.myHost.windchill” is the
p t c S e r v i c e N a m e attribute of the adapter LDAP entry in the Naming Service
search path. Then, the following INSTANCE parameter can be used:
<ie:param name="INSTANCE" data="com.myCompany.myHost.windchill"/>

• A fully qualified distinguished name.


When configuring the adapter, you specify the distinguished name in the
Info*Engine Property Administration form. This name consists of the
p t c S e r v i c e N a m e attribute and the other attributes that define the location of
the LDAP entry.
For example, assume that the “com.myCompany.myHost.windchill” entry is
located on “host1” at “dc=IeProps,dc=myHost,dc=myCompany, dc=com,ou=
Applications,o=myCompany.” Then, the following INSTANCE parameter can
be used:
<ie:param name="INSTANCE" data="ldap://host1/
ptcServiceName=com.myCompany.myHost.windchill,
dc=IeProps,dc=myHost,dc=myCompany,dc=com,
ou=Applications,o=myCompany"/>

• A domain-based reference name.


This is just another way of identifying the distinguished name. An
Info*Engine domain-based reference name uses the following format:
ptcServiceName@dc_attributes
○ ptcServiceName is the value of the p t c S e r v i c e N a m e attribute.
○ dc_attributes are the d c attributes that make up the domain location of the
LDAP entry. Each attribute is separated from the next attribute using a
period.
You can only use a domain-based reference name in the following situations:
○ When constructing the LDAP directory in which the Info*Engine entries
are located, you use dc=com as a root-level entry and other d c attributes
for subtree entries
○ The Naming Service . s e r v i c e D o m a i n B a s e property is set to include those
attributes beyond the domain that are used in the distinguished name of the
entry.
For example, assume that the p t c S e r v i c e N a m e attribute value is “com.
myCompany.myHost.windchill” and that the entry is located in the “dc=
myHost,dc=myCompany,dc=com,ou=Applications, o=myCompany” branch,
then the following domain-based reference name could only be used in the
INSTANCE parameter if the . s e r v i c e D o m a i n B a s e property is set to “ou=
Applications,o=myCompany”:
<ie:param name="INSTANCE" data="com.myCompany.myHost.

Using Windchill Adapter Webjects 39


windchill@myHost.myCompany.com"/>

Use the Info*Engine Property Administration utility to set the .


s e r v i c e D o m a i n B a s e property.

Programmatically Discovering the Adapter Name

Best Practice
The previous examples show how you could hard code an INSTANCE
parameter name for your Windchill adapter. This is not a desirable option
when authoring tasks since it means that they cannot be reused on other
installations without being manually modified.
It is best to discover the name of your Windchill adapter using the system
configuration.

If your task is being authored for use with a JCA client, then you should use the
supporting-adapter input parameter to discover which adapters the system
has been configured with.
Not doing so negates the system configuration. In this case your instance
parameter should look like the following example:
<ie:param name="INSTANCE" data="$(@FORM[]supporting-adapter[*])"
valueSeparator=";" delim=";"/>

When the task is invoked from a JCA client, the supporting-adapter input
parameter is supplied by your system based on how it is configured. In general
this is the most common way you should specify INSTANCE parameters for your
Windchill adapter webjects.
If your task is not intended for use with a JCA client, then a common thing to do
is to use the Get-Properties MGT webject to fetch the w t . f e d e r a t i o n . i e . V M N a m e
property and use that as input to your instance parameters.
<ie:webject name="Get-Properties" type="MGT">
<ie:param name="ATTRIBUTE" data="wt.federation.ie.VMName" />
<ie:param name="GROUP_OUT" data="properties" />
</ie:webject>
...
<ie:param name="INSTANCE"
data="$(properties[0]wt.federation.ie.VMName[0])" />

You can also programmatically provide the value for your INSTANCE parameter
by fetching it from Info*Engine either from the VMName or using the system
properties object when running in the servlet.

40 PTC Windchill® Adapter Guide


For example:
<%
String vmName = com.infoengine.au.NamingService.getVMName();
// if running in the servlet engine vmName points to the servlet's
// name and not the adapter's name
// the servlet will be configured with its server name pointing to
// the adapter
vmName = System.getProperty ( vmName + ".ieServerName", vmName );
// now VMName should point to the current Windchill adapter
// regardless of whether the task is being runn in the server or
// servlet engine
%>

...

<ie:param name="INSTANCE" data="$(@FORM[]supporting-adapter[*])"


valueSeparator=";" delim=";" default="<%=vmName%>" />

Windchill Adapter Examples


Using Windchill adapter webjects in Info*Engine tasks provides the framework
for manipulating Windchill data in your application.
This section is intended to provide you with a working example of a set of
Info*Engine tasks that contain Windchill adapter webjects.

Note
The example requires that a Windchill solution has been installed and is
usable.

Setting Up the Example


Before working through the Windchill adapter example tasks, you should be
familiar with the following:
• Info*Engine JSPs and tasks, as described in the Info*Engine User's Guide.
• Info*Engine task delegation and packages, as described in the Info*Engine
User's Guide and the Info*Engine Implementation Guide.
The example files are installed as part of the Windchill installation and reside in
the following subdirectory:
prog_examples/adapter/windchill

Using Windchill Adapter Webjects 41


Installing the Example
To install the example, run the following Ant script from the prog_examples/
adapter/windchill subdirectory:
ant install

Starting the Example


To use the example, you must log in as a Windchill user who can create parts and
documents. Use the following URL to access the example:
http://<hostname>:<port>/<WindchillAppl>/infoengine
/jsp/examples/adapter/windchill/

For example, assume you are using the default port and your host name is
“MyCompany.com,” and the Windchill application name is “Windchill,” then the
following URL starts the example:
http://MyCompany.com/Windchill/infoengine/jsp/examples/adapter/windchill/

Uninstalling the Example


After you have finished using the example, you can remove the example by
running the following Ant script from the prog_examples/adapter/
windchill subdirectory:
ant uninstall

We b j e c t s U s e d i n t h e E x a m p l e
Most of the Windchill adapter webjects are used in one or more of the examples
tasks. To locate a specific webject in the example set, use a search tool to search
the contents of the <Windchill>/tasks/infoengine/examples/
adapter/windchill directory and its subdirectories.

Understanding the Example Content


The example consists of a set of JSPs and a set of tasks:
• The JSPs provide the example user interface and are installed in
<Windchill>/codebase/infoengine/jsp/examples/
adapter/windchill.
• The tasks (and corresponding .delegateInfo property files) that are
installed as a package in the <Windchill>/tasks/infoengine/
examples/adapter/windchill directory and its subdirectories.
Each .delegateInfo property file specifies any default installation
property values that should apply to the directory where it resides and all
subdirectories. For additional information about the use of .delegateInfo
property files and packages, see the Info*Engine User's Guide.

42 PTC Windchill® Adapter Guide


JSPs
The example JSPs serve as an active interface to the set of tasks and are written to
minimize the amount of redundant code used to perform basic actions. There are
only minimal comments in the JSPs as the real examples are in the tasks. In most
cases, the code in the JSP does the following:
1. Creates the “input” group.
2. Invokes the following:
• Dispatch-Tasks webject with the input group
• The name of the command delegate to invoke
• Optionally, a set of parameters and groups with which to invoke the
delegate.
For a more complete discussion of the Dispatch-Tasks webject, see the
Info*Engine User's Guide.

O r g a n i z a t i o n a n d P a c k a g i n g o f Ta s k s
Most tasks within this example set are designed to be invoked using Info*Engine
task delegation. This is done primarily for the following reasons:
• It is an object-oriented approach to task invocation.
Task delegates can be defined at the highest common level within the type
hierarchy to apply to all subtypes. Subtypes having special needs can then
override delegates as necessary. For example, the persistable/
Create.xml task implements very basic object creation for any type that is
a subtype of w t . f c . P e r s i s t a b l e .
Additionally, instances of w t . c o n t e n t . C o n t e n t H o l d e r (for example, wt.doc.
WTDocument or wt.part.WTPart) have special needs and so the
contentHolder/Create.xml task delegate overrides the
persistable/Create.xml task delegate to meet those needs (adding a
C o n t e n t I t e m during creation).
• Applications written against this type of design are easily applied to a
federated environment. That is, if the set of tasks were to be deployed against
multiple systems, client applications could be used to interact with business
objects from multiple systems.
All delegates registered in this package are given simple descriptive names that
reflect the action they perform (for example, Create, Update, Delete, and so on).
To avoid possible conflicts with existing tasks, the command delegate entries
registered for these tasks have been overridden manually placing the text
“Example” before the action name (ExampleCreate, ExampleUpdate,
ExampleDelete, and so on).

Using Windchill Adapter Webjects 43


The highest level directory contains a .delegateInfo file that specifies the
default installation action is to not create command delegates at install time. Each
subdirectory contains a .delegateInfo file that can override this behavior.
The .delegateInfo files in each subdirectory specify whether or not
command delegates should be created at install time and, if so, what
TypeIdentifier the tasks within that directory apply to.
Each task that represents a command delegate to install contains a comment
section that specifies an optional comment and the command delegate name to be
created for that task, for example the contentHolder/Create.xml task
contains a comment like the following:
<!--com.infoengine.delegate.def
@comment This is an example delegate for creating a
ContentHolder object (part/document, etc.).
@delegateName ExampleCreate
-->

This tells the installation tools that instead of the default command delegate name
of “Create” this task is to be installed with a command delegate name of
“ExampleCreate”. The comment is optional and will simply be registered as the
comment within the corresponding command delegate entry in LDAP.

Note
The above comment section is optional. It is included in the example tasks to
override the delegate name that is created for the corresponding task. The
default delegate name is the same as the task, minus the .xml file extension.

Tasks within the util directory do not override the i n s t a l l D e l e g a t e property and
so do no install command delegates. As a result, these tasks can only be invoked
using direct task invocation.

B a s i c Ta s k D e l e g a t i o n I n f o r m a t i o n
Since the tasks in this example are designed to be called using Info*Engine task
delegation, they receive, by default, the following information at invocation time:
• The name of one or more Windchill adapter instances that webjects should be
invoked with.
The adapter names supplied through task delegation always arrive in the
@FORM context group (along with other parameters to the task) in a special
parameter named supporting-adapter. Info*Engine tasks designed to
work with task delegation should always use this value when invoking adapter
webjects.

44 PTC Windchill® Adapter Guide


In Info*Engine terms, the type of adapter is dependant on the architecture and
type of application being developed. In this case, the adapter is always a
Windchill adapter. For the purposes of load balancing, this parameter can be
multi-valued. Because of this, INSTANCE parameter values should be
carefully crafted to allow Info*Engine to perform load balancing/fail-over if
necessary.
Aside from adapter webjects that are participating in a transaction, the
INSTANCE parameters in these example tasks are defined as follows:
<ie:param name="INSTANCE" data="$(@FORM[]supporting-adapter[*])"
valueSeparator=";" delim=";" default="<%=NamingService.getVMName()%>"/>

The '*' in the attribute index tells Info*Engine substitution to expect multiple
values. The fact that this parameter overrides the valueSeparator and
delim attribute values with the ';' character is significant.
This is because Info*Engine task delegation will supply this parameter value
as a fully distinguished LDAP distinguished name (DN). The default separator
character of ',' is a special character within an LDAP DN and its use here
would result in a corrupted INSTANCE value to be used causing Info*Engine
to not discover the desired service.
The example also overrides the default attribute value with
“NamingService.getVMName()”. The NamingService class is imported into
the task in the @page directive at the top of each task. This default is used to
allow the task to be invoked outside of task delegation and to use the current
virtual machine name as the webject processor. This is mainly done so that
tasks can be developed easier and tested outside of the use of Dispatch-Tasks.
• Each task receives a group named “input” that contains the business object
associated with the task invocation. In most cases, the associated JSPs simply
supply the minimal requirements to allow task delegation to function. That is,
the o b i d and c l a s s attributes.
The o b i d attribute contains the Unique Federation Identifier (UFID) of the
object being acted upon.
The c l a s s specifies the Federated Type Identifier (FTI) of the object being
acted upon. In cases where there is no object to act upon (for example, Query),
the associated JSPs will build a minimal UFID that contains only the domain
portion which is enough for Info*Engine task delegation to connect to the
appropriate task and webject processor.
The input group can contain more information (for example, attributes for
object create/update), but whether this is the case is dictated by the
application. In this set of examples, most tasks need only the UFID of the
object being acted upon.

Using Windchill Adapter Webjects 45


• Each task can receive additional parameter values as necessary. The associated
JSPs can provide these values on the Dispatch-Tasks webject parameter named
PARAM. Optionally, an invocation of Dispatch-Tasks can simply reuse the
current @FORM context group by specifying the USEFORM parameter with
a value of true.
• Each task can receive additional Info*Engine groups. Additional group names
to be passed to a task delegate are specified using the GROUP_VDB
parameter on the Dispatch-Tasks webject.

Ta s k C o m m e n t s
Each task in the example contains a simple comment section that gives a basic
description of the task and lists the parameters it accepts.
The comment section is not a requirement but is a common mechanism for
documenting Info*Engine tasks.
Info*Engine task documentation can then be viewed on a running system by
visiting:
http://<hostname>:<port>/<WindchillApp>/infoengine/jsp/tools/doc/index.jsp

The application is organized similar to normal Java documentation.


For more information on writing Info*Engine task comments visit:
http://<hostname>:<port>/<WindchillApp>/infoengine/jsp/tools/doc/howto.html

These comments are intended for use when generating WSDL (Web Services
Definition Language) documents for Info*Engine SOAP clients.

Using SOAP Instead of JSPs


Each task that makes use of the input group explicitly defines an Info*Engine
group parameter named 'input'. As a result, these tasks could be invoked from an
Info*Engine SOAP client. Normal Info*Engine SOAP tasks are more analogous
to static methods on Java objects, thus getting all information from parameter
input and none from the object implicitly being acted upon. To use these example
tasks, an Info*Engine SOAP client would construct the group named 'input' and
pass it as a parameter during SOAP invocation. This is similar to the task use in
JSPs.
Each task is written to return a single Info*Engine group. It is standard procedure
for SOAP tasks that the output group be named using a parameter value named
“group_out”. The default value for this parameter value is always “output”. As a
result all tasks supplied here take an implicit parameter named “GROUP_OUT,”
although they don't explicitly document this parameter in their comment sections.
Several JSPs use this parameter to name the resulting group, particularly in cases
where they may be invoking multiple tasks. This allows them to do so without
having to rename groups to avoid collisions in their local VDB.

46 PTC Windchill® Adapter Guide


Some tasks, such as contentHolder/create.xml, would be exposed as
methods requiring SOAP with attachments methods. However, SOAP with
attachments is not the suggested method for upload and download of binary
content to Info*Engine and is only suitable for small amounts of data. For other
Info*Engine applications, this mechanism is suitable for upload as true streaming
is supported. The suggested mechanism for SOAP clients is to use external HTTP
upload and download handles to move binary data to and from Info*Engine.
Strongly typed parameters (other than string) are documented in the parameter list
as such. The example JSPs, using Dispatch-Tasks, are simply providing these
parameter values as Java Strings that could be coerced into the appropriate type.
The tasks are not expecting the parameter to be strongly typed. SOAP clients
would provide the data strongly typed.
To view a set of tasks that can be used through SOAP to interact with a Windchill
system, see the default “Generic Web Services”. The API of the “Generic Web
Services” is available from the task documentation URL specified in the “Task
Comments” section. These tasks are registered under the TypeIdentifier named
'com.ptc.windchill.ws'. The underlying tasks are installed at:
<Windchill>/tasks/com/ptc/windchill/ws

Using the Example


The initial page displayed is created by the following JSPs and tasks:
• JSPs:
○ document/index.jsp
○ manage.jsp
○ init.jspf
○ table.jsp (Once for checked out objects and once for checked in
objects)
• Tasks:
○ util/LocalDomain.xml
○ util/UserInfo.xml
When you log in to the example, three links appear at the top left of your screen:

• [D o c u m e n t M a n a g e m e n t ]: This link initiates the Document Management page.


The JSPs and tasks involved in operation of the Document Management
content are the following:
○ JSPs:
◆ document/index.jsp

Using Windchill Adapter Webjects 47


◆ manage.jsp
○ Tasks:
◆ contentHolder/Query.xml
• [P a r t M a n a g e m e n t ]: This link initiates the Parts Management page.
The JSPs and tasks involved in the operation of the Part Management content
are the following:
○ JSPs:
◆ manage.jsp
○ Tasks:
◆ part/Query.xml
• [S o u r c e ]: This link initiates the page that contains links to all of the JSPs and
tasks that are involved in the entire demo. The operation of this link is not
relevant to this example description.
Below those three links is a field with the heading M y D o c u m e n t s with two more
links off to the right:

• D e l e t e : Deletes documents that already exist within the example.

○ JSPs:
◆ action.jsp
○ Tasks:
◆ persistable/Delete.xml
• C r e a t e : Creates a new document within the example.

○ JSPs:
◆ document/create.jsp
○ Tasks:
◆ contentHolder/create.xml
The first time you use this example, there are no existing documents.

48 PTC Windchill® Adapter Guide


Click the C r e a t e link to create a document. The C r e a t e D o c u m e n t window opens:

Field Description
Document Name The name the document is listed under in the
example.
Content The local file to be used as the primary content of the
new document.
Browse Opens the window with which you can search for the
file you wish to add to the example.
Create Document Creates the document within the example.

After you have created a document, you can perform actions on the document by
selecting actions from the p i c k a c t i o n drop-down menu. For example, to update the
document you created, you have to check it out. To do this, select the C h e c k O u t
action:

This adds the document to the C h e c k e d O u t section. While a document is checked


out, only the person who checked the document out will be able to access it until
the document is checked back in or the check out is undone.

Using Windchill Adapter Webjects 49


The JSPs and tasks involved in checking out a document are the following:
• JSPs:
○ action.jsp
• Tasks:
○ persistable/CheckOut.xml
After you have checked a document out, you can update it. Locate the p i c k a c t i o n
drop-down menu that corresponds to the document you want to update under the
heading “Checked Out.” Select the A d d / U p d a t e C o n t e n t action:

This opens the A d d / U p d a t e C o n t e n t window.

The A d d / U p d a t e C o n t e n t fields and buttons are described as follows:


Field Description
Role Relates directly to the ROLE parameter on
Add-ContentItems and describes the different
“roles” that are supported for ContentItems.
Content The local file to be used as the primary
content of the new document.
Browse Opens the window with which you can search
for the file you wish to add or update content
with.
Add/Update Content Adds new content or replaces existing content
within the working copy of the document.

50 PTC Windchill® Adapter Guide


After you have found the updated document you need, click A d d / U p d a t e C o n t e n t
to add the new content or replace the existing content within the working copy of
the document.
The JSPs and tasks involved in updating a document are the following:
• JSPs:
○ addContent.jsp
• Tasks:
○ contentHolder/AddContent.xml
After you have updated the document you need to check it back in. Select C h e c k
I n from the drop-down menu that is in the same row as the document you wish to
check in.
The JSPs and tasks involved in checking a document back in are the following:
• JSPs:
○ action.jsp
• Tasks:
○ persistable/CheckIn.xml

Using Windchill Adapter Webjects 51


5
W i n d c h i l l A d a p t e r We b j e c t L i b r a r y
Adapter Webjects Overview .......................................................................................54
Action Webjects ........................................................................................................64
Query Webjects ...................................................................................................... 127

The following sections describe the webjects available through this adapter. Each
webject description includes a description of its use, details of its syntax, and
descriptions of all parameters.

53
Ad a p t e r We b j e c ts O v e r v i e w
Action and query webject details valid for the Windchill adapter are listed below.
Because display and task webjects are available for all adapters, they are
described in the Info*Engine User's Guide. For more detailed syntax information,
see the Info*Engine User's Guide.
For examples that show the use of the action and query webjects described in this
topic, access the installed example set as described in Windchill Adapter
Examples on page 41.
Before their descriptions, parameters are grouped in the following categories:
• Required—The parameter is always required.
• Interdependent—A relationship between the specified parameter and another
parameter exists. For example, the DBUSER and PASSWD parameters are
interdependent. If you specify the DBUSER parameter, then you must also
specify the PASSWD parameter.
A parameter is also interdependent when there is a relationship between the
values in the specified parameter and the use of another parameter. For
example, in the Query-Links webject, the value entered for the SELECTBY
parameter determines which SELECT_ parameters can be used. Therefore,
both the SELECTBY and SELECT_ parameters are listed in the
“Interdependent” column.
• Optional—The parameter is always optional and is not related to another
parameter.

Note
JSPs using Info*Engine substitution syntax can no longer use the ${...}
syntax. Info*Engine now supports an alternate syntax: $(...)
Pre-existing JSPs need to be updated to use the new $(...) syntax or they
fail to compile and do not function as expected.
Pre-existing Info*Engine tasks continue to function as is and do not have to be
changed. All Info*Engine tasks function with either $(...) or ${...}.

A c t i o n We b j e c t S u m m a r y D e s c r i p t i o n s
Action webjects perform specialized actions, such as creating and updating one or
more Windchill objects.

54 PTC Windchill® Adapter Guide


Web je ct Description
Add-ContentItems on Add content to Windchill business objects.
page 64
Apply-Service on page Apply a Windchill service method to one or more
70 objects.
Change-Identity on page Modify attributes of an object that defines the object
75 identity.
CheckIn-Objects on page Check in objects to Windchill.
78
CheckOut-Objects on Check out objects from Windchill.
page 80
Commit-Transaction on End the transaction and commit all changes to the
page 83 database.
Create-Links on page 84 Create new associations between Windchill business
objects.
Create-Objects on page Create a single object and save it in Windchill.
87
Create-TypeInstance on Create an instance of a single object, but does not
page 90 save it in the database.
Delete-ContentItems on Delete content from Windchill business objects.
page 92
Delete-Objects on page Delete Windchill business objects.
95
Emit-Event on page 98 Emit a Windchill workflow event with optional
parameters.
End-Session on page 100 Release resources and rolls back open transactions
associated with a session.
Move-Objects on page Move objects from their current folder to a new
101 folder.
Purge-Cache on page Purge user and group objects from the Windchill
104 principal cache.
Revise-Objects on page Advance the revision name of Windchill business
105 objects.
Rollback-Transaction on Erase all changes made during a session from the
page 108 database.
Start-Session on page Create a session in which webjects are executed

Windchill Adapter Webject Library 55


Web je ct Description
109 within transactions.
Start-Transaction on Start a transaction.
page 110
Start-Workflow on page Start an instance of a workflow process.
111
Subscribe-Objects on Subscribe to a modeled event for specified instances
page 114 of the class and for specified subscribers.
Undo-Checkout on page Release locks and changes associated with objects
118 that were checked out.
Unsubscribe-Objects on Unsubscribe to a modeled event for specified
page 120 instances of the class and for specified subscribers.
Update-Objects on page Update one or more Windchill objects.
123

Que ry Webj ect Su mmary Des cripti ons


Query webjects allow Info*Engine authors to implement solutions that query
Windchill for information and traverse relationships between Windchill objects.
For more information about Info*Engine, webjects, and tasks, see the Info*Engine
User's Guide.
Web je ct Description
All-Versions on page 127 Return information about all versions of a Windchill
object.
Describe-Attributes on Describe the specified attributes for a modeled
page 129 Windchill class.
Expand-References on Retrieve objects in a group referenced by specified
page 131 attributes.
Generate-Report on page Execute a Windchill report template and return its
135 results as an Info*Engine group.
Get-ContentItems on Retrieve content from Windchill business objects.
page 138
Get-IconURL on page Return the URLs of icons associated with a
141 specified set of business objects.
Get-LifeCycles on page Return a group specifying the life cycles of a set of
143 business objects.

56 PTC Windchill® Adapter Guide


Web je ct Description
Get-Properties on page Return a group containing the Windchill
146 configuration properties.
Indexed-Search on page Queries indexed search for the indexed content of
147 Windchill objects (if indexed search is enabled).
Iteration-History on page Return information about the previous iterations of a
150 Windchill object.
LifeCycle-History on Return the life cycle history of a specified Windchill
page 153 object.
List-ContentItems on Query and return the content items for a specified
page 155 Windchill object.
List-FolderContents on Return a list of business objects contained in a folder
page 159 or cabinet
Query-Links on page 161 Navigate associations between Windchill business
objects.
Query-Objects on page Find objects based on specific attribute values.
170
Query-Tree on page 174 Navigate associations between Windchill business
objects, producing a tree of related objects.
Query-Type-Tree on Return a group containing the display names for
page 183 Windchill business object types and their
descendants.
Search-Objects on page Provide federated search capability for searches
185 against multiple types in a single query based on
both modeled and instance-based attribute values.
Validate-User on page Indicate if the user name and credentials specified
190 are valid.
Version-History on page Return information about the previous versions of a
191 Windchill object.

Co m m o n We b j e c t P a r a m e t e r s
The following parameters apply to multiple webjects and have a common
definition.

Windchill Adapter Webject Library 57


See the table under the “Parameters” section of each webject entry to verify
whether a common parameter applies.

Note
There are several additional parameters that are common between webjects,
but which are defined differently depending on how the webject uses that
parameter. Only parameters with a universal definition are described below.

ACCEPT_LANGUAGE
The language preference and locale of Windchill attribute values and
messages. This value determines the correct java.util.Locale used to
process locale-sensitive input and output. ACCEPT_LANGUAGE can be
used when the caller wants to override the automatic locale detection
performed by Info*Engine.
Any locale-sensitive values are parsed and formatted using the locale
corresponding to the language preference. The format is LN-CC-ds:
• “LN” is a two character language identifier as defined by ISO and
Internet standards (for example, en for English, fr for French, de for
German)
• “CC” is a two character country code as defined by ISO and Internet
standards (for example, US for United States, FR for France, DE for
Germany)
• “ds” is a locally defined dialect identifier
You can omit the CC and ds components. Typically, the CC component is
included, and the dialect string is omitted. Common examples are en-US, en-
GB, fr-FR, de-DE, de-CH (German/Switzerland), it-IT (Italian).
This parameter is optional.
This parameter does not apply to all webjects. Check the “Parameters” table
under each webject description.

AT T R I B U T E
The attributes to be returned in the output group for each object. Multiple values
can be specified for this parameter. If this parameter is not specified, a default set
of attributes is returned.
The default set of attributes is configured in the D e f a u l t A t t r i b u t e s property value
of the wt.adapter.delegates.properties file.
If a D e f a u l t A t t r i b u t e s property is not defined, all attributes of all objects are
returned. This parameter is optional.

58 PTC Windchill® Adapter Guide


This parameter does not apply to all webjects. Check the “Parameters” table under
each webject description.

Note
The ATTRIBUTE parameter has a unique definition for the following
webjects:
Describe-Attributes on page 129 Get-Properties on page 146
Expand-References on page 131

A U T H O R I Z AT I O N
A valid HTTP authorization header value. Only HTTP basic authentication is
supported. If specified, this parameter serves as the source of the username
and password to associate with the execution of the webject, and DBUSER
and PASSWD are ignored. If credentials are not supplied through the
AUTHORIZATION, DBUSER, and PASSWD parameters, then Info*Engine
attempts to provide values for these parameters by way of its credentials
mapping mechanism.
The parameter applies to all webjects

Note
In a standard Windchill installation, request signing is always configured. This
means that the server trusts the user name supplied to the webserver for
authentication. This user name is used during webject invocation routed to
Windchill, and the DBUSER, PASSWD, and AUTHORIZATION parameter
values are ignored.
For more information about authentication and user authentication
specifications, see the Info*Engine User's Guide.

DBUSER
The DBUSER webject specifies the user name to use when authenticating to
Windchill. For this parameter to be applied, PASSSWD must also be
specified.
If AUTHORIZATION is specified, DBUSER and PASSWD are ignored. If
credentials are not supplied using the AUTHORIZATION, DBUSER, and
PASSWD parameters, then Info*Engine attempts to provide values for these
parameters by way of its credentials mapping mechanism.

Windchill Adapter Webject Library 59


The parameter applies to all webjects

C O N N E C T I O N _ AT T E M P T S
The maximum number of times to attempt establishing a connection to an
adapter before returning an error. The default value is 1. This parameter is
optional.
If multiple INSTANCE parameter values are specified, the value of
CONNECTION_ATTEMPTS defines the maximum number of times to
iterate through the list of adapter instances.
This parameter is optional and applies to all webjects.

C O N N E C T I O N _ AT T E M P T _ I N T E R VA L
The amount of time, in seconds, to delay between connection attempts when
connections to a Windchill system are failing. The default value is 60
seconds. This parameter is optional.
If multiple INSTANCE parameter values are specified, the value of
CONNECTION_ATTEMPT_INTERVAL defines the number of seconds to
wait between the attempts to iterate through the entire list of adapter
instances.
This parameter is optional and applies to all webjects.

D E S C R I P TO R
The name of an attribute to be included in the command filter of the
underlying command executed by a webject. This parameter can be specified
more than once to identify multiple attribute names to be included in the
filter.
These are the attributes that are returned in database queries executed by the
underlying command. In most cases, this set of attributes is combined with
the set of attributes identified by ATTRIBUTE parameters. However,
ATTRIBUTE parameters also determine the set of attributes returned in each
element of a webject output group. DESCRIPTOR parameters help control
the business object attributes that are selected from the database by Windchill
commands executed by a webject.
This parameter is ignored when GROUP_FILTER is specified.
This parameter does not apply to all webjects. Check the “Parameters” table
under each webject description.

60 PTC Windchill® Adapter Guide


F O R M AT
Specifies whether each attribute returned in the output group for each object
is formatted for the end user. If specified as TRUE, each attribute is
formatted to return the display value. If specified as FALSE, the raw internal
value of each attribute is returned.
The default for this parameter is TRUE. This parameter is optional.
For more information, see Defining Delegates for Attributes Translation on
page 209.
This parameter is optional.
This parameter does not apply to all webjects. Check the “Parameters” table
under each webject description.

G R O U P _ F I LT E R
The name of a group that contains a command filter (a command layer
A t t r i b u t e C o n t a i n e r S p e c ).
When this parameter is specified, it is assumed that the group it references
contains exactly one element, and that element contains an attribute named
command_filter. The value of the attribute is assumed to be an instance
of the Java class
com.ptc.core.meta.container.common.AttributeContai
nerSpec.
When this parameter is specified, the following parameters are ignored:
DESCRIPTOR, INCLUDE_DESCRIPTORS, INCLUDE_CONSTRAINTS,
INCLUDE_ARGS, and NEXT_OP.
This parameter does not apply to all webjects. Check the “Parameters” table
under each webject description.

INCLUDE_ARGS
Specifies whether the underlying commands executed by a webject should
include arguments for database filter attribute context functions in their
results. Accepted values are TRUE or FALSE. The default for this parameter
is FALSE. This parameter is ignored if GROUP_FILTER is specified.
This parameter does not apply to all webjects. Check the “Parameters” table
under each webject description.

INCLUDE_CONSTRAINTS
Specifies whether the underlying commands executed by a webject should
apply constraint information. Accepted values are TRUE or FALSE. The
default for this parameter is FALSE. This parameter is ignored if GROUP_
FILTER is specified.

Windchill Adapter Webject Library 61


This parameter does not apply to all webjects. Check the “Parameters” table
under each webject description.

INC LUDE _DE S CRI PTORS


Specifies whether the underlying commands executed by a webject should
include DESCRIPTOR parameter values in their results. Accepted values are
TRUE or FALSE. The default for this parameter is FALSE. This parameter is
ignored when GROUP_FILTER is specified.
This parameter does not apply to all webjects. Check the “Parameters” table
under each webject description.

I N S TA N C E
Specifies the name of the Windchill adapter. You define the adapter name
when you configure the adapter using the Info*Engine Property
Administration utility. For more information, see Naming the Adapter in
INSTANCE Parameters on page 38.
This parameter is required for all webjects.

NEXT_OP
Specifies the identifier of the next operation to be applied to the objects
returned by a webject. This determines the constraints that are applied when
INCLUDE_CONSTRAINTS is set to TRUE. This parameter is ignored when
GROUP_FILTER is specified.
This parameter does not apply to all webjects. Check the “Parameters” table
under each webject description.

PA S S W D
Specifies the password to use when authenticating to the Windchill system. If
the DBUSER parameter is specified, the PASSWD parameter must also be
specified.
If AUTHORIZATION is specified, DBUSER and PASSWD are ignored. If
credentials are not supplied using the AUTHORIZATION, DBUSER, and
PASSWD parameters, then Info*Engine attempts to provide values for these
parameters by way of its credentials mapping mechanism.
The parameter applies to all webjects

62 PTC Windchill® Adapter Guide


Note
In a standard Windchill installation, request signing is always configured. This
means that the server trusts the user name supplied to the web server for
authentication. This user name is used during webject invocation routed to
Windchill, and the DBUSER, PASSWD, and AUTHORIZATION parameter
values are ignored.
For more information about authentication and user authentication
specifications, see the Info*Engine User's Guide.

REFERENCE_DELIMITER
Specifies the delimiter used to separate attribute references. This parameter is
optional.
This parameter does not apply to all webjects. Check the “Parameters” table
under each webject description.

REFERENCE_EXCEPTIONS
Specifies how a webject that can follow and expand references behaves when
the user does not have access control permission to read the referenced
objects. Valid values for this parameter are TRUE and FALSE.
If a user does not have permission to read a referenced object, then:
• If FORMAT is specified as TRUE and REFERENCE_EXCEPTIONS is
specified as TRUE, an access control exception is thrown.
• If FORMAT is specified as TRUE and REFERENCE_EXCEPTIONS is
specified as FALSE, the string “Secured Information” (or a similar string)
is displayed as the value of the referenced object.
This parameter does not apply to all webjects. Check the “Parameters” table
under each webject description.

REFERENCE_OUTPUT_DELIMITER
The delimiter used to separate attribute references when generating output.
The default value is the value of REFERENCE_DELIMITER. This
parameter is optional.
This parameter does not apply to all webjects. Check the “Parameters” table
under each webject description.

SESSION_ID
The identifier of the session in which the webject is executed.

Windchill Adapter Webject Library 63


This parameter does not apply to all webjects. Check the “Parameters” table
under each webject description.
This parameter is optional for most webjects, but is required for the
following webjects:
Commit-Transaction Rollback-Transaction
End-Session Start-Transaction

U N F O R M AT T E D
A data type (specified as a fully qualified Java class name, for example
java.sql.Timestamp) that should remain unformatted when FORMAT=
true. This is a multi-valued parameter. This parameter is optional.
This parameter does not apply to all webjects. Check the “Parameters” table
under each webject description.

WHERE_CASE_SENSITIVITY
Specifies whether a search is sensitive to case. The default for this parameter
is FALSE, meaning the search is case-insensitive. Specify TRUE to make the
search case-sensitive.
This parameter is only specified if WHERE is also specified.

Ac ti o n We b j e c ts
Action webjects perform specialized actions, such as creating and updating one or
more Windchill objects. Each individual webject topic contains a description of its
use, details of its syntax, and descriptions of all parameters.

Add-ContentItems
The Add-ContentItems webject adds content to Windchill objects implementing
wt.content.ContentHolder (also known as “content holders”). For
example, this webject adds content to objects that have the wt.doc.WTDocument
type or the wt.part.WTPart type.
Depending on the parameters you use, the webject can be used in three separate
scenarios:
• Add content directly from the Info*Engine BLOB stream to the content holder
(OBJECT_REF or TYPE and WHERE).
• Stage content from the Info*Engine BLOB stream to a staging location to be
added later (STAGING_AREA).
• Add content to a content holder from previously staged data (STAGING_
AREA and STAGED_FILE_ID and OBJECT_REF; or TYPE and WHERE).

64 PTC Windchill® Adapter Guide


An exception is issued if you select multiple objects (using the OBJECT_REF or
TYPE and WHERE parameters).
For additional information about using the BLOB_COUNT parameter in adapter
webjects, see the Info*Engine User's Guide.

Syntax
<ie:webject name="Add-ContentItems" type="ACT">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="DESCRIPTION" data="description" />
<ie:param name="DESCRIPTOR" data="attribute_name"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_FILTER" data="group_name"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="NEXT_OP" data="operation_name"/>
<ie:param name="OBJECT_REF" data="ufid"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="PRIMARY" data="[TRUE | FALSE]"/>
<ie:param name="REFERENCE_DELIMITER" data="^" />
<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="REFERENCE_OUTPUT_DELIMITER" data="^" />
<ie:param name="ROLE" data="PRIMARY" />
<ie:param name="SESSION_ID" data="$(session[]session_id[])"/>
<ie:param name="STAGED_FILE_ID" data="file_id"/>
<ie:param name="STAGING_AREA" data="pathname"/>
<ie:param name="TYPE" data="type_name"/>
<ie:param name="UNFORMATED" data="dataType"/>
<ie:param name="UPLOADED_FROM_PATH" data="uploaded_from_path" />
<ie:param name="URL" data="url"/>
<ie:param name="USE_CONTENT_CACHE" data="[TRUE | FALSE]"/>
<ie:param name="WHERE" data="where_clause"/>
<ie:param name="WHERE_CASE_SENSITIVITY" data="[TRUE | FALSE]"/>
</ie:webject>

Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION ACCEPT_LANGUAGE
CONTAINER_REF ATTRIBUTE
DBUSER CONNECTION_ATTEMPTS
DESCRIPTOR CONNECTION_ATTEMPT_
INTERVAL
GROUP_FILTER DESCRIPTION

Windchill Adapter Webject Library 65


Required Interdependent Optional
INCLUDE_ARGS FORMAT
INCLUDE_CONSTRAINTS GROUP_OUT
INCLUDE_DESCRIPTORS REFERENCE_DELIMITER
NEXT_OP REFERENCE_OUTPUT_DELIMITER
OBJECT_REF ROLE
PASSWD SESSION_ID
PRIMARY UNFORMATTED
REFERENCE_EXCEPTIONS USE_CONTENT_CACHE
STAGED_FILE_ID
STAGING_AREA
TYPE
UPLOADED_FROM_PATH
URL
WHERE
WHERE_CASE_
SENSITIVITY

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

C O N TA I N E R _ R E F
A Windchill context to apply the webject against. This parameter accepts the
following types of input:
• The UFID of a Windchill context. Multiple UFIDs can be specified for this
parameter.
• MEMBERSHIP—The query finds only those contexts of which the user is a
member.
When this parameter is specified, the scope of queries executed against the TYPE
and WHERE parameters are restricted to the associated context.

66 PTC Windchill® Adapter Guide


DESCRIPTION
Specifies the description of a corresponding content item. Each instance of the
DESCRIPTION parameter corresponds to a content item and specifies the
description of that content item.
If no DESCRIPTION parameters are specified, then the description of the content
items defaults to an empty string. Similarly, if there are fewer DESCRIPTION
parameters than content items, empty strings are implicitly added to the list of
DESCRIPTION parameters. This parameter is optional.

GROUP_OUT
The name of the output group containing the results.
When the webject is used to stage content items to the server file system (for
example, when STAGING_AREA is specified and neither OBJECT_REF nor
WHERE are specified), then output group contains the identifiers of the staged
content items.
If this parameter is omitted, then the name of the output group is constructed by
appending the string “-Output” to the webject name. This parameter is optional.

OBJECT_REF
The Unique Federation Identifier (UFID) of a Windchill object. This is the content
holder to which you are adding content. You must specify a single value for this
parameter, otherwise an exception is issued. This parameter is mutually exclusive
with TYPE and WHERE. For more information, see Specifying the TYPE and
WHERE Parameters on page 34.

PRI M ARY
This parameter has been replaced by the ROLE parameter. If the ROLE parameter
is specified, then this parameter is ignored.
This parameter remains for backward compatibility. If this parameter is used to
designate the content role, a value of TRUE specifies that the first content item is
designated as primary content. FALSE indicates that the first content item is
designated as secondary content. If there are multiple content items, other content
items are designated as secondary content regardless. The default is FALSE.

ROLE
Specifies the category of a corresponding content item. Each instance of the
ROLE parameter corresponds to a content item and specifies the category that
differentiates contents within a single content holder.
A list of available categories is defined in the Windchill resource bundle
wt.content.ContentRoleTypeRB.rbInfo.

Windchill Adapter Webject Library 67


If no ROLE parameters are specified, then category defaults to SECONDARY.
Similarly, if there are fewer ROLE parameters than content items, SECONDARY
is implicitly added to the list of ROLE parameters. This parameter is optional.

S TA G E D _ F I L E _ I D
The identifier of a previously staged content item. Multiple values can be
specified for this parameter to identify more than one previously staged content
item. When this parameter is specified, the STAGING_AREA parameter must
also be specified. These parameters combine to identify a previously staged
content item that is transferred into the database.

S TA G I N G _ A R E A
Specifies a relative path for an existing file directory located on a server. You can
use this parameter in two ways:
• Temporarily stage content items.
If you do not specify TYPE and WHERE, you can use STAGING_AREA to
identify a directory outside the Windchill database in which to upload content
items. This allows you to temporarily stage large content items to a server file
system before committing them to Windchill. In this case, the webject returns
an output group containing elements that provide identifiers for the staged
content items.
Each element includes a source attribute specifying the name of the source
file, and a staged_file_id attribute providing an identifier for the staged
content item. You can later use this identifier in the STAGED_FILE_ID
parameter to select staged items to transfer into the database.
• Transfer a previously staged content item.
If you specify TYPE or WHERE, you can use STAGING_AREA alongside
the STAGED_FILE_ID parameter to identify and transfer a previously staged
content item. In this case, the webject transfers the content items into the
database and associates them with the content holder object identified by
TYPE and WHERE (or, alternatively, the OBJECT_REF parameter). When all
of the specified staged content items have been transferred successfully, they
are deleted from the staging area.
The STAGING_AREA parameter is enabled only when an administrator has
defined the wt.adapter.stagingAreaRoot property, which identifies the
root file directory path of the staging area. The value specified for the STAGING_
AREA parameter is appended to this property to create an absolute file path to the
directory in which staged content items are stored. The
wt.adapter.stagingAreaRoot property can be set in the
wt.properties file
The absolute path for the staged files is:

68 PTC Windchill® Adapter Guide


stagingAreaRoot/STAGING_AREA/username
• stagingAreaRoot is the value defined for the
wt.adapter.stagingAreaRoot property.
• STAGING_AREA is the value specified for this parameter.
• username is the user name of the current user.
If the current user has one or more alternate user names, you cannot predict or
control which alternate name is used to build the staging area directory path.

TYPE
The object type name. If WHERE is specified, TYPE must also be specified. For
more information, see Specifying the TYPE and WHERE Parameters on page 34.

U P L O A D E D _ F R O M _ PAT H
The path from which a corresponding content item is uploaded. Each instance of
the UPLOADED_FROM_PATH parameter corresponds to a content item and
specifies where the content item is uploaded. This parameter is not applicable to
URL content items.
If no UPLOADED_FROM_PATH parameters are specified or there are fewer
UPLOADED_FROM_PATH parameters than content items, then the path of the
content items defaults to null or the absolute file system path of the staging area
directory. This parameter is optional.

URL
A URL to be added as a content item. For a URL to be specified, either OBJECT_
REF or TYPE and WHERE must also specified.

USE_CONTENT_CACHE
Specifies whether the upload service content cache is used. If the parameter is set
to TRUE, then the content cache is used.
Using the content cache causes the upload service to open HTTP connections to
upload the content to the cache vault, which can cause a performance slowdown
when uploading multiple items at once. The default for this parameter is FALSE.
This parameter is optional.

WHERE
A query expression that selects the content holder where the new content is added.
This parameter is used mutually exclusive with OBJECT_REF. If WHERE is
specified, then TYPE must also be specified. For more information, see
Specifying the TYPE and WHERE Parameters on page 34.

Windchill Adapter Webject Library 69


Apply-Service
The Apply-Service webject invokes a Windchill service. This webject provides a
mechanism for supplying the helper class or service method with parameter values
from the attributes of objects specified as input to the webject. The TYPE and
WHERE, OBJECT_REF, and GROUP_IN parameters specify the input objects.
The specified method can be the name of a static method on the helper class or the
name of a service method accessible through the helper class.
When the invoked service requires parameters, an appropriate number of ARG
parameters must be specified. If any of the argument types are Windchill objects,
then they can be supplied using GROUP_IN or can be selected using OBJECT_
REF or TYPE and WHERE.

Note
The TYPE and WHERE, OBJECT_REF, and GROUP_IN parameters can be
specified in any combination, but at least one must be specified so that the
webject has an input object to which to apply the Windchill service.
When no ARG parameters are specified, then the TYPE and WHERE,
OBJECT_REF, and GROUP_IN parameters are not required.The webject
iterates across all supplied input objects applying the specified Windchill
service to each one. The output group returned by the webject contains the
cumulative results.

Syntax
<ie:webject name="Apply-Service" type="ACT">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ARG" data="argument"/>
<ie:param name="ATTRIBUTE" data="attribute"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="DESCRIPTOR" data="attribute_name"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_FILTER" data="group_name"/>
<ie:param name="GROUP_IN" data="group_in"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INCLUDE_ARGS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_CONSTRAINTS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_DESCRIPTORS" data="[TRUE | FALSE]"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="METHOD" data="method_name"/>
<ie:param name="NEXT_OP" data="operation_name"/>
<ie:param name="OBJECT_REF" data="ufid"/>
<ie:param name="PASSWD" data="password"/>

70 PTC Windchill® Adapter Guide


<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="SERVICE" data="service_name"/>
<ie:param name="SESSION_ID" data="$(session[]session_id[])"/>
<ie:param name="STATIC" data="[TRUE | FALSE]"/>
<ie:param name="TRANSACTION" data="[TRUE | FALSE]"/>
<ie:param name="TYPE" data="type_name"/>
<ie:param name="UNFORMATED" data="dataType" />
<ie:param name="WHERE" data="where_clause"/>
<ie:param name="WHERE_CASE_SENSITIVITY" data="[TRUE | FALSE]"/>
</ie:webject>

Parameters
Required Interdependent Optional
INSTANCE ARG ACCEPT_LANGUAGE
GROUP_ AUTHORIZATION ATTRIBUTE
OUT
METHOD CONTAINER_REF CONNECTION_ATTEMPTS
SERVICE DBUSER CONNECTION_ATTEMPT_
INTERVAL
DESCRIPTOR FORMAT
GROUP_FILTER SESSION_ID
GROUP_IN STATIC
INCLUDE_ARGS TRANSACTION
INCLUDE_CONSTRAINTS UNFORMATTED
INCLUDE_DESCRIPTORS
NEXT_OP
OBJECT_REF
PASSWD
REFERENCE_EXCEPTIONS
TYPE
WHERE
WHERE_CASE_
SENSITIVITY

Windchill Adapter Webject Library 71


Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

ARG
An argument of the method named by the METHOD parameter. Multiple values
can be specified for this parameter in order to supply all of the arguments required
by the method. The order and number of the values specified must match the order
and number required by the service method.
For example, if a service method requires three arguments of type
wt.part.WTPart, java.lang.String, and int, then the webject must
have three ARG parameters. These parameters must be specified in the same order
as the formal arguments of the service method.
The format of each ARG parameter value is as follows: type=name-or-
value
• type specifies a Java class name or the name of a Java primitive type, for
example wt.part.WTPart, java.lang.String, and int. The type
must match the type of the corresponding argument of the service method.
• name-or-value specifies either a literal value or the name of an attribute
to retrieve from the current input object being processed by the webject.
○ If an attribute name is specified, the named attribute is retrieved from the
current input object and passed to the service method as the value of its
argument.
○ A literal value is a value enclosed by single quotes. When a literal value is
specified, the value itself is passed to the service method as the value of its
argument.
In either case, if type specifies the name of a class that is a subclass of
wt.fc.Persistable, then the webject assumes that name-or-value
specifies the UFID of an object. The webject retrieves the object automatically
and passes the object to the service method as the value of its argument.
For example, to retrieve the object referenced by the OBID attribute of the current
input object and pass it to the service method as an argument of type wt.part.
WTPart, specify the parameter in the following format:
<ie:param name="ARG" data="wt.part.WTPart=obid"/>

72 PTC Windchill® Adapter Guide


To retrieve the object referenced by the m a s t e r R e f e r e n c e attribute of the current
input object and pass it to the service method as an argument of type wt.doc.
WTDocumentMaster, specify the parameter in the following format:
<ie:param name="ARG" data="wt.doc.WTDocumentMaster=masterReference"/>

To pass a literal string to the service method, specify the parameter in the
following format:
<ie:param name="ARG" data="java.lang.String='foo'"/>

C O N TA I N E R _ R E F
A Windchill context to apply the webject against. This parameter accepts the
following types of input:
• The UFID of a Windchill context. Multiple UFIDs can be specified for this
parameter.
• MEMBERSHIP—The query finds only those contexts of which the user is a
member.
When this parameter is specified, the scope of queries executed against the TYPE
and WHERE parameters are restricted to the associated context.

GROUP_IN
The name of the group containing the objects to which the Windchill service is
applied. This parameter can be specified instead of or in addition to TYPE,
WHERE, or OBJECT_REF.
If TYPE, WHERE, or OBJECT_REF are not specified, then GROUP_IN must be
specified.

GROUP_OUT
The name of the output group that contains the results produced by the service
method. If the service method returns business objects (objects that are subclasses
of wt.fc.Persistable), then each element of the output group is the normal
representation of an object.
If the service method returns another type of result (for example, a simple string),
then the output group contains one element with two attributes named c l a s s and
result.
• The c l a s s attribute specifies the object type of the r e s u l t attribute.
• The r e s u l t attribute specifies the actual result value.
This parameter is required.

Windchill Adapter Webject Library 73


METHOD
The name of the method to be applied to the input objects. This can be either the
name of a service method to which the helper class provides access or the name of
a static method defined on the helper class itself. A no argument constructor must
exist for the class that gets instantiated, even if the method that you are calling is a
static method. This is a required parameter.

OBJECT_REF
The Unique Federation Identifier (UFID) of a Windchill object. Multiple values
can be specified for this parameter to identify multiple objects.
This parameter can be used instead of or in combination with WHERE. If
WHERE is not specified, then OBJECT_REF must be specified.

SE RVI CE
The fully qualified Java class name of the helper that provides access to the
Windchill service. For example, wt.part.WTPartHelper, wt.folder.FolderHelper,
wt.vc.VersionControlHelper, wt.doc.WTDocumentHelper, and so on. This
parameter is required.

S TAT I C
Specifies whether the method name specified by the METHOD parameter is the
name of a static method defined on the helper class itself or the name of a service
method. Valid values for this parameter are TRUE and FALSE.
If this parameter is specified as TRUE, the method is a static method of the helper
class itself. If the parameter is specified as FALSE, then the method is a service
method. The default for this parameter is FALSE.
This parameter is optional.

TRANSACTION
Specifies whether the method should be invoked within the context of a database
transaction. Valid values for this parameter are TRUE and FALSE.
If this parameter is specified as FALSE, then the method is not invoked within the
context of a database transaction. If this parameter is specified as TRUE, then the
method is invoked within the context of a database transaction, and changes are
automatically rolled back when the method can not be invoked successfully to all
specified input objects.

74 PTC Windchill® Adapter Guide


Note
If the method specified by the METHOD parameter creates or updates
information in the database and multiple input objects are specified, then you
should specify this parameter as TRUE. This ensures that the database is left
unchanged in case the method cannot be invoked successfully to one or more
of the input objects.

The default for this parameter is FALSE. This parameter is optional.

TYPE
The object type name. If WHERE is specified, TYPE must also be specified. For
more information, see Specifying the TYPE and WHERE Parameters on page 34.

WHERE
A query expression identifying the objects for which to query. This parameter can
be used instead of or in combination with OBJECT_REF.
If OBJECT_REF is not specified, WHERE must be specified. If WHERE is
specified, TYPE must also be specified. For more information, see Specifying the
TYPE and WHERE Parameters on page 34.

Change-Identity
This webject modifies attributes that define the identity of an object. For example,
the N a m e and N u m b e r attributes define the identity of parts and documents in
Windchill.
Windchill does not allow attributes defining identity to be updated using a normal
update operation. Consequently, the Update-Objects webject cannot be used to
update these attributes. Instead, the Change-Identity webject interfaces with the
Windchill identity service to update these special attributes.

Syntax
<ie:webject name="Change-Identity" type="ACT">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="DESCRIPTOR" data="attribute_name"/>
<ie:param name="FIELD" data="name=value"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>

Windchill Adapter Webject Library 75


<ie:param name="GROUP_FILTER" data="group_name"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INCLUDE_ARGS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_CONSTRAINTS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_DESCRIPTORS" data="[TRUE | FALSE]"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="NEXT_OP" data="operation_name"/>
<ie:param name="OBJECT_REF" data="ufid"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="REFERENCE_DELIMITER" data="^" />
<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="REFERENCE_OUTPUT_DELIMITER" data="^" />
<ie:param name="SESSION_ID" data="$(session[]session_id[])"/>
<ie:param name="TYPE" data="type_name"/>
<ie:param name="UNFORMATED" data="dataType" />
<ie:param name="WHERE" data="where_clause"/>
<ie:param name="WHERE_CASE_SENSITIVITY" data="[TRUE | FALSE]"/>
</ie:webject>

Parameters
Required Interdependent Optional
FIELD AUTHORIZATION ACCEPT_LANGUAGE
INSTANCE CONTAINER_REF ATTRIBUTE
DBUSER CONNECTION_ATTEMPTS
DESCRIPTOR CONNECTION_ATTEMPT_
INTERVAL
GROUP_FILTER FORMAT
INCLUDE_ARGS GROUP_OUT
INCLUDE_CONSTRAINTS REFERENCE_DELIMITER
INCLUDE_DESCRIPTORS REFERENCE_OUTPUT_DELIMITER
NEXT_OP SESSION_ID
OBJECT_REF UNFORMATTED
PASSWD
REFERENCE_EXCEPTIONS
TYPE
WHERE
WHERE_CASE_
SENSITIVITY

76 PTC Windchill® Adapter Guide


Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

C O N TA I N E R _ R E F
A Windchill context to apply the webject against. This parameter accepts the
following types of input:
• The UFID of a Windchill context. Multiple UFIDs can be specified for this
parameter.
• MEMBERSHIP—The query finds only those contexts of which the user is a
member.
When this parameter is specified, the scope of queries executed against the TYPE
and WHERE parameters are restricted to the associated context.

FIELD
The name and new value of an identity attribute. Multiple values can be specified
for this parameter to define new values for identity attributes in cases where more
than one attribute combine to create the identity for an object. This parameter is
required.

GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

OBJECT_REF
The Unique Federation Identifier (UFID) of a Windchill object. This parameter
can only be specified once. If WHERE is specified, then OBJECT_REF must not
be specified.

TYPE
The object type name. If WHERE is specified, TYPE must also be specified. For
more information, see Specifying the TYPE and WHERE Parameters on page 34.

Windchill Adapter Webject Library 77


WHERE
Specifies a query expression identifying the objects for which to query. If
OBJECT_REF is specified, then WHERE must not be specified. If WHERE is
specified, then TYPE must also be specified. For more information, see
Specifying the TYPE and WHERE Parameters on page 34.

CheckIn-Objects
The CheckIn-Objects webject checks in objects to the Windchill database. The
objects must have been checked out previously (see the CheckOut-Objects
webject). If an error occurs during checkin, the webject returns an error message
and no objects are checked in.

Syntax
<ie:webject name="CheckIn-Objects" type="ACT">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]Authorization[0]"/>
<ie:param name="COMMENT" data="comment" />
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="DESCRIPTOR" data="attribute_name"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_FILTER" data="group_name"/>
<ie:param name="GROUP_IN" data="group_in"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INCLUDE_ARGS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_CONSTRAINTS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_DESCRIPTORS" data="[TRUE | FALSE]"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="NEXT_OP" data="operation_name"/>
<ie:param name="OBJECT_REF" data="ufid"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="REFERENCE_DELIMITER" data="^" />
<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="REFERENCE_OUTPUT_DELIMITER" data="^" />
<ie:param name="SESSION_ID" data="$(session[]session_id[])"/>
<ie:param name="TYPE" data="type_name"/>
<ie:param name="UNFORMATED" data="dataType"/>
<ie:param name="WHERE" data="(apple_name"/>
<ie:param name="WHERE_CASE_SENSITIVITY" data="[TRUE | FALSE]"/>
</ie:webject>

Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION ACCEPT_LANGUAGE
CONTAINER_REF ATTRIBUTE

78 PTC Windchill® Adapter Guide


Required Interdependent Optional
DBUSER COMMENT
DESCRIPTOR CONNECTION_ATTEMPTS
GROUP_FILTER CONNECTION_ATTEMPT_
INTERVAL
INCLUDE_ARGS FORMAT
INCLUDE_CONSTRAINTS GROUP_IN
INCLUDE_DESCRIPTORS GROUP_OUT
NEXT_OP REFERENCE_DELIMITER
OBJECT_REF REFERENCE_OUTPUT_DELIMITER
PASSWD SESSION_ID
REFERENCE_EXCEPTIONS UNFORMATTED
TYPE
WHERE
WHERE_CASE_
SENSITIVITY

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

COMMENT
A text string to be added as comment. This parameter is optional.

C O N TA I N E R _ R E F
A Windchill context to apply the webject against. This parameter accepts the
following types of input:
• The UFID of a Windchill context. Multiple UFIDs can be specified for this
parameter.
• MEMBERSHIP—The query finds only those contexts of which the user is a
member.

Windchill Adapter Webject Library 79


When this parameter is specified, the scope of queries executed against the TYPE
and WHERE parameters are restricted to the associated context.

GROUP_IN
The name of an input group containing one UFID per element (OBID attribute).
This parameter is optional.

GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

OBJECT_REF
The Unique Federation Identifier (UFID) of a Windchill object. Multiple values
can be specified for this parameter to identify multiple objects.
This parameter can be used instead of or in combination with WHERE. If
WHERE is not specified, then OBJECT_REF must be specified.

TYPE
The object type name. If WHERE is specified, TYPE must also be specified. For
more information, see Specifying the TYPE and WHERE Parameters on page 34.

WHERE
A query expression identifying the objects for which to query. This parameter can
be used instead of or in combination with OBJECT_REF.
If OBJECT_REF is not specified, WHERE must be specified. If WHERE is
specified, TYPE must also be specified. For more information, see Specifying the
TYPE and WHERE Parameters on page 34.

CheckOut-Objects
The CheckOut-Objects webject checks out objects from Windchill.
Typically, objects are checked out in order to update them in various ways, and to
maintain a long-term exclusive lock on them to prevent others from modifying
them until they are checked in (see the CheckIn-Objects webject). If an error
occurs during checkout, the webject returns an error message and no object is
checked out.
If GROUP_IN is specified and its value is equal to GROUP_OUT and no other
input parameters are specified, then the UFIDs within the input group are updated
with the working copy UFIDs. This allows the output of CheckOut-Objects to be
used as input to other webjects (for example, Update-Objects) with minimal effort.

80 PTC Windchill® Adapter Guide


Syntax
<ie:webject name="CheckOut-Objects" type="ACT">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CHECKOUT_FOLDER_GROUP"
data="check_out_folder"/>
<ie:param name="COMMENT" data="string"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="DESCRIPTOR" data="attribute_name"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_FILTER" data="group_name"/>
<ie:param name="GROUP_IN" data="group_in"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INCLUDE_ARGS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_CONSTRAINTS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_DESCRIPTORS" data="[TRUE | FALSE]"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="NEXT_OP" data="operation_name"/>
<ie:param name="OBJECT_REF" data="ufid"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="REFERENCE_DELIMITER" data="^" />
<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="REFERENCE_OUTPUT_DELIMITER" data="^" />
<ie:param name="RESERVED_COPY_GROUP" data="reserved_copy"/>
<ie:param name="SESSION_ID" data="$(session[]session_id[])"/>
<ie:param name="TYPE" data="type_name"/>
<ie:param name="UNFORMATTED" data="dataType" />
<ie:param name="WHERE" data="appl_name"/>
<ie:param name="WHERE_CASE_SENSITIVITY" data="[TRUE | FALSE]"/>
</ie:webject>

Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION ACCEPT_LANGUAGE
CONTAINER_REF ATTRIBUTE
DBUSER CONNECTION_ATTEMPTS
DESCRIPTOR CONNECTION_ATTEMPT_
INTERVAL
GROUP_FILTER CHECKOUT_FOLDER_ GROUP
INCLUDE_ARGS COMMENT
INCLUDE_CONSTRAINTS FORMAT
INCLUDE_DESCRIPTORS GROUP_IN
NEXT_OP GROUP_OUT

Windchill Adapter Webject Library 81


Required Interdependent Optional
OBJECT_REF REFERENCE_DELIMITER
PASSWD REFERENCE_OUTPUT_DELIMITER
REFERENCE_EXCEPTIONS RESERVED_COPY_GROUP
TYPE SESSION_ID
WHERE UNFORMATTED
WHERE_CASE_
SENSITIVITY

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

CHECKOUT_FOLDER_GROUP
The checkout folder of the checked out object. If this parameter is specified, then
a reference is returned to the folder in which the object or objects are checked out.
This parameter is optional.

COMMENT
Any text string to be added as comment. This parameter is optional.

C O N TA I N E R _ R E F
A Windchill context to apply the webject against. This parameter accepts the
following types of input:
• The UFID of a Windchill context. Multiple UFIDs can be specified for this
parameter.
• MEMBERSHIP—The query finds only those contexts of which the user is a
member.
When this parameter is specified, the scope of queries executed against the TYPE
and WHERE parameters are restricted to the associated context.

GROUP_IN
The name of an input group containing one UFID per element (OBID attribute).
This parameter is optional.

82 PTC Windchill® Adapter Guide


GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

OBJECT_REF
The Unique Federation Identifier (UFID) of a Windchill object. Multiple values
can be specified for this parameter to identify multiple objects.
This parameter can be used instead of or in combination with WHERE. If
WHERE is not specified, then OBJECT_REF must be specified.

RES E RVE D_C O PY _G RO UP


The reserved copy of the checked out object. This group contains the original
objects, not the working objects returned in the GROUP_OUT. This parameter is
optional.

TYPE
The object type name. If WHERE is specified, TYPE must also be specified. For
more information, see Specifying the TYPE and WHERE Parameters on page 34.

WHERE
A query expression identifying the objects for which to query. This parameter can
be used instead of or in combination with OBJECT_REF.
If OBJECT_REF is not specified, WHERE must be specified. If WHERE is
specified, TYPE must also be specified. For more information, see Specifying the
TYPE and WHERE Parameters on page 34.

C o m m i t - Tr a n s a c t i o n
The Commit-Transaction webject specifies the end of a successfully executed
transaction. All changes made since the most recently executed Start-Transaction
webject with the same SESSION_ID parameter value are committed to the
database, and the transaction is ended.

Syntax
<ie:webject name="Commit-Transaction" type="ACT">
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="SESSION_ID" data="$(session[]session_id[])"/>
</ie:webject>

Windchill Adapter Webject Library 83


Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION CONNECTION_ATTEMPTS
SESSION_ DBUSER CONNECTION_ATTEMPT_
ID INTERVAL
PASSWD

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

SESSION_ID
The identifier of the session in which the webject is executed.
This parameter is required.

Create-Links
The Create-Links webject creates new associations between Windchill objects.
The associations are created with the specified attribute values and stored in the
Windchill database.
When creating a single object, this webject is typically called with the FROM_
OBJECT_REF and TO_OBJECT_REF parameters. When creating multiple
objects this webject is typically called with the GROUP_IN parameter.
All objects are created within a transaction. If any object creation fails, then no
objects are created.

Syntax
<ie:webject name="Create-Links" type="ACT">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute_name"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="DESCRIPTOR" data="attribute_name"/>
<ie:param name="FIELD" data="name=value"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="FROM_OBJECT_REF" data="ufid"/>
<ie:param name="GROUP_IN" data="group_in"/>

84 PTC Windchill® Adapter Guide


<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INCLUDE_ARGS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_CONSTRAINTS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_DESCRIPTORS" data="[TRUE | FALSE]"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="NEXT_OP" data="operation_name"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="REFERENCE_DELIMITER" data="^" />
<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="REFERENCE_OUTPUT_DELIMITER" data="^" />
<ie:param name="SESSION_ID" data="$(session[]session_id[])"/>
<ie:param name="TO_OBJECT_REF" data="ufid"/>
<ie:param name="TYPE" data="type_name"/>
<ie:param name="UNFORMATTED" data="dataType" />
</ie:webject>

Parameters
Required Interdependent Optional
FROM_OBJECT_ AUTHORIZATION ACCEPT_LANGUAGE
REF
INSTANCE DBUSER ATTRIBUTE
TYPE GROUP_IN CONNECTION_ATTEMPTS
INCLUDE_ARGS CONNECTION_ATTEMPT_
INTERVAL
INCLUDE_CONSTRAINTS FIELD
INCLUDE_DESCRIPTORS FORMAT
NEXT_OP GROUP_OUT
PASSWD REFERENCE_DELIMITER
REFERENCE_EXCEPTIONS REFERENCE_OUTPUT_DELIMITER
TO_OBJECT_REF SESSION_ID
UNFORMATTED

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

Windchill Adapter Webject Library 85


FIELD
An attribute and associated value to be included in the requested operation. The
attribute and associated value are separated by an equals sign. For example:
<ie:param name="FIELD" data="source=wt.part.Source.make"/>

The attribute and value are dependent on the object and operation being
performed. This parameter is optional. This parameter can have multiple values.

FROM_OBJECT_REF
The Unique Federation Identifier (UFID) of an existing object that serves as the
primary object of the association (role A). The working copy of the object must be
specified, and the object must already be checked out. This parameter is required.

GROUP_IN
Specifies a group containing objects. For each element of the group that contains
an object ID (OBID) attribute, a new association is created.
• The primary object of each association is the object specified by FROM_
OBJECT_REF.
• Secondary objects are the objects specified by the OBID attribute value of
each element in the group specified by GROUP_IN.
Thus, an association is created between the object specified by FROM_OBJECT_
REF and each object specified in GROUP_IN.
If GROUP_IN is not specified, then the TO_OBJECT_REF parameter must be
specified.

GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

TO _ O B J E C T _ R E F
Specifies the UFID of an existing object that serves as the other object of the
association.
• The primary objects in each association are the objects specified by the value
of FROM_OBJECT_REF. An association is created between the object
specified by FROM_OBJECT_REF and each object specified by the TO_
OBJECT_REF values.
• If not specified, the GROUP_IN parameter must be specified.
This parameter is multi-valued.

86 PTC Windchill® Adapter Guide


If the UFID of a non-primary object indicates that the object actually resides in a
remote information system (and not the local Windchill system), the association is
created using a FederatedLink object. In addition, a LightweightProxy object is
also created, if necessary, to serve as a local reference to the remote object. The
LightweightProxy object is registered as the non-primary role of the association.

TYPE
Specifies the type of link to create. This parameter is required.

Create-Objects
The Create-Objects webject creates one or more instances of Windchill objects
populated with the corresponding attribute values and stores them in the Windchill
database.
• When creating a single object, this webject is typically called with the TYPE
and FIELD parameters.
• When creating multiple objects, this webject is typically called with the
GROUP_IN parameter.
All objects are created within a transaction. If any object creation fails, no objects
are created.

Syntax
<ie:webject name="Create-Objects" type="ACT">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="DESCRIPTOR" data="attribute_name"/>
<ie:param name="FIELD" data="field"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_FILTER" data="group_name"/>
<ie:param name="GROUP_IN" data="group_in"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INCLUDE_ARGS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_CONSTRAINTS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_DESCRIPTORS" data="[TRUE | FALSE]"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="NEXT_OP" data="operation_name"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="SESSION_ID" data="$(session[]session_ID[])"/>
<ie:param name="TYPE" data="type_name"/>
</ie:webject>

Windchill Adapter Webject Library 87


Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION ACCEPT_LANGUAGE
CONTAINER_REF ATTRIBUTE
DBUSER CONNECTION_ATTEMPTS
DESCRIPTOR CONNECTION_ATTEMPT_
INTERVAL
FIELD FORMAT
GROUP_FILTER GROUP_OUT
GROUP_IN SESSION_ID
INCLUDE_ARGS
INCLUDE_CONSTRAINTS
INCLUDE_DESCRIPTORS
NEXT_OP
PASSWD
REFERENCE_EXCEPTIONS
TYPE

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

AT T R I B U T E
The attributes to be returned in the output group for each object. Multiple values
can be specified for this parameter. If this parameter is not specified, a default set
of attributes is returned.
The default set of attributes is configured in the D e f a u l t A t t r i b u t e s property value
of the wt.adapter.delegates.properties file.
If a D e f a u l t A t t r i b u t e s property is not defined, all attributes of all objects are
returned. This parameter is optional.

88 PTC Windchill® Adapter Guide


Note
You must specify a context if the value of the f o l d e r attribute is the folder
name.

C O N TA I N E R _ R E F
The UFID of a Windchill context with which to associate the created objects. All
objects are created in this context.

FIELD
An attribute and associated value to be included in the requested operation. The
attribute and associated value are separated by an equals sign. For example:
<ie:param name="FIELD" data="source=wt.part.Source.make"/>

The attribute and value are dependent on the object and operation being
performed. This parameter is optional. This parameter can have multiple values.

GROUP_IN
The input group containing objects to create. Each element represents an object to
be created.
The type of each object is determined by the value of the CLASS attribute value
within a given element. If an element does not have a CLASS attribute value, an
exception is thrown.
All attributes other than CLASS and OBID are used as the attribute values on the
object being created. If attribute values are Java objects, then they must match the
appropriate type for the attribute being populated.
If an attribute value is a string, but the corresponding attribute being populated is
of a different type, then attribute translation is attempted and the string value must
conform to the string representation of the corresponding Java object.

GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

TYPE
The name of the type of object or objects. If GROUP_IN is specified, then TYPE
is not necessary, since object types are controlled by the CLASS attribute value of
an element.

Windchill Adapter Webject Library 89


C r e a t e - Ty p e I n s t a n c e
Creates one or more type instances, but does not store them in the Windchill
database.
The ATTRIBUTE and FIELD parameters are processed first to construct a single
type instance. This processing occurs if either FIELD is specified or GROUP_IN
is not specified.
The FIELD parameter can be used for the following:
• Specify values to populate in the resulting type instance.
• Override default values for a given attribute specified in the list of
ATTRIBUTE parameter values.
If specified, the contents of GROUP_IN are processed second. One type instance
per element within the GROUP_IN is constructed and added to the output group.
The attributes in each resulting type instance are determined by combining the
ATTRIBUTE parameter values with the attributes found in a given element.
Similar to the FIELD parameter, each attribute value in an element serves to
populate or override default values in the resulting type instance. Attributes named
CLASS or OBID within any element of the GROUP_IN parameter are ignored.

Syntax
<ie:webject name="Create-TypeInstance" type="ACT">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="FIELD" data="field"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_IN" data="group_in"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INCLUDE_ARGS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_CONSTRAINTS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_DESCRIPTORS" data="[TRUE | FALSE]"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="NEXT_OP" data="operation_name"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="SESSION_ID" data="$(session[]session_id[])"/>
<ie:param name="TYPE" data="type_name"/>
<ie:param name="UNFORMATED" data="dataType"/>
</ie:webject>

90 PTC Windchill® Adapter Guide


Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION ACCEPT_LANGUAGE
TYPE CONTAINER_REF ATTRIBUTE
DBUSER CONNECTION_ATTEMPTS
PASSWD CONNECTION_ATTEMPT_
INTERVAL
INCLUDE_ARGS FIELD
INCLUDE_CONSTRAINTS FORMAT
INCLUDE_DESCRIPTORS GROUP_IN
NEXT_OP GROUP_OUT
SESSION_ID
UNFORMATTED

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

C O N TA I N E R _ R E F
A Windchill context to apply the webject against. This parameter accepts the
following types of input:
• The UFID of a Windchill context. Multiple UFIDs can be specified for this
parameter.
• MEMBERSHIP—The query finds only those contexts of which the user is a
member.
When this parameter is specified, the scope of queries executed against the TYPE
parameter is restricted to the associated context.

FIELD
The attributes and associated values to be created (global attribute values and or
attribute values of subtypes). This parameter is optional.

Windchill Adapter Webject Library 91


For global attributes, just the name and value of the desired attribute is specified.
For example:
"source=wt.part.Source.make."

The FIELD parameter can be used for the following:


• Specify values to populate in the resulting type instance.
• Override default values for a given attribute specified in the list of
ATTRIBUTE parameter values.

GROUP_IN
Input group containing attributes to populate the new type instance. This
parameter is optional.
Similar to the FIELD parameter, each attribute value in an element serves to
populate or override default values in the resulting TypeInstance. Attributes
named CLASS or OBID within any element of the GROUP_IN parameter are
ignored.

GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

TYPE
The object type name. If WHERE is specified, TYPE must also be specified. For
more information, see Specifying the TYPE and WHERE Parameters on page 34.

Delete-ContentItems
Deletes content items from Windchill objects that are content holders, such as wt.
doc.WTDocment or wt.part.WTPart, or deletes previously staged content. If
deleting previously staged content, this webject returns an empty output group.

Syntax
<ie:webject name="Delete-ContentItems" type="ACT">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="CONTENT_ITEM" data="item"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="DESCRIPTOR" data="attribute_name"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_FILTER" data="group_name"/>

92 PTC Windchill® Adapter Guide


<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INCLUDE_ARGS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_CONSTRAINTS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_DESCRIPTORS" data="[TRUE | FALSE]"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="NEXT_OP" data="operation_name"/>
<ie:param name="OBJECT_REF" data="ufid"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="REFERENCE_DELIMITER" data="^" />
<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="REFERENCE_OUTPUT_DELIMITER" data="^" />
<ie:param name="SESSION_ID" data="$(session[]session_id[])"/>
<ie:param name="STAGED_FILE_ID" data="file_id" />
<ie:param name="STAGING_AREA" data="/" />
<ie:param name="TYPE" data="type_name"/>
<ie:param name="UNFORMATED" data="dataType"/>
<ie:param name="WHERE" data="where_clause"/>
<ie:param name="WHERE_CASE_SENSITIVITY" data="[TRUE | FALSE]"/>
</ie:webject>

Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION ACCEPT_LANGUAGE
CONTAINER_REF ATTRIBUTE
CONTENT_ITEM CONNECTION_ATTEMPTS
DBUSER CONNECTION_ATTEMPT_
INTERVAL
DESCRIPTOR FORMAT
GROUP_FILTER GROUP_OUT
INCLUDE_ARGS REFERENCE_DELIMITER
INCLUDE_CONSTRAINTS REFERENCE_OUTPUT_DELIMITER
INCLUDE_DESCRIPTORS SESSION_ID
NEXT_OP UNFORMATTED
OBJECT_REF
PASSWD
REFERENCE_EXCEPTIONS
STAGED_FILE_ID
STAGING_AREA
TYPE

Windchill Adapter Webject Library 93


Required Interdependent Optional
WHERE
WHERE_CASE_
SENSITIVITY

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

C O N TA I N E R _ R E F
A Windchill context to apply the webject against. This parameter accepts the
following types of input:
• The UFID of a Windchill context. Multiple UFIDs can be specified for this
parameter.
• MEMBERSHIP—The query finds only those contexts of which the user is a
member.
When this parameter is specified, the scope of queries executed against the TYPE
and WHERE parameters are restricted to the associated context.

CONTENT_ITEM
The UFID of the content item to be deleted. The content item is contained by the
content holder object specified by the TYPE, WHERE, or OBJECT_REF
parameters. The value for this parameter can be the OBID attribute returned in
each element of the GROUP_OUT produced by the List-ContentItems webject. If
STAGED_FILE_ID is not specified, then this parameter is required.

GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

OBJECT_REF
The Unique Federation Identifier (UFID) of a Windchill object. Multiple values
can be specified for this parameter to identify multiple objects.
This parameter can be used instead of or in combination with WHERE. If
WHERE is not specified, then OBJECT_REF must be specified.

94 PTC Windchill® Adapter Guide


S TA G E D _ F I L E _ I D
The identifier of a previously staged content item to delete. The webject then
deletes the specified staged content items and returns an empty output group. This
parameter can have multiple values.

S TA G I N G _ A R E A
A relative path to a file directory located on a server where content items that have
been previously staged are now located.
The STAGING_AREA parameter is enabled only when an administrator has
defined the wt.adapter.stagingAreaRoot property, which identifies the
root file directory path of the staging area. The value specified for the STAGING_
AREA parameter is appended to this property to create an absolute file path to the
directory in which staged content items are stored. The
wt.adapter.stagingAreaRoot property can be set in the
wt.properties file
The absolute path for the staged files is:
stagingAreaRoot/STAGING_AREA/username
• stagingAreaRoot is the value defined for the
wt.adapter.stagingAreaRoot property.
• STAGING_AREA is the value specified for this parameter.
• username is the user name of the current user.
If the current user has one or more alternate user names, you cannot predict or
control which alternate name is used to build the staging area directory path.

TYPE
The object type name. If WHERE is specified, TYPE must also be specified. For
more information, see Specifying the TYPE and WHERE Parameters on page 34.

WHERE
A query expression that selects the content holder object from which content will
be deleted. This parameter can be used instead of or in combination with
OBJECT_REF.
If OBJECT_REF is not specified, WHERE must be specified. If WHERE is
specified, TYPE must also be specified. For more information, see Specifying the
TYPE and WHERE Parameters on page 34.

Delete-Objects
The Delete-Objects webject deletes Windchill objects. This webject can delete any
object that Windchill allows to be deleted by its normal rules.

Windchill Adapter Webject Library 95


The objects are first fetched or queried for. As each object is deleted it is added to
the output group. The operations are automatically performed within a transaction.
If one delete fails, all deletes are rolled back. If the objects are successfully
deleted, then an output group containing the objects is returned. Otherwise, an
exception is thrown.

Syntax
<ie:webject name="Delete-Objects" type="ACT">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute_name"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="DESCRIPTOR" data="attribute_name"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_FILTER" data="group_name"/>
<ie:param name="GROUP_IN" data="group_in"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INCLUDE_ARGS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_CONSTRAINTS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_DESCRIPTORS" data="[TRUE | FALSE]"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="NEXT_OP" data="operation_name"/>
<ie:param name="OBJECT_REF" data="ufid"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="REFERENCE_DELIMITER" data="^"
<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="REFERENCE_OUTPUT_DELIMITER" data="^" />
<ie:param name="SESSION_ID" data="$(session[]session_id[])"/>
<ie:param name="TYPE" data="type_name"/>
<ie:param name="UNFORMATTED" data="dataType" />
<ie:param name="WHERE" data="where_clause"/>
<ie:param name="WHERE_CASE_SENSITIVITY" data="[TRUE | FALSE]"/>
</ie:webject>

Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION ACCEPT_LANGUAGE
CONTAINER_REF ATTRIBUTE
DBUSER CONNECTION_ATTEMPTS
DESCRIPTOR CONNECTION_ATTEMPT_
INTERVAL
GROUP_FILTER FORMAT
INCLUDE_ARGS GROUP_IN

96 PTC Windchill® Adapter Guide


Required Interdependent Optional
INCLUDE_CONSTRAINTS GROUP_OUT
INCLUDE_DESCRIPTORS REFERENCE_DELIMITER
NEXT_OP REFERENCE_OUTPUT_DELIMITER
OBJECT_REF SESSION_ID
PASSWD UNFORMATTED
REFERENCE_EXCEPTIONS
TYPE
WHERE
WHERE_CASE_
SENSITIVITY

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

C O N TA I N E R _ R E F
A Windchill context to apply the webject against. This parameter accepts the
following types of input:
• The UFID of a Windchill context. Multiple UFIDs can be specified for this
parameter.
• MEMBERSHIP—The query finds only those contexts of which the user is a
member.
When this parameter is specified, the scope of queries executed against the TYPE
and WHERE parameters are restricted to the associated context.

GROUP_IN
The name of an input group containing one UFID per element (OBID attribute).
This parameter is optional.

GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

Windchill Adapter Webject Library 97


OBJECT_REF
The Unique Federation Identifier (UFID) of a Windchill object. Multiple values
can be specified for this parameter to identify multiple objects.
This parameter can be used instead of or in combination with WHERE. If
WHERE is not specified, then OBJECT_REF must be specified.

TYPE
The object type name. If WHERE is specified, TYPE must also be specified. For
more information, see Specifying the TYPE and WHERE Parameters on page 34.

WHERE
A query expression identifying the objects for which to query. This parameter can
be used instead of or in combination with OBJECT_REF.
If OBJECT_REF is not specified, WHERE must be specified. If WHERE is
specified, TYPE must also be specified. For more information, see Specifying the
TYPE and WHERE Parameters on page 34.

Emit-Event
The Emit-Event webject emits a custom Windchill workflow event with optional
event parameters.

Syntax
<ie:webject name="Emit-Event" type="ACT">
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="EVENT_TYPE" data="custom_event_name"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="OBJECT" data="ufid"/>
<ie:param name="OBJECT_REF" data="ufid"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="SESSION_ID" data="$(session[]session_id[])"/>
<ie:param name="STRING" data="text"/>
</ie:webject>

Parameters
Required Interdependent Optional
EVENT_TYPE AUTHORIZATION CONNECTION_ATTEMPTS
INSTANCE DBUSER CONNECTION_ATTEMPT_
INTERVAL
PASSWD OBJECT

98 PTC Windchill® Adapter Guide


Required Interdependent Optional
OBJECT_REF
SESSION_ID
STRING

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

EVENT_TYPE
The name of the custom event being emitted. The names of custom events can be
defined in the following ways:
• As the names of resources in the Windchill resource bundle wt.workflow.
engine.WfCustomEventType.
• As LDAP directory entries. Any object in the LDAP directory with the object
class p t c Wi n d c h i l l E v e n t Ty p e D e f i n i t i o n defines a custom event type.
○ The p t c Wi n d c h i l l E v e n t Ty p e I d attribute of each such object defines a
value that can be specified for the EVENT_TYPE parameter.
○ The w t . w o r k f l o w. e n g i n e . e v e n t Ty p e Q u e r y U R L property in wt.
properties specifies the LDAP URL of the node in the directory that serves
as the root node of a subtree containing these custom workflow event type
definitions.
This parameter is required.

OBJECT
Specifies a name=value pair.
• name is the name of a parameter that is carried in the event notification.
• value is the UFID (unique federation identifier) of an object to be associated
with the event parameter name.
The object referenced by the UFID is retrieved from the database and passed as
the value of the event parameter.
This parameter can be specified multiple times in order to specify as many
parameters as are needed by the event being emitted. This parameter is optional.

Windchill Adapter Webject Library 99


OBJECT_REF
Specifies a name=value pair.
• name is the name of a parameter that is carried in the event notification.
• value is the UFID (unique federation identifier) of an object to be associated
with the event parameter name.
The object reference identified by the UFID is passed as the value of the
parameter.
This parameter can be specified multiple times in order to specify as many
parameters as are needed by the event being emitted. This parameter is optional.

STRING
Specifies a name=value pair.
• name is the name of a parameter that is carried in the event notification.
• value is the string value of the parameter.
This parameter can be specified multiple times in order to specify as many
parameters as are needed by the event being emitted. This parameter is optional.

End-Session
The End-Session webject ends a Windchill session. All resources associated with
the session are released. If any transactions are still open in the session, they are
rolled back. Sessions are created by the Start-Session webject.

Syntax
<ie:webject name="End-Session" type="ACT">
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="SESSION_ID" data="$(session[]session_id[])"/>
</ie:webject>

Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION CONNECTION_ATTEMPTS
SESSION_ID DBUSER CONNECTION_ATTEMPT_
INTERVAL
PASSWD

100 PTC Windchill® Adapter Guide


Note
For descriptions of these parameters, see Common Webject Parameters on
page 57.

SESSION_ID
The identifier of the session in which the webject is executed.
This parameter is required.

Move-Objects
The Move-Objects webject moves Windchill objects from their current folder
location to a new folder location. Only instances of wt.folder.FolderEntry can be
operated upon by this webject.

Syntax
<ie:webject name="Move-Objects" type="ACT">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="DESCRIPTOR" data="attribute_name"/>
<ie:param name="FOLDER_PATH" data="pathname"/>
<ie:param name="FOLDER_REF" data="folder_name"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_FILTER" data="group_name"/>
<ie:param name="GROUP_IN" data="group_in"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INCLUDE_ARGS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_CONSTRAINTS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_DESCRIPTORS" data="[TRUE | FALSE]"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="NEXT_OP" data="operation_name"/>
<ie:param name="OBJECT_REF" data="ufid"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="REFERENCE_DELIMITER" data="^" />
<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="REFERENCE_OUTPUT_DELIMITER" data="^" />
<ie:param name="SESSION_ID"data="$(session[]session_id[])"/>
<ie:param name="TYPE" data="type_name"/>
<ie:param name="UNFORMATED" data="dataType" />
<ie:param name="WHERE" data="where_clause"/>
<ie:param name="WHERE_CASE_SENSITIVITY" data="[TRUE | FALSE]"/>
</ie:webject>

Windchill Adapter Webject Library 101


Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION ACCEPT_LANGUAGE
CONTAINER_REF ATTRIBUTE
DBUSER CONNECTION_ATTEMPTS
DESCRIPTOR CONNECTION_ATTEMPT_
INTERVAL
FOLDER_PATH FORMAT
FOLDER_REF GROUP_OUT
GROUP_FILTER REFERENCE_DELIMITER
GROUP_IN REFERENCE_OUTPUT_DELIMITER
INCLUDE_ARGS SESSION_ID
INCLUDE_CONSTRAINTS UNFORMATTED
INCLUDE_DESCRIPTORS
NEXT_OP
OBJECT_REF
PASSWD
REFERENCE_EXCEPTIONS
TYPE
WHERE
WHERE_CASE_
SENSITIVITY

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

102 PTC Windchill® Adapter Guide


C O N TA I N E R _ R E F
A Windchill context to apply the webject against. This parameter accepts the
following types of input:
• The UFID of a Windchill context. Multiple UFIDs can be specified for this
parameter.
• MEMBERSHIP—The query finds only those contexts of which the user is a
member.
When this parameter is specified, the scope of queries executed against the TYPE
and WHERE parameters are restricted to the associated context.

F O L D E R _ PAT H
The fully qualified path for the folder or cabinet to which the objects will be
moved. If FOLDER_PATH is specified, the value of CONTAINER_REF is used
to determine the context the FOLDER_PATH is relative to. If no CONTAINER_
REF is specified, the exchange context is assumed. This parameter is mutually
exclusive with FOLDER_REF.

FOLDER_REF
The UFID of the folder or cabinet to which the objects will be moved. This
parameter is mutually exclusive with FOLDER_PATH.

GROUP_IN
The name of an input group containing the objects to move. The input group
should contain one UFID per element (OBID attribute).

GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

OBJECT_REF
The Unique Federation Identifier (UFID) of a Windchill object. Multiple values
can be specified for this parameter to identify multiple objects.
This parameter can be used instead of or in combination with WHERE. If
WHERE is not specified, then OBJECT_REF must be specified.
GROUP_IN can be specified instead of any combination of TYPE, WHERE, or
OBJECT_REF.

TYPE
The object type name. If WHERE is specified, TYPE must also be specified. For
more information, see Specifying the TYPE and WHERE Parameters on page 34.

Windchill Adapter Webject Library 103


GROUP_IN can be specified instead of any combination of TYPE, WHERE, or
OBJECT_REF.

WHERE
Specifies a query expression identifying the objects to be moved. This parameter
can be used instead of or in combination with OBJECT_REF.
If OBJECT_REF is not specified, WHERE must be specified. If WHERE is
specified, TYPE must also be specified. For more information, see Specifying the
TYPE and WHERE Parameters on page 34.
GROUP_IN can be specified instead of any combination of TYPE, WHERE, or
OBJECT_REF.

Purge-Cache
The Purge-Cache webject purges user and group objects from the Windchill
participant cache.
The Windchill cache of users and groups optimizes performance by minimizing
the number of requests it needs to make of the LDAP directory service.
When LDAP entries defining Windchill users or groups are modified directly
without using the Participant Administration utility, then information in the cache
can become outdated.
Use the Purge-Cache webject to purge outdated entries from the cache and force
Windchill to re-retrieve them from the LDAP directory service.

Note
If you are purging all entries at once (without specifying DIRECTORY_REF
or OBJECT_REF) from the Windchill participant cache, then only a Windchill
administrative user can execute the webject.
If you are purging a few individual entries from the Windchill principal cache,
then a user with write permission to those entries can execute the webject.

Syntax
<ie:webject name="Purge-Cache" type="ACT">
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="DIRECTORY_REF" data="LDAP_distinguished_name"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="OBJECT_REF" data="ufid"/>
<ie:param name="PASSWD" data="password"/>

104 PTC Windchill® Adapter Guide


<ie:param name="SESSION_ID" data="$(session[]session_id[])"/>
</ie:webject>

Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION CONNECTION_ATTEMPTS
DBUSER CONNECTION_ATTEMPT_
INTERVAL
DIRECTORY_REF SESSION_ID
OBJECT_REF
PASSWD

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

DIR ECTO RY _RE F


The LDAP distinguished name of a user or group to be removed from the cache.
Any valid distinguished name of an existing user or group can be specified. This
parameter can be specified multiple times to remove multiple users or groups from
the cache at once.
Use this parameter instead of or in addition to OBJECT_REF. If neither of them is
specified, all entries are removed from the cache.

OBJECT_REF
Specifies the Unique Federation Identifier (UFID) of a user or group to be
removed from the cache. This parameter can be specified multiple times to
remove multiple users or groups from the cache at once. It can be used instead of
or in addition to DIRECTORY_REF. If neither of them is specified, all entries are
removed from the cache.

Revise-Objects
The Revise-Objects webject advances the revision of Windchill objects. If
multiple objects are specified, and a single object cannot be revised, then an
exception is thrown and none of the specified objects are revised.

Windchill Adapter Webject Library 105


Objects do not need to be checked out to be revised by this webject.

Syntax
<ie:webject name="Revise-Objects" type="ACT">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="DESCRIPTOR" data="attribute_name"/>
<ie:param name="FIELD" data="field"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_FILTER" data="group_name"/>
<ie:param name="GROUP_IN" data="group_in" />
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INCLUDE_ARGS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_CONSTRAINTS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_DESCRIPTORS" data="[TRUE | FALSE]"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="MODIFICATION"
data="[REPLACE | ADD | DELETE | REMOVE]" />
<ie:param name="NEXT_OP" data="operation_name"/>
<ie:param name="OBJECT_REF" data="ufid"/>
<ie:param name="ONE_OFF_VERSION" data="[TRUE | FALSE]"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="REFERENCE_DELIMITER" data="^" />
<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="REFERENCE_OUTPUT_DELIMITER" data="^" />
<ie:param name="SESSION_ID" data="$(session[]session_id[])"/>
<ie:param name="TYPE" data="type_name"/>
<ie:param name="UNFORMATTED" data="dataType" />
<ie:param name="WHERE" data="where_clause"/>
<ie:param name="WHERE_CASE_SENSITIVITY" data="[TRUE | FALSE]"/>
</ie:webject>

Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION ACCEPT_LANGUAGE
CONTAINER_REF ATTRIBUTE
DBUSER CONNECTION_ATTEMPTS
DESCRIPTOR CONNECTION_ATTEMPT_
INTERVAL
FIELD FORMAT
GROUP_FILTER GROUP_OUT
GROUP_IN MODIFICATION
INCLUDE_ARGS ONE_OFF_VERSION

106 PTC Windchill® Adapter Guide


Required Interdependent Optional
INCLUDE_CONSTRAINTS REFERENCE_DELIMITER
INCLUDE_DESCRIPTORS REFERENCE_OUTPUT_DELIMITER
NEXT_OP SESSION_ID
OBJECT_REF UNFORMATTED
PASSWD
REFERENCE_EXCEPTIONS
TYPE
WHERE
WHERE_CASE_
SENSITIVITY

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

C O N TA I N E R _ R E F
A Windchill context to apply the webject against. This parameter accepts the
following types of input:
• The UFID of a Windchill context. Multiple UFIDs can be specified for this
parameter.
• MEMBERSHIP—The query finds only those contexts of which the user is a
member.
When this parameter is specified, the scope of queries executed against the TYPE
and WHERE parameters are restricted to the associated context.

FIELD
An attribute and associated value to be included in the requested operation. The
attribute and associated value are separated by an equals sign. For example:
<ie:param name="FIELD" data="source=wt.part.Source.make"/>

The attribute and value are dependent on the object and operation being
performed. This parameter is optional. This parameter can have multiple values.

Windchill Adapter Webject Library 107


GROUP_IN
One or more objects to be revised. The OBID attribute of each element selects the
object to be updated. The other attributes in each element specify values to be
replaced, added, or deleted.

GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

M O D I F I C AT I O N
Specifies how attributes are being modified. Acceptable values are REPLACE,
ADD, DELETE, and REMOVE. The default value is REPLACE. This parameter
is optional.

OBJECT_REF
The Unique Federation Identifier (UFID) of a Windchill object. Multiple values
can be specified for this parameter to identify multiple objects.
This parameter can be used instead of or in combination with WHERE. If
WHERE is not specified, then OBJECT_REF must be specified.

ONE_OFF_VERSION
Specifies whether the webject should create a new version of each object or a one-
off version of each object. A value of TRUE creates a one-off version of each
object. The default for this parameter is FALSE. This parameter is optional.

TYPE
The object type name. If WHERE is specified, TYPE must also be specified. For
more information, see Specifying the TYPE and WHERE Parameters on page 34.

WHERE
Specifies a query expression identifying the objects to be revised. This parameter
can be used instead of or in combination with OBJECT_REF and GROUP_IN.
If WHERE is specified, then TYPE must also be specified. For more information,
see Specifying the TYPE and WHERE Parameters on page 34.

R o l l b a c k - Tr a n s a c t i o n
The Rollback-Transaction webject rolls back a Windchill transaction that was
started by a call to the Start-Transaction webject with the same SESSION_ID
parameter value.

108 PTC Windchill® Adapter Guide


All changes made since the most recently executed Start-Transaction webject with
the same SESSION_ID parameter value are rolled back, leaving the database
unchanged.

Syntax
<ie:webject name="Rollback-Transaction" type="ACT">
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="SESSION_ID" data="$(session[]session_id[])"/>
</ie:webject>

Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION CONNECTION_ATTEMPTS
SESSION_ID DBUSER CONNECTION_ATTEMPT_
INTERVAL
PASSWD

Note
For descriptions of these parameters, see Common Webject Parameters on
page 57.

SESSION_ID
The identifier of the session in which the webject is executed.
This parameter is required.

Start-Session
The Start-Session webject is used in creating a session. All webjects executed
within this session share a common set of resources, including the identity of the
calling user, the locale with which the user is associated, and open transactions.
The webject constructs an output group containing a single element with two
attributes: INSTANCE and SESSION_ID. The INSTANCE and SESSION_ID
attribute values should be used as the value for the INSTANCE and SESSION_ID
parameters for all Windchill adapter webjects that should be a part of the session.

Windchill Adapter Webject Library 109


Syntax
<ie:webject name="Start-Session" type="ACT">
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="PASSWD" data="password"/>
</ie:webject>

Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION CONNECTION_ATTEMPTS
DBUSER CONNECTION_ATTEMPT_
INTERVAL
PASSWD GROUP_OUT

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

GROUP_OUT
Specifies the name of the output group. If this parameter is not specified, the
output group is named SESSION_ID. The webject creates a new session context
and assigns a unique identifier to it.
The unique identifier is returned in an attribute named SESSION_ID of the first
(and only) element of the output group. This identifier can then be specified in
SESSION_ID parameters of subsequent webjects to associate those webjects with
the session context created by Start-Session. This parameter is optional.

S t a r t - Tr a n s a c t i o n
The Start-Transaction webject creates a new transaction. Following Start-
Transaction, all database modifications made by webjects with the same
SESSION_ID parameter value as the Start_Transaction webject are part of the
same transaction.

110 PTC Windchill® Adapter Guide


A transaction remains open until either a Commit-Transaction or Rollback-
Transaction webject is invoked with the same SESSION_ID parameter. In
addition, the Rollback-Transaction webject can be used to roll the transaction back
explicitly. More than one transaction can be created within a session, and the
transactions can be nested.

Syntax
<ie:webject name="Start-Transaction" type="ACT">
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="SESSION_ID" data="$(session[]session_id[])"/>
</ie:webject>

Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION CONNECTION_ATTEMPTS
SESSION_ID DBUSER CONNECTION_ATTEMPT_
INTERVAL
PASSWD

Note
For descriptions of these parameters, see Common Webject Parameters on
page 57.

SESSION_ID
The identifier of the session in which the webject is executed.
This parameter is required.

S t a r t - Wo r k f l o w
The Start-Workflow webject starts an instance of a Windchill workflow object.

Syntax
<ie:webject name="Start-Workflow" type="OBJ">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute"/>

Windchill Adapter Webject Library 111


<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="DELAY_START" data="delay_start"/>
<ie:param name="DESCRIPTION" data="description"/>
<ie:param name="DESCRIPTOR" data="attribute_name"/>
<ie:param name="DUE_IN" data="due_in"/>
<ie:param name="FIELD" data="field"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="PRIORITY" data="priority"/>
<ie:param name="PROCESS_NAME" data="process_name"/>
<ie:param name="REFERENCE_DELIMITER" data="^" />
<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="REFERENCE_OUTPUT_DELIMITER" data="^" />
<ie:param name="SESSION_ID" data="$(session[]session_id[])"/>
<ie:param name="TEAM_TEMPLATE_NAME" data="team_template_name"/>
<ie:param name="TEMPLATE_NAME" data="template_name"/>
<ie:param name="TEMPLATE_REF" data="template_ref"/>
<ie:param name="UNFORMATED" data="dataType" />
</ie:webject>

Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION ACCEPT_LANGUAGE
TEMPLATE_NAME CONTAINER_REF ATTRIBUTE
DBUSER CONNECTION_ATTEMPTS
DESCRIPTOR CONNECTION_ATTEMPT_
INTERVAL
FIELD DELAY_START
GROUP_FILTER DESCRIPTION
PASSWD DUE_IN
REFERENCE_ FORMAT
EXCEPTIONS
TEMPLATE_REF GROUP_OUT
PRIORITY
PROCESS_NAME
REFERENCE_DELIMITER
REFERENCE_OUTPUT_DELIMITER

112 PTC Windchill® Adapter Guide


Required Interdependent Optional
SESSION_ID
TEAM_TEMPLATE_NAME
UNFORMATTED

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

C O N TA I N E R _ R E F
An explicit context reference that can be passed externally using the webject, or it
can be deduced from the primary object, if there is one. Otherwise, the default
exchange context is used.

D E L AY _ S TA R T
The number of minutes to delay the start of the workflow process. If a value is not
specified for this parameter, the workflow process is started immediately. This
parameter is optional.

DESCRIPTION
Any information specific to this instance of the workflow process. If a value is not
specified for this parameter, the description provided in the activity setting of the
workflow process definition is used. This parameter is optional.

DUE_IN
The number of minutes allowed for the completion of the workflow process. The
allowed time begins when the workflow actually starts, not necessarily when the
webject is invoked. This parameter is optional.

FIELD
An attribute and associated value to be included in the requested operation. The
attribute and associated value are separated by an equals sign. For example:
<ie:param name="FIELD" data="source=wt.part.Source.make"/>

The attribute and value are dependent on the object and operation being
performed. This parameter is optional. This parameter can have multiple values.

Windchill Adapter Webject Library 113


GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

PRIORITY
The priority setting for the workflow process. If a value is not specified for this
parameter, the priority of the process is set to NORMAL. Valid values are locale
specific and are in the P r i o r i t y menu in the Windchill Initiate Workflow applet. For
English, these values are HIGHEST, HIGH, NORMAL, LOW, and LOWEST.
This parameter is optional.

PROCESS_NAME
The name for this instance of the workflow process definition. If a value is not
specified for this parameter, the name of the process defaults to the name of the
template, as specified in the TEMPLATE_NAME parameter. This parameter is
optional.

T E A M _ T E M P L AT E _ N A M E
The team template used to create the team for the workflow process. It is set to the
default team template unless it is explicitly set through the webject. The
CONTAINER_REF parameter defines the context to search for the team template.

T E M P L AT E _ N A M E
The name of the workflow template. This parameter is required.

T E M P L AT E _ R E F
Specifies the workflow process template. If TEMPLATE_NAME is not specified,
then TEMPLATE_REF is required. If both are specified, TEMPLATE_NAME
takes precedence.

Subscribe-Objects
The Subscribe-Objects webject subscribes the specified participants (users or
groups) to a modeled Windchill event for the specified instance or instances of the
class. A subscription can be applied to a single iteration or version of an object.

Syntax
<ie:webject name="Subscribe-Objects" type="ACT">
<ie:param name="ACCEPT_LANGUAGE
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ALL_VERSIONS" data="[True | False]"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>

114 PTC Windchill® Adapter Guide


<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="user"/>
<ie:param name="EVENT_FILTER" data="event_filter"/>
<ie:param name="EVENT_KEY" data="event_key"/>
<ie:param name="EXPIRATION" data="yyyy-mm-dd"/>
<ie:param name="GROUP_IN" data="group_in"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="MESSAGE_BODY" data="message"/>
<ie:param name="NAME" data="subscription_name"/>
<ie:param name="OBJECT_REF" data="ufid"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="SESSION_ID" data="$(session[]session_id[])"/>
<ie:param name="SUBJECT" data="subject"/>
<ie:param name="SUBSCRIBER_REF" data="subscriber_obid"/>
<ie:param name="TYPE" data="type_name"/>
<ie:param name="WHERE" data="where clause"/>
<ie:param name="WHERE_CASE_SENSITIVITY" data="[TRUE | FALSE]"/>
</ie:webject>

Parameters
Required Interdependent Optional
EVENT_ AUTHORIZATION ACCEPT_LANGUAGE
KEY
INSTANCE CONTAINER_REF ALL_VERSIONS
DBUSER CONNECTION_ATTEMPTS
GROUP_IN CONNECTION_ATTEMPT_
INTERVAL
OBJECT_REF EVENT_FILTER
PASSWD EXPIRATION
SUBSCRIBER_REF GROUP_OUT
TYPE MESSAGE_BODY
WHERE NAME
WHERE_CASE_ SESSION_ID
SENSITIVITY
SUBJECT

Windchill Adapter Webject Library 115


Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

ALL_VERSIONS
Represents whether or not the subscription should be applied to all versions or an
object. The default value is FALSE. This parameter is optional.

C O N TA I N E R _ R E F
A Windchill context to apply the webject against. This parameter accepts the
following types of input:
• The UFID of a Windchill context. Multiple UFIDs can be specified for this
parameter.
• MEMBERSHIP—The query finds only those contexts of which the user is a
member.
When this parameter is specified, the scope of queries executed against the TYPE
and WHERE parameters are restricted to the associated context.

E V E N T _ F I LT E R
A filter for the event. The format of this parameter is name=value.
• name is a property name from <Model>RB.rbinfo. For example s t a t e
from lifecycleModelRB.rbInfo
• value is the database value that the named attribute must have in order for
the notification to occur. For example RELEASED for the example above.
This parameter can be specified more than once. This parameter is optional.

EVENT_KEY
Specifies the Windchill event to subscribe to. See notify.properties for a
list of possible events.
For example, for a wt.part.WTPart you can subscribe to the following event:
*/wt.vc.wip.WorkInProgressServiceEvent/POST_CHECKOUT

The format to specify an event key starts with an asterisk (*), then the class name,
followed by a slash (/), and then the event marker. For example, */classroom/
event-marker. This parameter is required.

116 PTC Windchill® Adapter Guide


E X P I R AT I O N
The expiration of the subscription. The date specified must be a time in the future.
The syntax for the expiration is yyyy-mm-dd. If this parameter is not specified,
then the subscription does not expire. This parameter is optional.

GROUP_IN
Specifies a group containing subscribers. The GROUP_IN parameter value is
obtained from Query-Objects webject specified within the same task file. One or
both of SUBSCRIBER_REF or GROUP_IN parameters are required. If both
SUBSCRIBER_REF and GROUP_IN parameters are specified, the subscribers
are the union of the two.

GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

MESSAGE_BODY
The message body of the email notification sent out as a result of a subscription to
an object event. If this parameter is not specified, then the message body is empty.
This parameter is optional.

NAME
Identifies the name of the subscription. This parameter is optional.

OBJECT_REF
The Unique Federation Identifier (UFID) of a Windchill object. Multiple values
can be specified for this parameter to identify multiple objects.
This parameter can be used instead of or in combination with WHERE. If
WHERE is not specified, then OBJECT_REF must be specified.

SUBJECT
The subject of the email notification sent out as a result of a subscription to an
object event. If this parameter is not specified, then the subject is empty. This
parameter is optional.

SUBSCRIBER_REF
The UFID of the subscriber who is subscribing. The SUBSCRIBER_REF can be a
user, group, team, or any class that implements w t . n o t i f y.
O b j e c t S u b s c r i p t i o n L i s t e n e r . One or both of SUBSCRIBER_REF or GROUP_
IN parameters are required.

Windchill Adapter Webject Library 117


TYPE
Specifies the name of the notifiable Windchill type of the objects to be queried for.
If WHERE is specified, then TYPE must also be specified. OBJECT_REF can be
specified instead of, or in addition to, this parameter.

WHERE
A query expression identifying the objects for which to query. This parameter can
be used instead of or in combination with OBJECT_REF.
If OBJECT_REF is not specified, WHERE must be specified. If WHERE is
specified, TYPE must also be specified. For more information, see Specifying the
TYPE and WHERE Parameters on page 34.

Undo-Checkout
Releases the lock on an object and reverses any changes associated with objects
that are checked out. If an error occurs while undoing checkouts, then the webject
returns an error message and no checkouts are undone.

Syntax
<ie:webject name="Undo-Checkout" type="ACT">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attributes"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="DESCRIPTOR" data="attribute_name"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_FILTER" data="group_name"/>
<ie:param name="GROUP_IN" data="group_in"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INCLUDE_ARGS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_CONSTRAINTS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_DESCRIPTORS" data="[TRUE | FALSE]"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="NEXT_OP" data="operation_name"/>
<ie:param name="OBJECT_REF" data="ufid"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="REFERENCE_DELIMITER" data="^" />
<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="REFERENCE_OUTPUT_DELIMITER" data="^" />
<ie:param name="SESSION_ID" data="$(session[]session_id[])"/>
<ie:param name="TYPE" data="type_name"/>
<ie:param name="UNFORMATTED" data="dataType" />
<ie:param name="WHERE" data="where_clause"/>
<ie:param name="WHERE_CASE_SENSITIVITY" data="[TRUE | FALSE]"/>
</ie:webject>

118 PTC Windchill® Adapter Guide


Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION ACCEPT_LANGUAGE
CONTAINER_REF ATTRIBUTE
DBUSER CONNECTION_ATTEMPTS
DESCRIPTOR CONNECTION_ATTEMPT_
INTERVAL
GROUP_FILTER FORMAT
INCLUDE_ARGS GROUP_IN
INCLUDE_CONSTRAINTS GROUP_OUT
INCLUDE_DESCRIPTORS REFERENCE_DELIMITER
NEXT_OP REFERENCE_OUTPUT_DELIMITER
OBJECT_REF SESSION_ID
PASSWD UNFORMATTED
REFERENCE_EXCEPTIONS
TYPE
WHERE
WHERE_CASE_
SENSITIVITY

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

C O N TA I N E R _ R E F
A Windchill context to apply the webject against. This parameter accepts the
following types of input:
• The UFID of a Windchill context. Multiple UFIDs can be specified for this
parameter.
• MEMBERSHIP—The query finds only those contexts of which the user is a
member.

Windchill Adapter Webject Library 119


When this parameter is specified, the scope of queries executed against the TYPE
and WHERE parameters are restricted to the associated context.

GROUP_IN
The name of an input group containing one UFID per element (the OBID attribute
on which to perform the undo checkout action).This parameter is optional.

GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

OBJECT_REF
The Unique Federation Identifier (UFID) of a Windchill object. Multiple values
can be specified for this parameter to identify multiple objects.
This parameter can be used instead of or in combination with WHERE. If
WHERE is not specified, then OBJECT_REF must be specified.

TYPE
The object type name. If WHERE is specified, TYPE must also be specified. For
more information, see Specifying the TYPE and WHERE Parameters on page 34.

WHERE
A query expression identifying the objects for which to query. This parameter can
be used instead of or in combination with OBJECT_REF.
If OBJECT_REF is not specified, WHERE must be specified. If WHERE is
specified, TYPE must also be specified. For more information, see Specifying the
TYPE and WHERE Parameters on page 34.

Unsubscribe-Objects
The Unsubscribe-Objects webject unsubscribes participants (users or groups) from
a Windchill event for the specified instance or instances of the class.

Syntax
<ie:webject name="Unsubscribe-Objects" type="ACT">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="EVENT_KEY" data="event key"/>

120 PTC Windchill® Adapter Guide


<ie:param name="GROUP_IN" data="group_in"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="OBJECT_REF" data="ufid"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="SESSION_ID" data="$(session[]session_id[])"/>
<ie:param name="SUBSCRIBER_REF" data="subscriber_obid"/>
<ie:param name="TYPE" data="type_name"/>
<ie:param name="WHERE" data="where_clause"/>
<ie:param name="WHERE_CASE_SENSITIVITY" data="[TRUE | FALSE]"/>
</ie:webject>

Parameters
Required Interdependent Optional
EVENT_ AUTHORIZATION ACCEPT_LANGUAGE
KEY
INSTANCE CONTAINER_REF CONNECTION_ATTEMPTS
DBUSER CONNECTION_ATTEMPT_
INTERVAL
OBJECT_REF GROUP_IN
PASSWD GROUP_OUT
SUBSCRIBER_REF SESSION_ID
TYPE
WHERE
WHERE_CASE_
SENSITIVITY

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

C O N TA I N E R _ R E F
A Windchill context to apply the webject against. This parameter accepts the
following types of input:
• The UFID of a Windchill context. Multiple UFIDs can be specified for this
parameter.
• MEMBERSHIP—The query finds only those contexts of which the user is a
member.

Windchill Adapter Webject Library 121


When this parameter is specified, the scope of queries executed against the TYPE
and WHERE parameters are restricted to the associated context.

EVENT_KEY
The Windchill event to unsubscribe from. See notify.properties for a list
of possible events.
For example, for a wt.part.WTPart you can use the following event:
*/wt.vc.wip.WorkInProgressServiceEvent/POST_CHECKOUT

The format to specify an event key starts with an asterisk (*), then the class name,
followed by a slash (/), and then the event marker. For example, */classroom/
event-marker. This parameter is required.

GROUP_IN
Specifies a group containing unsubscribers. The GROUP_IN parameter value is
obtained from Query-Objects webject specified within the same task file.
This parameter can be used instead of or in combination with SUBSCRIBER_
REF to specify unsubscribers. If both SUBSCRIBER_REF and GROUP_IN
parameters are specified, the unsubscribers are the union of the two. If neither of
them is specified, the unsubscribers is all. This parameter is optional.

GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

OBJECT_REF
The Unique Federation Identifier (UFID) of a Windchill object. Multiple values
can be specified for this parameter to identify multiple objects.
This parameter can be used instead of or in combination with WHERE. If
WHERE is not specified, then OBJECT_REF must be specified.

SUBSCRIBER_REF
The UFID of the subscriber who is unsubscribing. The SUBSCRIBER_REF can
be a user, group, team, or any class that implements w t . n o t i f y.
ObjectSubscriptionListener.
This parameter can be used instead of or in combination with GROUP_IN to
specify unsubscribers. If both SUBSCRIBER_REF and GROUP_IN parameters
are specified, the unsubscribers are the union of the two. If neither of them is
specified, the unsubscribers are all. This parameter is optional.

122 PTC Windchill® Adapter Guide


TYPE
Specifies the name of the notifiable Windchill type of the objects to be queried for.
If WHERE is specified, then TYPE must also be specified. OBJECT_REF can be
specified instead of, or in addition to, this parameter.

WHERE
A query expression identifying the objects for which to query. This parameter can
be used instead of or in combination with OBJECT_REF.
If OBJECT_REF is not specified, WHERE must be specified. If WHERE is
specified, TYPE must also be specified. For more information, see Specifying the
TYPE and WHERE Parameters on page 34.

Update-Objects
The Update-Objects webject updates one or more attribute values of Windchill
objects.
When updating objects, the working copies of the objects must be specified and
the objects must already be checked out. If any objects cannot be updated, an
exception is thrown and no objects are updated.
• Individual objects are updated by specifying OBJECT_REF and one or more
FIELD parameters.
• Multiple objects can be updated by specifying FIELD and one or more
OBJECT_REF or TYPE and WHERE parameters.
The value of the FIELD parameter applies to all objects being updated.
FIELD parameter values do not apply to objects updated using GROUP_IN. As a
result, specifying GROUP_IN allows for the most robust way to update multiple
objects at one time.

Syntax
<ie:webject name="Update-Objects" type=ACT>
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="DESCRIPTOR" data="attribute_name"/>
<ie:param name="FIELD" data="field"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_FILTER" data="group_name"/>
<ie:param name="GROUP_IN" data="group_in"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INCLUDE_ARGS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_CONSTRAINTS" data="[TRUE | FALSE]"/>

Windchill Adapter Webject Library 123


<ie:param name="INCLUDE_DESCRIPTORS" data="[TRUE | FALSE]"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="MODIFICATION" data="[ADD | REPLACE | DELETE]"/>
<ie:param name="NEXT_OP" data="operation_name"/>
<ie:param name="OBJECT_REF" data="ufid"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="REFERENCE_DELIMITER" data="^" />
<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="REFERENCE_OUTPUT_DELIMITER" data="^" />
<ie:param name="SESSION_ID" data="$(session[]session_id[])"/>
<ie:param name="TYPE" data="type_name"/>
<ie:param name="UNFORMATTED" data="dataType" />
<ie:param name="WHERE" data="where_clause"/>
<ie:param name="WHERE_CASE_SENSITIVITY" data="[TRUE | FALSE]"/>
</ie:webject>

Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION ACCEPT_LANGUAGE
CONTAINER_REF ATTRIBUTE
DBUSER CONNECTION_ATTEMPTS
DESCRIPTOR CONNECTION_ATTEMPT_
INTERVAL
FIELD FORMAT
GROUP_FILTER GROUP_OUT
GROUP_IN MODIFICATION
INCLUDE_ARGS REFERENCE_DELIMITER
INCLUDE_CONSTRAINTS REFERENCE_OUTPUT_DELIMITER
INCLUDE_DESCRIPTORS SESSION_ID
NEXT_OP UNFORMATTED
OBJECT_REF
PASSWD
REFERENCE_EXCEPTIONS
TYPE
WHERE
WHERE_CASE_
SENSITIVITY

124 PTC Windchill® Adapter Guide


Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

C O N TA I N E R _ R E F
A Windchill context to apply the webject against. This parameter accepts the
following types of input:
• The UFID of a Windchill context. Multiple UFIDs can be specified for this
parameter.
• MEMBERSHIP—The query finds only those contexts of which the user is a
member.
When this parameter is specified, the scope of queries executed against the TYPE
and WHERE parameters are restricted to the associated context.

FIELD
This parameter specifies an attribute and associated value to be included in the
requested operation. The attribute and associated value are separated by an equal
sign. For example:
<ie:param name="FIELD" data="source=wt.part.Source.make"/>

The attribute and value are dependent on the object and operation being
performed. This parameter can have multiple values.

Note
When MODFICATION = DELETE, the value portion of the name=value
pair is ignored and all values for the attribute specified are removed.
For example, if MODIFICATION = DELETE and FIELD = a = b, then “a” is
the attribute and “b” is the value. The value is ignored and is not needed as all
of the values for attribute “a” are removed. All that is required from the
FIELD parameter when MODIFICATION = DELETE is FIELD = a.

Windchill Adapter Webject Library 125


GROUP_IN
The objects to be updated. The OBID attribute of each element selects the object
to be updated. The other attributes in each element specify values to be replaced
or added in the selected objects. This parameter can be specified instead of or in
addition to FIELD parameters.
If FIELD parameters are specified, they define attributes of a single object
(selected by TYPE and WHERE or OBJECT_REF) that is updated, while each
element of the GROUP_IN group defines an object to be updated, allowing
multiple objects to be updated at one time.

GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

M O D I F I C AT I O N
Specifies whether attribute values are replaced, deleted, or added. The supported
values of this parameter are:
• REPLACE—Attributes specified in FIELD parameters or in elements of the
GROUP_IN parameter replace attributes in the updated objects.
• ADD—Attributes specified in FIELD parameters or in elements of the
GROUP_IN parameter are added to attributes in the updated objects. Adding
is only allowed when the specified attributes do not have values already, or
when the specified attributes are allowed to have multiple values.
• DELETE—Any specified value in the name=value pair in the FIELD
parameter are ignored and all values for the attribute specified are removed.
For example, if MODIFICATION = DELETE and FIELD = a = b, then “a” is
the attribute and “b” is the value. The value is ignored and is not needed as all
of the values for attribute “a” are removed. All that is required from the
FIELD parameter when MODIFICATION = DELETE is FIELD = a.
The default for this parameter is REPLACE. This parameter is optional.

TYPE
The object type name. If WHERE is specified, TYPE must also be specified. For
more information, see Specifying the TYPE and WHERE Parameters on page 34.

WHERE
A query expression identifying the objects for which to query. This parameter can
be used instead of or in combination with OBJECT_REF.

126 PTC Windchill® Adapter Guide


If OBJECT_REF is not specified, WHERE must be specified. If WHERE is
specified, TYPE must also be specified. For more information, see Specifying the
TYPE and WHERE Parameters on page 34.

Qu e r y We b j e c t s
Query webjects search the application for objects or information that match
specified criteria. Each individual listing contains the webject name, a description
of its use, details of its syntax, and descriptions of all parameters.

A l l - Ve r s i o n s
The All-Versions webject returns the values for the specified attributes for all the
versions of a Windchill object. The specified Windchill class must implement the
wt.vc.Mastered interface.

Syntax
<ie:webject name="All-Versions" type="OBJ">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@server[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute"/>
<ie:param name="AUTHORIZATION"
data="$(@server[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="OBJECT_REF" data="object_ref"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="SESSION_ID" data="$(session_id[]SESSION_ID[])"/>
<ie:param name="TYPE" data="type_name"/>
<ie:param name="WHERE" data="where_clause"/>
<ie:param name="WHERE_CASE_SENSITIVITY" data="[TRUE | FALSE]"/>
</ie:webject>

Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION ACCEPT_LANGUAGE
TYPE CONTAINER_REF ATTRIBUTE
WHERE DBUSER CONNECTION_ATTEMPTS
OBJECT_REF CONNECTION_ATTEMPT_
INTERVAL

Windchill Adapter Webject Library 127


Required Interdependent Optional
PASSWD FORMAT
REFERENCE_EXCEPTIONS GROUP_OUT
WHERE_CASE_ SESSION_ID
SENSITIVITY

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

C O N TA I N E R _ R E F
A Windchill context to apply the webject against. This parameter accepts the
following types of input:
• The UFID of a Windchill context. Multiple UFIDs can be specified for this
parameter.
• MEMBERSHIP—The query finds only those contexts of which the user is a
member.
When this parameter is specified, the scope of queries executed against the TYPE
and WHERE parameters are restricted to the associated context.

GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

OBJECT_REF
Specifies the UFID of a specific object to retrieve versions for from the database.
This parameter can be specified more than once to identify multiple objects to be
retrieved. This parameter can be used in addition to or instead of TYPE and
WHERE.

TYPE
The object type name. If WHERE is specified, TYPE must also be specified. For
more information, see Specifying the TYPE and WHERE Parameters on page 34.

128 PTC Windchill® Adapter Guide


WHERE
Specifies how to find exactly one instance of a Windchill object. If more than one
object matches the criteria specified, only the version information for the first
object found is returned. For more information, see Specifying the TYPE and
WHERE Parameters on page 34. This parameter is required.

Describe-Attributes
Describes the specified attributes and produces introspection data for the specified
Windchill type name.
The output group includes the following attributes:
name d e f a u l t Va l u e
displayName required
type hidden
upperLimit valueHidden
lowerLimit editable

The value of the r e q u i r e d attribute is dependant on the value of the NEXT_OP


parameter.
The values of the h i d d e n , v a l u e H i d d e n , and e d i t a b l e attributes are dependant on
the values of the INCLUDE_CONSTRAINTS and NEXT_OP parameters.
For attributes with subclass w t . f c . E n u m e r a t e d Ty p e , a list of valid values is
provided with the following attributes:
value fullDisplay
l o c a l i z e d Va l u e shortDescription
s t r i n g Va l u e longDescription
l o c a l i z e d D e f a u l t Va l u e s e l e c t a b l e Va l u e
abbreviatedDisplay u n S e l e c t a b l e Va l u e

Syntax
<ie:webject name="Describe-Attributes" type="OBJ">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data = "attempts"/>
<ie:param name="CONNECTION_ATTEMPTS_INTERVAL" data="attempts"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INCLUDE_ATTRIBUTES_FROM_SOURCE"

Windchill Adapter Webject Library 129


data="[SURFACE | ALL]"/>
<ie:param name="INCLUDE_CONSTRAINTS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_DESCRIPTORS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_SOFT_ATTRIBUTES" data="[TRUE | FALSE]"/>
<ie:param name="INSTANCE" data="appl_name"/> <ie:param
<ie:param name="NEXT_OP" data="operation_name"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="TYPE" data="type"/>
<ie:webject>

Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION ACCEPT_LANGUAGE
TYPE DBUSER ATTRIBUTE
INCLUDE_CONSTRAINTS CONNECTION_ATTEMPTS
INCLUDE_DESCRIPTORS CONNECTION_ATTEMPT_INTERVAL
INCLUDE_SOFT_ GROUP_OUT
ATTRIBUTES
NEXT_OP INCLUDE_ATTRIBUTES_FROM_
SOURCE
PASSWD

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

AT T R I B U T E
Specifies the attributes to be described for the specified type. Multiple values can
be specified for this parameter. If this parameter is not specified, a default set of
attributes is returned.
The default set of attributes for a type is configured in D e f a u l t A t t r i b u t e s
property of the wt.adapter.delegates.properties file. If the
D e f a u l t A t t r i b u t e s property is not defined, all attributes of all objects are
returned. This parameter is optional.

130 PTC Windchill® Adapter Guide


GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

I N C L U D E _ AT T R I B U T E S _ F R O M _ S O U R C E
Specifies whether the returned attributes are filtered so that only surface attributes
are exposed or if all attributes are returned. Specifying SURFACE returns only the
surface attributes. The default for this parameter is ALL. This parameter is
optional.

I N C L U D E _ S O F T _ AT T R I B U T E S
Specifies whether to include global attributes along with modeled attributes. By
default, only modeled attributes are included in the output.

TYPE
Specifies the type of the object to be described. For example, the fully qualified
Java class name wt.part.WTPart can be supplied. This parameter is required.

Expand-References
Traverses the objects in an input group and retrieves objects referenced by
specified attributes in each object of the input group.
The attributes of each object that is retrieved are then merged with the referencing
object to create an element of the output group. The name of each attribute for
each element in the output group is determined as follows:
• If the attribute is a copy of an attribute of the input group, the name is the
same as its name in the input group.
• If the attribute is an attribute obtained from a dereferenced object, the name in
the output group is formed by concatenating the attribute name of the
reference attribute in the input group with the name of the attribute from the
dereferenced object, and inserting a period ( . ) between the two. For example:
projectId.name
Where projectId is the name of the reference attribute in the input group,
and name is the name of the attribute in the object referenced by the
projectId value.

Syntax
<ie:webject name="Expand-References" type="OBJ">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute"/>

Windchill Adapter Webject Library 131


<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="DESCRIPTOR" data="attribute_name"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_FILTER" data="group_name"/>
<ie:param name="GROUP_IN" data="group_in"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INCLUDE_ARGS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_CONSTRAINTS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_DESCRIPTORS" data="[TRUE | FALSE]"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="NEXT_OP" data="operation_name"/>
<ie:param name="OBJECT_REF" data="ufid"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="REFERENCE" data="reference_attribute"/>
<ie:param name="REFERENCE_DELIMITER" data="^" />
<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="REFERENCE_OUTPUT_DELIMITER" data="^" />
<ie:param name="TYPE" data="type_name"/>
<ie:param name="UNFORMATED" data="dataType" />
<ie:param name="WHERE" data="where-clause"/>
<ie:param name="WHERE_CASE_SENSITIVITY" data="[TRUE | FALSE]"/>
</ie:webject>

Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION ACCEPT_LANGUAGE
REFER- CONTAINER_REF ATTRIBUTE
ENCE
DBUSER CONNECTION_ATTEMPTS
DESCRIPTOR CONNECTION_ATTEMPT_
INTERVAL
GROUP_FILTER CONTAINER_REF
GROUP_IN FORMAT
INCLUDE_ARGS GROUP_OUT
INCLUDE_CONSTRAINTS REFERENCE_DELIMITER
INCLUDE_DESCRIPTORS REFERENCE_OUTPUT_DELIMITER
NEXT_OP UNFORMATTED
OBJECT_REF
PASSWD
REFERENCE_EXCEPTIONS

132 PTC Windchill® Adapter Guide


Required Interdependent Optional
TYPE
WHERE
WHERE_CASE_
SENSITIVITY

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

AT T R I B U T E
This parameter is used in two different contexts. Usually it specifies the attributes
to be produced in the output group for each returned object. But in the case that
GROUP_IN is the same as GROUP_OUT and there is no TYPE, WHERE, or
OBJECT_REF, it specifies the attributes of each referenced object to be merged
with the attributes of the element from the input group.
A value of "*" returns all attributes in the input group, plus all the expanded
attributes of the referenced object.
Composite names of the expanded attribute or simple attribute names of the
attribute from the input group can be explicitly specified to filter the attributes
returned. If explicit attributes are specified, all the attributes desired must be
specified, including the unexpanded attributes of the input group if those attributes
are desired.
Except for the above special case, only the desired attributes from the referenced
object need to be specified because all the attributes from the input group are
implicitly returned.
If this parameter is not specified, then a default set of attributes is returned. The
default set of attributes for a type is configured in the D e f a u l t A t t r i b u t e s property
value of the wt.adapter.delegates.properties file.
If a D e f a u l t A t t r i b u t e s property is not defined, then all attributes of all objects are
returned. Multiple values can be specified for this parameter. This parameter is
optional.

Windchill Adapter Webject Library 133


C O N TA I N E R _ R E F
A Windchill context to apply the webject against. This parameter accepts the
following types of input:
• The UFID of a Windchill context. Multiple UFIDs can be specified for this
parameter.
• MEMBERSHIP—The query finds only those contexts of which the user is a
member.
When this parameter is specified, the scope of queries executed against the TYPE
and WHERE parameters are restricted to the associated context.

GROUP_IN
The name of the input group containing one or more objects whose attributes are
retained in the output group and whose reference attributes will be dereferenced.
The GROUP_IN parameter value can be obtained from Query-Objects webject
specified within the same task file. This parameter can be specified instead of or
in addition to TYPE, WHERE, or OBJECT_REF.

GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

OBJECT_REF
The Unique Federation Identifier (UFID) of a Windchill object. Multiple values
can be specified for this parameter to identify multiple objects.
This parameter can be used instead of or in combination with WHERE. If
WHERE is not specified, then OBJECT_REF must be specified.

REFERENCE
The name of an attribute whose value is a reference to an object (a UFID). For
each such attribute found in an element of the input group, the referenced object is
retrieved, and its attributes are merged with the attributes of the element from the
input group to produce an element of the output group. This parameter is required.

TYPE
The object type name. If WHERE is specified, TYPE must also be specified. For
more information, see Specifying the TYPE and WHERE Parameters on page 34.

WHERE
A query expression identifying the objects for which to query. This parameter can
be used instead of or in combination with OBJECT_REF.

134 PTC Windchill® Adapter Guide


If OBJECT_REF is not specified, WHERE must be specified. If WHERE is
specified, TYPE must also be specified. For more information, see Specifying the
TYPE and WHERE Parameters on page 34.

Generate-Report
The Generate-Report webject executes a Windchill report and returns the results
as an Info*Engine group.

Note
You cannot use the Generate-Report webject to execute a report template that
has the following conditions:
• Soft types or attributes.
• The GENERATE_TYPE_INTANCES parameter is set to TRUE.
• The template includes the following QueryBuilder features:
○ Multiple classes exist and one or more of the classes is not contained in
an explicit join. This means one or more classes are not listed on the
J o i n tab.
○ Criteria subselect is used. This means S u b - S e l e c t is selected from the
Ty p e drop-down menu on the C r i t e r i a tab.

Syntax
<ie:webject name="Generate-Report" type="OBJ">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute_name"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GENERATE_TYPE_INSTANCES" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_FILTER" data="group_name"/>
<ie:param name="GROUP_IN" data="group_in"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INPUT" data="name=value"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="PURGE_DEFAULT" data="[TRUE | FALSE]"/>
<ie:param name="REFERENCE_DELIMITER" data="^" />
<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="REFERENCE_OUTPUT_DELIMITER" data="^" />
<ie:param name="REPORT_REF" data="ufid"/>
<ie:param name="UNFORMATED" data="dataType"/>

Windchill Adapter Webject Library 135


<ie:param name="WHERE" data="where_clause"/>
<ie:param name="WHERE_CASE_SENSITIVITY" data="[TRUE | FALSE]"/>
</ie:webject>

Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION ACCEPT_LANGUAGE
CONTAINER_REF ATTRIBUTE
DBUSER CONNECTION_ATTEMPTS
GROUP_FILTER CONNECTION_ATTEMPT_
INTERVAL
PASSWD FORMAT
REFERENCE_EXCEPTIONS GENERATE_TYPE_INSTANCES
REPORT_REF GROUP_IN
WHERE GROUP_OUT
WHERE_CASE_ INPUT
SENSITIVITY
PURGE_DEFAULT
REFERENCE_DELIMITER
REFERENCE_OUTPUT_DELIMITER
UNFORMATTED

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

C O N TA I N E R _ R E F
A Windchill context to apply the webject against. This parameter accepts the
following types of input:
• The UFID of a Windchill context. Multiple UFIDs can be specified for this
parameter.
• MEMBERSHIP—The query finds only those contexts of which the user is a
member.

136 PTC Windchill® Adapter Guide


When this parameter is specified, the scope of queries executed against the
WHERE parameter is restricted to the associated context.

G E N E R AT E _ T Y P E _ I N S TA N C E S
Specifies how data is added to the output group. If specified as TRUE, report
result output is generated as TypeInstances. If specified as FALSE, the report
result output is generated as tabular, relational data where each row is an element
and each column is an attribute. The default for this parameter is TRUE. This
parameter is optional.

GROUP_IN
The name of an input group containing one UFID per element (OBID attribute).
This parameter is optional.

GROUP_OUT
The name of the output group produced by the webject. If not specified, the name
assigned to the output group is “wt.query.report.” This parameter is optional.

INPUT
A name and value pair that serves as input to the specified report templates. It can
be specified more than once to provide more than one name and value pair. If it is
not specified, no input is provided to the report templates.
If the parameter is specified, then each value must be of the form name=value
where “name” is the name of a report template parameter, and “value” is the
associated value of the parameter. This parameter is optional.

P U R G E _ D E FA U LT
Specifies whether to purge the suggested values from the return group. The default
value for this parameter is FALSE.
If the parameter is set to TRUE, it purges the suggested values from the return
group. This parameter is optional.

REP O RT _RE F
Specifies the Unique Federation Identifier (UFID) of a report template. It can be
specified more than once, if you want to select more than one report template. If
more than one value is specified, all of the referenced report templates are
executed, and the output group contains their combined results. The class name
for a report template is wt.query.template.ReportTemplate.
If this parameter is not specified, the WHERE parameter must be specified. If
both this parameter and the WHERE parameter are specified, then all report
templates referenced by REPORT_REF and queried by WHERE are executed,
and the output group contains the combined results.

Windchill Adapter Webject Library 137


WHERE
Specifies a Windchill query specification that selects the report templates to be
executed. If this parameter is not specified, the REPORT_REF parameter must be
specified.
If both this parameter and the REPORT_REF parameter are specified, then all
report templates referenced by REPORT_REF and queried by WHERE are
executed, and the output group contains the combined results. For additional
information see Specifying the TYPE and WHERE Parameters on page 34.

Get-ContentItems
The Get-ContentItems webject retrieves content from Windchill objects that are
content holders and returns them in an Info*Engine BLOB stream. For example,
the webject retrieves content such as documents, spreadsheets, and CAD files,
from wt.doc.WTDocument and wt.part.WTPart.

Syntax
<ie:webject name="Get-ContentItems" type="OBJ">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="username" />
<ie:param name="GROUP_FILTER" data="group_name"/>
<ie:param name="GROUP_IN" data="group_in"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="MIME_TYPE" data="text/plain" />
<ie:param name="OBJECT_REF" data="ufid"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="STAGED_FILE_ID" data="file_id" />
<ie:param name="STAGING_AREA" data="/" />
<ie:param name="TYPE" data="type_name"/>
<ie:param name="WHERE" data="where_clause"/>
<ie:param name="WHERE_CASE_SENSITIVITY" data="[TRUE | FALSE]"/>
</ie:webject>

Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION ACCEPT_LANGUAGE
CONTAINER_REF CONNECTION_ATTEMPTS
DBUSER CONNECTION_ATTEMPT_
INTERVAL
GROUP_FILTER GROUP_IN

138 PTC Windchill® Adapter Guide


Required Interdependent Optional
MIME_TYPE GROUP_OUT
OBJECT_REF
PASSWD
STAGED_FILE_ID
STAGING_AREA
TYPE
WHERE
WHERE_CASE_
SENSITIVITY

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

C O N TA I N E R _ R E F
A Windchill context to apply the webject against. This parameter accepts the
following types of input:
• The UFID of a Windchill context. Multiple UFIDs can be specified for this
parameter.
• MEMBERSHIP—The query finds only those contexts of which the user is a
member.
When this parameter is specified, the scope of queries executed against the TYPE
and WHERE parameters are restricted to the associated context.

GROUP_IN
The name of an input group containing one UFID per element (OBID attribute).
This parameter is optional.

GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

Windchill Adapter Webject Library 139


MIME_TYPE
The MIME type to use when downloading a previously staged content item. This
parameter is only used if STAGED_FILE_ID is specified.

OBJECT_REF
The Unique Federation Identifier (UFID) of a Windchill object. Multiple values
can be specified for this parameter to identify multiple objects.
This parameter can be used instead of or in combination with WHERE. If
WHERE is not specified, then OBJECT_REF must be specified.

S TA G E D _ F I L E _ I D
The identifier of a previously staged content item to be downloaded instead of
downloading content from an object.

S TA G I N G _ A R E A
A relative path to a file directory located on a server where content items that have
been previously staged are now located.
The STAGING_AREA parameter is enabled only when an administrator has
defined the wt.adapter.stagingAreaRoot property, which identifies the
root file directory path of the staging area. The value specified for the STAGING_
AREA parameter is appended to this property to create an absolute file path to the
directory in which staged content items are stored. The
wt.adapter.stagingAreaRoot property can be set in the
wt.properties file
The absolute path for the staged files is:
stagingAreaRoot/STAGING_AREA/username
• stagingAreaRoot is the value defined for the
wt.adapter.stagingAreaRoot property.
• STAGING_AREA is the value specified for this parameter.
• username is the user name of the current user.
If the current user has one or more alternate user names, you cannot predict or
control which alternate name will be used to build the staging area directory
path.

TYPE
The object type name. If WHERE is specified, TYPE must also be specified. For
more information, see Specifying the TYPE and WHERE Parameters on page 34.

140 PTC Windchill® Adapter Guide


WHERE
A query expression identifying the objects for which to query. This parameter can
be used instead of or in combination with OBJECT_REF.
If OBJECT_REF is not specified, WHERE must be specified. If WHERE is
specified, TYPE must also be specified. For more information, see Specifying the
TYPE and WHERE Parameters on page 34.

Get-IconURL
The Get-IconURL webject constructs an output group containing icons associated
with one or more objects. The output group contains one element per object. Each
element contains the following attributes: c l a s s , o b i d , and i c o n .
Each element can also contain a tooltip attribute if a tooltip is available. Each
element can also contain one or more glyph attributes depending on a the current
state of the object.

Syntax
<ie:webject name="Get-IconURL" type="OBJ">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="GROUP_FILTER" data="group_name"/>
<ie:param name="GROUP_IN" data="group_in"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="OBJECT_REF" data="ufid"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="TYPE" data="type_name"/>
<ie:param name="WHERE" data="where-clause"/>
<ie:param name="WHERE_CASE_SENSITIVITY" data="[TRUE | FALSE]"/>
</ie:webject>

Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION ACCEPT_LANGUAGE
CONTAINER_REF CONNECTION_ATTEMPTS
DBUSER CONNECTION_ATTEMPT_
INTERVAL
GROUP_FILTER GROUP_IN
OBJECT_REF GROUP_OUT

Windchill Adapter Webject Library 141


Required Interdependent Optional
PASSWD
TYPE
WHERE
WHERE_CASE_
SENSITIVITY

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

C O N TA I N E R _ R E F
A Windchill context to apply the webject against. This parameter accepts the
following types of input:
• The UFID of a Windchill context. Multiple UFIDs can be specified for this
parameter.
• MEMBERSHIP—The query finds only those contexts of which the user is a
member.
When this parameter is specified, the scope of queries executed against the TYPE
and WHERE parameters are restricted to the associated context.

GROUP_IN
Name of an input group containing the objects for which to fetch icon URLs.
When the value of GROUP_IN equals the value of GROUP_OUT, a new group is
not created and the related icon attributes are added to the input group.
When GROUP_IN is specified, the objects in the group are not re-fetched from
the database. As a result, for the webject to generate useful icon information, it is
necessary for each element of the input group to contain a specific set of
attributes:
• format.standardIconStr
• checkoutInfo.state
• containerReference
• o n e O f f Ve r s i o n I n f o . i d e n t i f i e r. o n e O f f Ve r s i o n I d
For EPM documents, the attributes are a u t h o r i n g A p p l i c a t i o n and d o c Ty p e . This
parameter is optional.

142 PTC Windchill® Adapter Guide


GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

OBJECT_REF
The Unique Federation Identifier (UFID) of a Windchill object. Multiple values
can be specified for this parameter to identify multiple objects.
This parameter can be used instead of or in combination with WHERE. If
WHERE is not specified, then OBJECT_REF must be specified.

TYPE
The object type name. If WHERE is specified, TYPE must also be specified. For
more information, see Specifying the TYPE and WHERE Parameters on page 34.

WHERE
A query expression identifying the objects for which to query. This parameter can
be used instead of or in combination with OBJECT_REF.
If OBJECT_REF is not specified, WHERE must be specified. If WHERE is
specified, TYPE must also be specified. For more information, see Specifying the
TYPE and WHERE Parameters on page 34.

Get-LifeCycles
Returns a group specifying the life cycles that can be associated with a specified
set of objects.

Syntax
<ie:webject name="Get-LifeCycles" type="OBJ">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="DESCRIPTOR" data="attribute_name"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_FILTER" data="group_name"/>
<ie:param name="GROUP_IN" data="group_in"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INCLUDE_ARGS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_CONSTRAINTS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_DESCRIPTORS" data="[TRUE | FALSE]"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="NEXT_OP" data="operation_name"/>

Windchill Adapter Webject Library 143


<ie:param name="OBJECT_REF" data="ufid"/>
<ie:param name="REFERENCE_DELIMITER" data="^" />
<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="REFERENCE_OUTPUT_DELIMITER" data="^" />
<ie:param name="PASSWD" data="password"/>
<ie:param name="TYPE" data="type_name"/>
<ie:param name="UNFORMATED" data="dataType"/>
<ie:param name="WHERE" data="where-clause"/>
<ie:param name="WHERE_CASE_SENSITIVITY" data="[TRUE | FALSE]"/>
</ie:webject>

Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION ACCEPT_LANGUAGE
CONTAINER_REF ATTRIBUTE
DBUSER CONNECTION_ATTEMPTS
DESCRIPTOR CONNECTION_ATTEMPT_
INTERVAL
GROUP_FILTER FORMAT
INCLUDE_ARGS GROUP_IN
INCLUDE_CONSTRAINTS GROUP_OUT
INCLUDE_DESCRIPTORS REFERENCE_DELIMITER
NEXT_OP REFERENCE_OUTPUT_DELIMITER
OBJECT_REF UNFORMATTED
PASSWD
REFERENCE_EXCEPTIONS
TYPE
WHERE
WHERE_CASE_
SENSITIVITY

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

144 PTC Windchill® Adapter Guide


C O N TA I N E R _ R E F
A Windchill context to apply the webject against. This parameter accepts the
following types of input:
• The UFID of a Windchill context. Multiple UFIDs can be specified for this
parameter.
• MEMBERSHIP—The query finds only those contexts of which the user is a
member.
When this parameter is specified, the scope of queries executed against the TYPE
and WHERE parameters are restricted to the associated context.

GROUP_IN
The name of an input group containing one UFID per element (OBID attribute).
This parameter is optional.

GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

OBJECT_REF
The Unique Federation Identifier (UFID) of a Windchill object. Multiple values
can be specified for this parameter to identify multiple objects.
This parameter can be used instead of or in combination with WHERE. If
WHERE is not specified, then OBJECT_REF must be specified.

TYPE
The object type name. If WHERE is specified, TYPE must also be specified. For
more information, see Specifying the TYPE and WHERE Parameters on page 34.

WHERE
A query expression identifying the objects for which to query. This parameter can
be used instead of or in combination with OBJECT_REF.
If OBJECT_REF is not specified, WHERE must be specified. If WHERE is
specified, TYPE must also be specified. For more information, see Specifying the
TYPE and WHERE Parameters on page 34.

Windchill Adapter Webject Library 145


Get-Properties
The Get-Properties webject retrieves values from wt.properties and places them in
an output group. This webject allows Info*Engine substitution syntax to be used
in obtaining Windchill configuration properties and passing them as parameters to
other webjects. The resulting output group contains a single element that holds the
requested properties.

Syntax
<ie:webject name="Get-Properties" type="OBJ">
<ie:param name="ATTRIBUTE" data="property_name"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="PASSWD" data="password"/>
</ie:webject>

Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION ATTRIBUTE
DBUSER CONNECTION_ATTEMPTS
PASSWD CONNECTION_ATTEMPT_
INTERVAL
GROUP_OUT

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

AT T R I B U T E
The names of the property values to retrieve. Unless specified, all properties are
returned. This parameter is optional.

GROUP_OUT
The name of the output group produced by the webject. If not specified, the name
assigned to the output group is “wt.properties”.

146 PTC Windchill® Adapter Guide


The group contains exactly one element, and each attribute of the element
represents a configuration property. The name of the attribute is the same as the
name of the corresponding configuration property, and the value of the attribute is
the same as the value of the property. This parameter is optional.

Indexed-Search
The Indexed-Search webject queries the indexing engine for the indexed content
of Windchill objects (if index search is installed).
It accepts a keyword string as input and returns XML-formatted results. It
includes the UFID (oob i d ), the object class, and a teaser for every associated
content item for that object. It can also include one or more spelling suggestions.

Syntax
<ie:webject name="Indexed-Search" type="OBJ">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="AND_OR_OPERATOR" data="[SIMPLEANY | SIMPLEALL]"/>
<ie:param name="ATTRIBUTE_TYPE_CONTEXT" data="attributes"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="ufid"/>
<ie:param name="FETCH_FIELDS" data="fields"/>
<ie:param name="FILTER_ACCESS" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="KEYWORD" data="keyword"/>
<ie:param name="LIBRARIES" data="libraries"/>
<ie:param name="MAX_DOCS" data="number"/>
<ie:param name="QUERY_TYPE" data="query"/>
<ie:param name="SEARCH_TIME" data="time"/>
<ie:param name="SESSION_ID" data="$(session[]session_id[])"/>
<ie:param name="SPELL_CHECK" data="[TRUE | FALSE]"/>
<ie:param name="SORTBY" data="attribute"/>
<ie:param name="SORTED" data="[ASC | DESC]"/>
<ie:param name="TYPE" data="type_name"/>
<ie:param name="TYPE_CONTAINER" data="context"/>
<ie:param name="UNFORMATTED" data="javaClass"/>
<ie:param name="WHERE" data="where_clause"/>
</ie:webject>

Parameters
Required Interdependent Optional
AND_OR_ AUTHORIZATION ACCEPT_LANGUAGE
OPERATOR
INSTANCE ATTRIBUTE_ CONNECTION_ATTEMPTS
TYPE_ CONTEXT

Windchill Adapter Webject Library 147


Required Interdependent Optional
KEYWORD CONNECTION_ATTEMPT_
INTERVAL
LIBRARIES CONTAINER_REF
TYPE_ FETCH_FIELDS
CONTAINER
FILTER_ACCESS
GROUP_OUT
MAX_DOCS
QUERY_TYPE
SEARCH_TIME
SPELL_CHECK
SORTED
SORTBY
TYPE
UNFORMATTED
WHERE

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

A N D _ O R _ O P E R AT O R
Determines if the InStream query uses SIMPLEANY (OR) or SIMPLEALL
(AND). This parameter is required.

AT T R I B U T E _ T Y P E _ C O N T E X T
When multiple types are supplied, then this parameter specifies which type should
be used as a context in which to look up attribute definitions.

C O N TA I N E R _ R E F
Filters the search results to those objects within the context reference. This
parameter is optional.

148 PTC Windchill® Adapter Guide


FETCH_FIELDS
Specifies a set of fields that are stored in indexed search to be retrieved as part of
the query.
P e r s i s t I n f o O I D is requested by default. This field is used by Search-Objects to
retrieve the results from the Indexed-Search webject results. This parameter is
optional.

F I LT E R _ A C C E S S
When set to TRUE, the indexing engine filters the results to a 'Potential' read list.
This parameter is optional.

GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

KEYWORD
A query expression identifying the keyword string to be queried for in the indexed
search.

LIBRARIES
The set of indexed search libraries (indexes) to perform the search against.

MAX_DOCS
The maximum number of documents to return during the search. This parameter is
optional.

QU ERY _T Y PE
Determines if the search uses advanced or simple search capabilities. This
parameter is optional.

SEARCH_TIME
Amount of time, in seconds, that the index engine should perform a search before
timing out. This parameter is optional.

SPELL_CHECK
If set to TRUE, then the indexing engine attempts to validate spelling and suggest
possible query terms. This parameter is optional.

Windchill Adapter Webject Library 149


SO RT B Y
Specifies a set of attributes whose sorting orders are specified by the SORTED
parameter to be sorted by and returned by the query.
Multiple values can be specified for this parameter. If multiple values are
specified, then the first value is the primary sort attribute, the second value is the
secondary sort attribute, and so on.
When multiple values are involved, if the list of SORTED parameters is shorter
than the list of SORTBY parameters, then the last SORTED is used for the
difference.
For example:
SORTBY=a SORTED=ASC
SORTBY=b SORTED=DESC
SORTBY=c
SORTBY=d
Both c and d would use descending order. If you do not specify SORTED, then all
SORTBY values use ascending as it is the default value. This parameter is
optional.

SO RT E D
Specifies whether the current attribute to sort by should be sorted as descending
(DESC) or ascending (ASC). Multiple values can be specified for this parameter.
The default value is ASC. This parameter is optional.
SORTED only produces sorted output if the SORTBY parameter is specified.

TYPE
The set of Windchill object types to constrain the search against. For example, wt.
part.WTPart or wt.doc.WTDocument.

T Y P E _ C O N TA I N E R
Determines the set of base types to be used in the search from the incoming TYPE
parameter.

WHERE
If specified, the indexing tool attempts to filter results based on the where clause.

Iteration-History
The Iteration-History webject returns all iterations of one or more Windchill
objects implementing either the wt.vc.Mastered or wt.vc.Iterated interface.

150 PTC Windchill® Adapter Guide


Syntax
<ie:webject name="Iteration-History" type="OBJ">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute_name"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="DESCRIPTOR" data="attribute_name"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_FILTER" data="group_name"/>
<ie:param name="GROUP_IN" data="group_in"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INCLUDE_ARGS" data="[TRUE | FALSE]" />
<ie:param name="INCLUDE_CONSTRAINTS" data="[TRUE | FALSE]" />
<ie:param name="INCLUDE_DESCRIPTORS" data="[TRUE | FALSE]" />
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="NEXT_OP" data="operation_name"/>
<ie:param name="OBJECT_REF" data="object_ref"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="REFERENCE_DELIMITER" data="^" />
<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="REFERENCE_OUTPUT_DELIMITER" data="^" />
<ie:param name="TYPE" data="type_name"/>
<ie:param name="UNFORMATTED" data="dataType" />
<ie:param name="WHERE" data="where_clause"/>
<ie:param name="WHERE_CASE_SENSITIVITY" data="[TRUE | FALSE]"/>
</ie:webject>

Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION ACCEPT_LANGUAGE
CONTAINER_REF ATTRIBUTE
DBUSER CONNECTION_ATTEMPTS
DESCRIPTOR CONNECTION_ATTEMPT_
INTERVAL
GROUP_FILTER FORMAT
INCLUDE_ARGS GROUP_IN
INCLUDE_CONSTRAINTS GROUP_OUT
INCLUDE_DESCRIPTORS REFERENCE_DELIMITER
NEXT_OP REFERENCE_OUTPUT_DELIMITER
OBJECT_REF UNFORMATTED
PASSWD

Windchill Adapter Webject Library 151


Required Interdependent Optional
REFERENCE_EXCEPTIONS
TYPE
WHERE
WHERE_CASE_SENSITIVITY

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

C O N TA I N E R _ R E F
A Windchill context to apply the webject against. This parameter accepts the
following types of input:
• The UFID of a Windchill context. Multiple UFIDs can be specified for this
parameter.
• MEMBERSHIP—The query finds only those contexts of which the user is a
member.
When this parameter is specified, the scope of queries executed against the TYPE
and WHERE parameters are restricted to the associated context.

GROUP_IN
The name of an input group containing one UFID per element (OBID attribute).
This parameter is optional.

GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

OBJECT_REF
The Unique Federation Identifier (UFID) of a Windchill object. Multiple values
can be specified for this parameter to identify multiple objects.
This parameter can be used instead of or in combination with WHERE. If
WHERE is not specified, then OBJECT_REF must be specified.

152 PTC Windchill® Adapter Guide


TYPE
The object type name. If WHERE is specified, TYPE must also be specified. For
more information, see Specifying the TYPE and WHERE Parameters on page 34.

WHERE
The where clause that is used to discover the objects for which to return
iterations. Objects resulting from a query must implement either wt.vc.Mastered
or wt.vc.Iterated.

LifeCycle-History
The LifeCycle-History webject returns the life cycle history of a specified
Windchill object. The specified Windchill class must implement the wt.lifecycle.
LifeCycleManaged interface.

Syntax
<ie:webject name="Lifecycle-History" type="OBJ">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="DESCRIPTOR" data="attribute_name"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_FILTER" data="group_name"/>
<ie:param name="GROUP_IN" data="group_in"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INCLUDE_ARGS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_CONSTRAINTS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_DESCRIPTORS" data="[TRUE | FALSE]"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="NEXT_OP" data="operation_name"/>
<ie:param name="OBJECT_REF" data="object_ref"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="REFERENCE_DELIMITER" data="^" />
<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="REFERENCE_OUTPUT_DELIMITER" data="^" />
<ie:param name="TYPE" data="type_name"/>
<ie:param name="UNFORMATED" data="dataType"/>
<ie:param name="WHERE" data="where_clause"/>
<ie:param name="WHERE_CASE_SENSITIVITY" data="[TRUE | FALSE]"/>
</ie:webject>

Windchill Adapter Webject Library 153


Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION ACCEPT_LANGUAGE
TYPE CONTAINER_REF ATTRIBUTE
WHERE DBUSER CONNECTION_ATTEMPTS
DESCRIPTOR CONNECTION_ATTEMPT_
INTERVAL
INCLUDE_ARGS FORMAT
INCLUDE_CONSTRAINTS GROUP_FILTER
INCLUDE_DESCRIPTORS GROUP_IN
NEXT_OP GROUP_OUT
OBJECT_REF REFERENCE_DELIMITER
PASSWD REFERENCE_OUTPUT_DELIMITER
REFERENCE_EXCEPTIONS UNFORMATTED
WHERE_CASE_SENSITIVITY

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

C O N TA I N E R _ R E F
A Windchill context to apply the webject against. This parameter accepts the
following types of input:
• The UFID of a Windchill context. Multiple UFIDs can be specified for this
parameter.
• MEMBERSHIP—The query finds only those contexts of which the user is a
member.
When this parameter is specified, the scope of queries executed against the TYPE
and WHERE parameters are restricted to the associated context.

154 PTC Windchill® Adapter Guide


GROUP_IN
The name of an input group containing one UFID per element (OBID attribute).
This parameter is optional.

GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

OBJECT_REF
The Unique Federation Identifier (UFID) of a Windchill object. Multiple values
can be specified for this parameter to identify multiple objects.
This parameter can be used instead of or in combination with WHERE. If
WHERE is not specified, then OBJECT_REF must be specified.

TYPE
The object type name. If WHERE is specified, TYPE must also be specified. For
more information, see Specifying the TYPE and WHERE Parameters on page 34.

WHERE
A query expression identifying the objects for which to query. This parameter can
be used instead of or in combination with OBJECT_REF.
If OBJECT_REF is not specified, WHERE must be specified. If WHERE is
specified, TYPE must also be specified. For more information, see Specifying the
TYPE and WHERE Parameters on page 34.

List-ContentItems
The List-ContentItems webject returns the content items for a specified Windchill
object. The specified Windchill class must implement the ContentHolder
interface.

Syntax
<ie:webject name="List-ContentItems" type="OBJ">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="DESCRIPTOR" data="attribute_name"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_FILTER" data="group_name"/>

Windchill Adapter Webject Library 155


<ie:param name="GROUP_IN" data="group_in"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INCLUDE_ARGS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_CONSTRAINTS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_DESCRIPTORS" data="[TRUE | FALSE]"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="NEXT_OP" data="operation_name"/>
<ie:param name="OBJECT_REF" data="object_ref"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="REFERENCE_DELIMITER" data="^" />
<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="REFERENCE_OUTPUT_DELIMITER" data="^" />
<ie:param name="STAGING_AREA" data="pathname"/>
<ie:param name="TYPE" data="type_name"/>
<ie:param name="UNFORMATED" data="dataType"/>
<ie:param name="WHERE" data="where_clause"/>
<ie:param name="WHERE_CASE_SENSITIVITY" data="[TRUE | FALSE]"/>
</ie:webject>

Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION ACCEPT_LANGUAGE
CONTAINER_REF ATTRIBUTE
DBUSER CONNECTION_ATTEMPTS
DESCRIPTOR CONNECTION_ATTEMPT_
INTERVAL
GROUP_FILTER FORMAT
INCLUDE_ARGS GROUP_IN
INCLUDE_CONSTRAINTS GROUP_OUT
INCLUDE_DESCRIPTORS REFERENCE_DELIMITER
NEXT_OP REFERENCE_OUTPUT_DELIMITER
OBJECT_REF UNFORMATTED
PASSWD
REFERENCE_EXCEPTIONS
STAGING_AREA
TYPE
WHERE
WHERE_CASE_SENSITIVITY

156 PTC Windchill® Adapter Guide


Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

C O N TA I N E R _ R E F
A Windchill context to apply the webject against. This parameter accepts the
following types of input:
• The UFID of a Windchill context. Multiple UFIDs can be specified for this
parameter.
• MEMBERSHIP—The query finds only those contexts of which the user is a
member.
When this parameter is specified, the scope of queries executed against the TYPE
and WHERE parameters are restricted to the associated context.

GROUP_IN
The name of an input group containing one UFID per element (OBID attribute).
This parameter is optional.
The output group of Query-Objects webject, querying some content holder
objects, can be used as this input group.

GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

OBJECT_REF
The Unique Federation Identifier (UFID) of the Windchill object from which to
list contents.
Multiple values can be specified for this parameter. This parameter can be used
instead of or in combination with WHERE and GROUP_IN. If neither WHERE
nor GROUP_IN is specified, OBJECT_REF must be specified. Otherwise, you
can also use STAGING_AREA.

S TA G I N G _ A R E A
Specifies a relative path to a file directory located on a server where content items
that have been previously staged are now located.

Windchill Adapter Webject Library 157


Use this parameter to return a list of previously staged content items rather than
returning a list of content items associated with a specific content holder object.
This parameter is mutually exclusive with the OBJECT_REF, TYPE, GROUP_
IN, and WHERE parameters
If neither WHERE nor TYPE (or, alternatively, OBJECT_REF) are specified, then
you can use STAGING_AREA to identify a directory to which content items have
been previously uploaded using the Add-ContentItems webject. As a result, List-
ContentItems returns an output group containing elements that provide identifiers
for the previously staged content items.
Each element includes a source attribute specifying the name of the source file,
and a staged_file_id attribute providing an identifier for the staged content
item. You can later use this identifier in the STAGED_FILE_ID parameter of the
Add-ContentItems webject to select staged items to transfer into the database, as
well as in the Delete-ContentItems and Get-ContentItems webjects.
The STAGING_AREA parameter is enabled only when an administrator has
defined the wt.adapter.stagingAreaRoot property, which identifies the
root file directory path of the staging area. The value specified for the STAGING_
AREA parameter is appended to this property to create an absolute file path to the
directory in which staged content items are stored. The
wt.adapter.stagingAreaRoot property can be set in the
wt.properties file
The absolute path for the staged files is:
stagingAreaRoot/STAGING_AREA/username
• stagingAreaRoot is the value defined for the
wt.adapter.stagingAreaRoot property.
• STAGING_AREA is the value specified for this parameter.
• username is the user name of the current user.
If the current user has one or more alternate user names, you cannot predict or
control which alternate name is used to build the staging area directory path.

TYPE
The object type name. If WHERE is specified, TYPE must also be specified. For
more information, see Specifying the TYPE and WHERE Parameters on page 34.

WHERE
Aquery expression identifying the objects to be queried. This parameter can be
used instead of or in combination with OBJECT_REF and GROUP_IN. If neither
OBJECT_REF nor GROUP_IN is specified, WHERE must be specified. If
WHERE is specified, then TYPE must also be specified. For additional
information, see Specifying the TYPE and WHERE Parameters on page 34.

158 PTC Windchill® Adapter Guide


List-FolderContents
Returns a group that lists the objects contained within a specified folder or
cabinet, which acts as a top-level folder.

Syntax
<ie:webject name="List-FolderContents" type="OBJ">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="CONTENT_TYPE" data="content_type"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="DESCRIPTOR" data="attribute_name"/>
<ie:param name="FOLDER_PATH" data="pathname"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_FILTER" data="group_name"/>
<ie:param name="GROUP_IN" data="group_in"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INCLUDE_ARGS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_CONSTRAINTS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_DESCRIPTORS" data="[TRUE | FALSE]"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="NEXT_OP" data="operation_name"/>
<ie:param name="OBJECT_REF" data="ufid"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="REFERENCE_DELIMITER" data="^" />
<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="REFERENCE_OUTPUT_DELIMITER" data="^" />
<ie:param name="TYPE" data="type_name"/>
<ie:param name="UNFORMATTED" data="dataType" />
<ie:param name="WHERE" data="where-clause"/>
<ie:param name="WHERE_CASE_SENSITIVITY" data="[TRUE | FALSE]"/>
</ie:webject>

Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION ACCEPT_LANGUAGE
CONTAINER_REF ATTRIBUTE
DBUSER CONNECTION_ATTEMPTS
DESCRIPTOR CONNECTION_ATTEMPT_
INTERVAL
FOLDER_PATH CONTENT_TYPE
GROUP_FILTER FORMAT
INCLUDE_ARGS GROUP_IN

Windchill Adapter Webject Library 159


Required Interdependent Optional
INCLUDE_CONSTRAINTS GROUP_OUT
INCLUDE_DESCRIPTORS REFERENCE_DELIMITER
NEXT_OP REFERENCE_OUTPUT_DELIMITER
OBJECT_REF UNFORMATTED
PASSWD
REFERENCE_EXCEPTIONS
TYPE
WHERE
WHERE_CASE_SENSITIVITY

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

C O N TA I N E R _ R E F
A Windchill context to apply the webject against. This parameter accepts the
following types of input:
• The UFID of a Windchill context. Multiple UFIDs can be specified for this
parameter.
• MEMBERSHIP—The query finds only those contexts of which the user is a
member.
When this parameter is specified, the scope of queries executed against the TYPE
and WHERE and FOLDER_PATH parameters are restricted to the associated
context.

CONTENT_TYPE
The types of objects to return. Multiple values can be specified for this parameter
in order to identify multiple types of objects to return.
Each value of this parameter is the fully qualified name of a modeled class or
subtype. If this parameter is omitted, all objects contained within the folder are
returned. This parameter is optional.

160 PTC Windchill® Adapter Guide


F O L D E R _ PAT H
The fully qualified path of the folder or cabinet for which contents are returned.
The string after the first “/” in the path must be the name of a cabinet. For
example, the path name of “a_folder” under the “System” cabinet is /System/
a_folder.
If just “/” is specified, then all root-level cabinets are returned.
Multiple values can be specified for this parameter. This parameter can be used
instead of, or in addition to, TYPE, WHERE and OBJECT_REF to specify the
folder.

GROUP_IN
Name of an input group containing one UFID per element (OBID attribute) that
represents a folder or cabinet. This parameter is optional.

GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

OBJECT_REF
The Unique Federation Identifier (UFID) of a Windchill object. Multiple values
can be specified for this parameter to identify multiple objects.
This parameter can be used instead of or in combination with WHERE,
FOLDER_PATH, and GROUP_IN.

TYPE
The object type name. If WHERE is specified, TYPE must also be specified. For
more information, see Specifying the TYPE and WHERE Parameters on page 34.

WHERE
A query expression identifying the objects for which to query. This parameter can
be used instead of or in combination with OBJECT_REF, FOLDER_PATH, and
GROUP_IN.
If WHERE is specified, then TYPE must also be specified. For more information,
see Specifying the TYPE and WHERE Parameters on page 34.

Query-Links
The Query-Links webject navigates associations between Windchill objects. If it
is given a base object, it returns all of the objects associated with the base object
by a specified relationship and role.

Windchill Adapter Webject Library 161


Syntax
<ie:webject name="Query-Links" type="OBJ">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute_name"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="AUTO_NAVIGATE" data="[TRUE|FALSE]"/>
<ie:param name="CONFIGSPEC_OBJECT_META" data="meta_name"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTENT_TYPE" data="content_type"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="DESCRIPTOR" data="attribute_name"/>
<ie:param name="DIRECTION" data="role-name"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_FILTER" data="group_name"/>
<ie:param name="GROUP_IN" data="group_in"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INCLUDE_ARGS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_CONSTRAINTS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_DESCRIPTORS" data="[TRUE | FALSE]"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="NEXT_OP" data="operation_name"/>
<ie:param name="OBJECT_REF" data="ufid"/>
<ie:param name="OUTPUT_TYPE"
data="[OTHER_SIDE | RELATION | FULL]"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="REFERENCE_DELIMITER" data="^" />
<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="REFERENCE_OUTPUT_DELIMITER" data="^" />
<ie:param name="SELECTBY" data="config_spec_name" />
<ie:param name="SELECTBY_BASELINE_REF"
data="selectby_baseline" />
<ie:param name="SELECTBY_CONFIG_ITEM_REF" data="ufid" />
<ie:param name="SELECTBY_CONFIGSPEC_REF" data="ufid" />
<ie:param name="SELECTBY_DATE" data="date" />
<ie:param name="SELECTBY_IN_USE_BY_USER" data="[TRUE | FALSE]" />
<ie:param name="SELECTBY_INCLUDE_WORKING" data="[TRUE | FALSE]"/>
<ie:param name="SELECTBY_LIFECYCLE_STATE"
data="selectby_lifecycle_state" />
<ie:param name="SELECTBY_UNIT" data="unit_value" />
<ie:param name="SELECTBY_VIEW_REF" data="view_object_ufid" />
<ie:param name="TYPE" data="type_name"/>
<ie:param name="UNFORMATTED" data="dataType" />
</ie:webject>

Parameters
Required Interdependent Optional
DIREC- AUTHORIZATION ACCEPT_LANGUAGE
TION
INSTANCE CONFIGSPEC_OBJECT_META ATTRIBUTE
TYPE DBUSER AUTO_NAVIGATE
GROUP_IN CONNECTION_ATTEMPTS

162 PTC Windchill® Adapter Guide


Required Interdependent Optional
DESCRIPTOR CONNECTION_ATTEMPT_
INTERVAL
GROUP_FILTER CONTENT_TYPE
INCLUDE_ARGS FORMAT
INCLUDE_CONSTRAINTS GROUP_OUT
INCLUDE_DESCRIPTORS OUTPUT_TYPE
NEXT_OP REFERENCE_DELIMITER
OBJECT_REF REFERENCE_OUTPUT_DELIMITER
PASSWD UNFORMATTED
REFERENCE_EXCEPTIONS
SELECTBY
SELECTBY_BASELINE_REF
SELECTBY_CONFIG_ITEM_REF
SELECTBY_CONFIGSPEC_REF
SELECTBY_DATE
SELECTBY_IN_USE_BY_USER
SELECTBY_INCLUDE_
WORKING
SELECTBY_LIFECYCLE_STATE
SELECTBY_UNIT
SELECTBY_VIEW_REF

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

Windchill Adapter Webject Library 163


A U T O _ N AV I G AT E
Specifies whether the initial navigation results should be post-processed
automatically to produce results that are usually more directly usable. If not
specified, the default value is TRUE. This parameter is optional.
In Windchill, product structures are constructed from iterated and versioned
objects that have a master and iteration data model.
The root of a product structure is a master object that might have multiple
iterations. Masters are linked to their iterations, and each iteration is linked, in
turn, to the masters that represent their children in the product structure. Typically,
applications do not want to navigate the master and iteration links themselves.
Instead, they prefer to see only the iterations, which contain all of the relevant
attributes.
The AUTO_NAVIGATE parameter enables the webject to navigate automatically
from masters to iterations so that the output group contains the information that
the federated client application typically seeks. The AUTO_NAVIGATE
parameter also enables the webject to de-reference LightweightProxy objects
automatically, returning elements in the output group that have been retrieved
from remote systems.

C O N F I G S P E C _ O B J E C T _ M E TA
The name of the metadata containing the ConfigSpec object to use when filtering
objects. This parameter only applies if SELECTBY=CONFIGSPEC_OBJECT.
This parameter is not required. The default value is
com.ptc.windchill.configSpec.

CONTENT_TYPE
The types of objects to return. Multiple values can be specified for this parameter
in order to identify multiple types of objects to return. Each value of this
parameter is the fully qualified name of a modeled class or subtype.
If this parameter is omitted, all objects contained within the folder are returned.
This parameter is optional.

DIRECTION
The role of the link class played by the objects to be returned. For example:
u s e d B y , r e f e r e n c e s , and r e f e r e n c e d B y . Valid values are dependent upon the
link classes defined by the TYPE parameter. This parameter is required.

GROUP_IN
Specifies a group containing objects. For each element of the group that contains
an object ID (OBID) attribute, the object referenced by the OBID attribute value is
used as a base object.

164 PTC Windchill® Adapter Guide


If not specified, the OBJECT_REF parameter must be specified. If the OBJECT_
REF parameter is not specified, this parameter must be specified. If both the
OBJECT_REF and GROUP_IN parameters are specified, the multiple indicated
base objects are navigated.

GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

OBJECT_REF
The Unique Federation Identifier (UFID) of a Windchill object. Multiple values
can be specified for this parameter to identify multiple objects.
This parameter can be used instead of or in combination with WHERE. If
WHERE is not specified, then OBJECT_REF must be specified.

OUTPUT_TYPE
Specifies whether to return the associated objects, the link objects themselves, or
both. Link objects are the objects defining the relationship between two objects.
Valid values for this parameter are the following:
• OTHER_SIDE—Returns the objects to which objects specified by TYPE,
WHERE, or OBJECT_REF are related.
• RELATION—Returns the link objects themselves.
• FULL—Returns the objects to which specified objects are related, merged
with attributes from the link objects that define each such relationship. The
name of each attribute obtained from a link object is formed by concatenating
the object class name of the link object with attribute name from the link
object in the following format:
wt.part.WTPartUsageLink.quantity.amount

○ wt.part.WTPartUsageLink is the class of a link object.


○ quantity.amount is the name of the link object attribute.
The default for this parameter is OTHER_SIDE. This parameter is optional.

Windchill Adapter Webject Library 165


SELECTBY
The Windchill configuration specification that is applied when the objects
referenced by the specified type of link are members of a product structure
(versioned objects). Valid values for this parameter are:
• LATEST—Returns the latest versions of the objects.
• USER—Returns objects selected by the default configuration specification
defined for the calling user. If the calling user has no default configuration
specification, LATEST is used.
• BASELINE—Returns objects associated with a specific baseline. The
SELECTBY_BASELINE_REF parameter must also be specified to identify
the baseline to apply.
• VIEW—Returns objects associated with a specific view. The SELECTBY_
VIEW_REF parameter must also be specified to identify the view to apply.
• LIFECYCLE —Returns objects associated with a specific lifecycle state. The
SELECTBY_LIFECYCLE_STATE parameter must also be specified to
identify the lifecycle state to apply.
• IN_USE—Returns objects that are in use.
• EFFECTIVITY—Returns objects associated with specific effectivities. The
SELECTBY_CONFIG_ITEM_REF, SELECTBY_DATE, and SELECTBY_
UNIT parameters must also be specified to define the effectivity constraints to
apply.
• STANDARD—Returns objects associated with the standard configuration
specification. The SELECTBY_VIEW_REF, SELECTBY_LIFECYCLE_
STATE, and SELECTBY_INCLUDE_WORKING parameters can also be
specified to identify constraints to apply.

Note
This value is specific to WTPart objects.

• STANDARD_DOCUMENT—Selects objects associated with the standard


configuration specification. The SELECTBY_LIFECYCLE_STATE,
SELECTBY_INCLUDE_WORKING, and SELECTBY_IN_USE_BY_USER
parameters can also be specified to identify constraints to apply.
• CONFIGSPEC_REF—Selects objects based on a configured and persisted
ConfigSpec object. The SELECTBY_CONFIGSPEC_REF parameter must
also be specified.
• CONFIGSPEC_OBJECT—Allows a custom ConfigSpec object to be
programmatically constructed and passed to the webject to use during
filtering. The CONFIGSPEC_OBJECT_META parameter may also be

166 PTC Windchill® Adapter Guide


specified. Using the SELECTBY value requires that a GROUP_IN is supplied
to seed navigation and that the ConfigSpec object has been stored on the
GROUP_IN object as metadata.
The default for this parameter is LATEST. This parameter is ignored when
AUTO_NAVIGATE is specified as FALSE

SELECTBY_BASELINE_REF
The UFID of a baseline object used when SELECTBY is specified as BASELINE.

SELECTBY_CONFIG_ITEM_REF
The UFID of a configuration item used when SELECTBY is specified as
EFFECTIVITY. When this parameter is specified, either SELECTBY_DATE or
SELECTBY_UNIT must also be specified.

SELECTBY_CONFIGSPEC_REF
A reference to a persisted ConfigSpec object to use in filtering objects.

S E L E C T B Y _ D AT E
A date used when SELECTBY is specified as EFFECTIVITY. This parameter can
be used by itself, or it in conjunction with SELECTBY_CONFIG_ITEM_REF.

SELECTBY_IN_USE_BY_USER
Specifies whether only to select objects in use by the user. This parameter is a
boolean. It is only used of SELECTBY=STANDARD_DOCUMENT. If not
specified, then in use is not used as criteria when selecting objects.

SELECTBY_INCLUDE_WORKING
Specifies whether to include working objects when SELECTBY is specified as
STANDARD. Working objects are objects in the personal cabinet of a user. Valid
values for this parameter are TRUE and FALSE. The default for this parameter is
TRUE.

S E L E C T B Y _ L I F E C Y C L E _ S TAT E
The name of a life cycle state used when SELECTBY is specified as LIFECYCLE
or STANDARD.

SELECTBY_UNIT
A unit value used when SELECTBY is specified as EFFECTIVITY. If this
parameter is specified, then SELECTBY_CONFIG_ITEM_REF must also be
specified.

Windchill Adapter Webject Library 167


SELECTBY_VIEW_REF
The UFID of a view object used when SELECTBY is specified as VIEW or
STANDARD.

TYPE
The object type name. If WHERE is specified, TYPE must also be specified. For
more information, see Specifying the TYPE and WHERE Parameters on page 34.
OBJECT_REF can be specified instead of or in addition to this parameter. This
parameter is required.

Query-Master
The Query-Master webject retrieves the master object of the Windchill object
specified by the webject parameters. The webject returns a reference to the master
object associated with an iteration.

Note
This webject is obsolete.

Syntax
<ie:webject name="Query-Master" type="OBJ">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute_name"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="SESSION_ID" data="$(session_id[]SESSION_ID[])"/>
<ie:param name="TYPE" data="type_name"/>
<ie:param name="WHERE" data="where_clause"/>
<ie:param name="WHERE_CASE_SENSITIVITY" data="[TRUE | FALSE]"/>
</ie:webject>

168 PTC Windchill® Adapter Guide


Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION ACCEPT_LANGUAGE
TYPE CONTAINER_REF ATTRIBUTE
WHERE DBUSER CONNECTION_ATTEMPTS
PASSWD CONNECTION_ATTEMPT_
INTERVAL
REFERENCE_EXCEPTIONS FORMAT
WHERE_CASE_SENSITIVITY GROUP_OUT
SESSION_ID

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

C O N TA I N E R _ R E F
A Windchill context to apply the webject against. This parameter accepts the
following types of input:
• The UFID of a Windchill context. Multiple UFIDs can be specified for this
parameter.
• MEMBERSHIP—The query finds only those contexts of which the user is a
member.
When this parameter is specified, the scope of queries executed against the TYPE
and WHERE parameters are restricted to the associated context.

GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

TYPE
The object type name. If WHERE is specified, TYPE must also be specified. For
more information, see Specifying the TYPE and WHERE Parameters on page 34.

Windchill Adapter Webject Library 169


WHERE
A query expression identifying the objects for which to query. This parameter can
be used instead of or in combination with OBJECT_REF.
If OBJECT_REF is not specified, WHERE must be specified. If WHERE is
specified, TYPE must also be specified. For more information, see Specifying the
TYPE and WHERE Parameters on page 34.

Query-Objects
The Query-Objects webject fetches or queries for Windchill objects. Objects can
be explicitly retrieved by specifying the OBJECT_REF parameter and specifying
a list of attributes to retrieve on the ATTRIBUTE parameter.
You can search for objects by specifying the type of object on the TYPE
parameter, one or more search criteria on the WHERE parameter (to restrict the
search), and which attributes to return in the results on the ATTRIBUTE
parameter.
For more information on the use of the WHERE parameter see, Specifying the
TYPE and WHERE Parameters on page 34.

Syntax
<ie:webject name="Query-Objects" type="OBJ">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CASE_IGNORE" data="[TRUE | FALSE]"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="DESCRIPTOR" data="attribute_name"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_FILTER" data="group_name"/>
<ie:param name="GROUP_IN" data="group_in" />
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INCLUDE_ARGS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_CONSTRAINTS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_DESCRIPTORS" data="[TRUE | FALSE]"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="NEXT_OP" data="operation_name"/>
<ie:param name="OBJECT_REF" data="ufid"/>
<ie:param name="PAGE_COUNT" data="pageCount"/>
<ie:param name="PAGE_OFFSET" data="pageOffset"/>
<ie:param name="PAGING_SESSION_ID" data="pagingSessionId"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="PURGE_DEFAULT" data="[TRUE | FALSE]"/>
<ie:param name="REFERENCE_DELIMITER" data="^" />
<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="REFERENCE_OUTPUT_DELIMITER" data="^" />
<ie:param name="SESSION_ID" data="$(session[]session_id[])"/>
<ie:param name="SORTBY" data="sortBy"/>
<ie:param name="SORTED" data="sorted"/>

170 PTC Windchill® Adapter Guide


<ie:param name="TYPE" data="type_name"/>
<ie:param name="UNFORMATTED" data="dataType" />
<ie:param name="WHERE" data="where_clause"/>
<ie:param name="WHERE_CASE_SENSITIVITY" data="[TRUE | FALSE]"/>
</ie:webject>

Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION ACCEPT_LANGUAGE
CASE_IGNORE ATTRIBUTE
CONTAINER_REF CONNECTION_ATTEMPTS
DBUSER CONNECTION_ATTEMPT_
INTERVAL
DESCRIPTOR FORMAT
GROUP_FILTER GROUP_IN
INCLUDE_ARGS GROUP_OUT
INCLUDE_CONSTRAINTS PAGE_OFFSET
INCLUDE_DESCRIPTORS PAGING_SESSION_ID
NEXT_OP PURGE_DEFAULT
OBJECT_REF REFERENCE_DELIMITER
PAGE_COUNT REFERENCE_OUTPUT_DELIMITER
PASSWD SESSION_ID
REFERENCE_EXCEPTIONS SORTBY
TYPE SORTED
WHERE UNFORMATTED
WHERE_CASE_SENSITIVITY

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

Windchill Adapter Webject Library 171


CASE_IGNORE
Determines whether or not sorting should be case sensitive.

C O N TA I N E R _ R E F
A Windchill context to apply the webject against. This parameter accepts the
following types of input:
• The UFID of a Windchill context. Multiple UFIDs can be specified for this
parameter.
• MEMBERSHIP—The query finds only those contexts of which the user is a
member.
When this parameter is specified, the scope of queries executed against the TYPE
and WHERE parameters are restricted to the associated context.

GROUP_IN
The name of an input group containing one UFID per element (OBID attribute).
This parameter is optional.

GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

OBJECT_REF
The Unique Federation Identifier (UFID) of a Windchill object. Multiple values
can be specified for this parameter to identify multiple objects.
This parameter can be used instead of or in combination with WHERE. If
WHERE is not specified, then OBJECT_REF must be specified.

PA G E _ C O U N T
Specifies how many objects to return per page in a paged query. Specifying
PAGE_COUNT without a PAGING_SESSION_ID establishes a new paging
session. Subsequent pages in a paging session can be retrieved by specifying
PAGING_SESSION_ID, PAGE_COUNT, and PAGE_OFFSET.
SORTED and SORTBY can only be used within the context of a paged query;
thus, they are ignored unless PAGE_COUNT is also specified.

PA G E _ O F F S E T
Specifies from where in the paging session to get the next set of results. This
parameter is optional.

172 PTC Windchill® Adapter Guide


PA G I N G _ S E S S I O N _ I D
The unique identifier for the current paging session. The value and the size of the
complete result for this parameter can be retrieved from metadata on the GROUP_
OUT parameter.
The metadata keys are c o m . p t c . w i n d c h i l l . p a g i n g S e s s i o n . i d and c o m . p t c .
windchill.pagingSession.size.
If this parameter is present, then the next page of results is fetched from the
paging session. Otherwise, a new query is performed. This parameter is optional.

P U R G E _ D E FA U LT
Specifies whether to purge the suggested values from the return group. Accepted
values are TRUE or FALSE. The default value for this parameter is FALSE. If the
parameter is set to TRUE, it purges the suggested values from the return group.
This parameter is optional.

SO RT B Y
Specifies a set of attributes whose sorting orders are specified by the SORTED
parameter to be sorted by and returned by the query.
Multiple values can be specified for this parameter. If multiple values are
specified, then the first value is the primary sort attribute, the second value is the
secondary sort attribute, and so on.
When multiple values are involved, if the list of SORTED parameters is shorter
than the list of SORTBY parameters, then the last SORTED is used for the
difference.
For example:
SORTBY=a SORTED=ASC
SORTBY=b SORTED=DESC
SORTBY=c
SORTBY=d
Both c and d would use descending order. If you do not specify SORTED, then all
SORTBY values use ascending as it is the default value. This parameter is
optional.

SO RT E D
Specifies whether the current attribute to sort by should be sorted as descending
(DESC) or ascending (ASC). Multiple values can be specified for this parameter.
The default value is ASC. This parameter is optional.
SORTED only produces sorted output if the SORTBY parameter is specified.

Windchill Adapter Webject Library 173


TYPE
The Windchill object type name. If WHERE is specified, TYPE must also be
specified.
TYPE is ignored unless WHERE is specified or if PAGING_SESSION_ID and
ATTRIBUTE are specified together. When fetching subsequent pages from paged
query results and specifying the ATTRIBUTE parameter, the TYPE parameter is
necessary to properly discover the context of the correct underlying attributes to
return.

WHERE
A query expression identifying the objects to be queried. For more information,
see Specifying the TYPE and WHERE Parameters on page 34.
Either the OBJECT_REF parameter or TYPE and WHERE are required.

Q u e r y - Tr e e
The Query-Tree webject recursively navigates associations between Windchill
objects, producing a tree of related objects.
A bill of materials (BOM) is an example of a tree of related objects. Given one or
more base objects, this webject returns all of the objects associated with the base
objects by a specified set of relationships. The webject performs this navigation
operation recursively until it has descended a product structure to a maximum
specified depth.
The output group produced by the webject contains elements representing all of
the objects discovered by the recursive navigation process. In addition, when the
MODE parameter is specified with the value FLAT, this webject supplies each
element with the following metadata:
• com.infoengine.object.id
The unique identifier of the object represented by the element.
• com.infoengine.object.type
The type of object represented by the element. For example, the Java class
name is an object represented by the element.
• com.infoengine.depth
The depth in the product structure, relative to the base objects, at which the
object represented by the element was discovered. For example, base objects
have a depth of 0, so their immediate children have a depth of 1.
• com.infoengine.link.[class].[role]
Specifies a relationship between the object represented by the element and
another object. The value is an object identifier matching the c o m .
i n f o e n g i n e . o b j e c t . i d value of some other element in the output group.

174 PTC Windchill® Adapter Guide


○ The class component of the value name specifies the class name of the
Windchill link class defining the relationship.
○ The role component identifies the role that the related object plays in the
relationship.
An example is
com.infoengine.link.wt.part.WTPartUsageLink.uses.

Syntax
<ie:webject name="Query-Tree" type="OBJ">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute_name"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="AUTO_NAVIGATE" data="[TRUE|FALSE]"/>
<ie:param name="CIRCULAR_REFERENCE_BEHAVIOR"
data="[EXCEPTION | LABEL]"/>
<ie:param name="CONFIGSPEC_OBJECT_META" data="meta_name"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="DEPTH" data="integer"/>
<ie:param name="DESCRIPTOR" data="attribute_name"/>
<ie:param name="DETECT_CIRCULAR_REFERENCES"
data="[TRUE | FALSE]"/>
<ie:param name="DIRECTION" data="role-name"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_FILTER" data="group_name"/>
<ie:param name="GROUP_IN" data="group_in"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INCLUDE_ARGS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_CONSTRAINTS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_DESCRIPTORS" data="[TRUE | FALSE]"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="MODE" data="[FLAT | NESTED]"/>
<ie:param name="NEXT_OP" data="operation_name"/>
<ie:param name="OBJECT_REF" data="ufid"/>
<ie:param name="OUTPUT_TYPE" data="[OTHER_SIDE | FULL]"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="SELECTBY" data="config_spec_name"/>
<ie:param name="SELECTBY_BASELINE_REF" data="baseline"/>
<ie:param name="SELECTBY_CONFIG_ITEM_REF" data="ufid"/>
<ie:param name="SELECTBY_CONFIGSPEC_REF" data="ufid" />
<ie:param name="SELECTBY_DATE" data="date"/>
data="[TRUE | FALSE]"/>
<ie:param name="SELECTBY_IN_USE_BY_USER" data="[TRUE | FALSE]" />
<ie:param name="SELECTBY_INCLUDE_WORKING"
data="[TRUE | FALSE]"/>
<ie:param name="SELECTBY_LIFECYCLE_STATE"
data="lifecycle_state"/>
<ie:param name="SELECTBY_UNIT" data="unit_value"/>
<ie:param name="SELECTBY_VIEW_REF" data="view_object_ufid"/>
<ie:param name="SESSION_ID" data="$(session_id[]SESSION_ID[])"/>
<ie:param name="TYPE" data="type_name"/>
<ie:param name="WHERE" data="where_clause"/>
<ie:param name="WHERE_CASE_SENSITIVITY" data="[TRUE | FALSE]"/>
</ie:webject>

Windchill Adapter Webject Library 175


Parameters
Required Interdependent Optional
DIREC- AUTHORIZATION ACCEPT_LANGUAGE
TION
INSTANCE AUTO_NAVIGATE_TOPLEVEL ATTRIBUTE
CONFIGSPEC_OBJECT_META AUTO_NAVIGATE
DBUSER CIRCULAR_REFERENCE_
BEHAVIOR
DESCRIPTOR CONNECTION_ATTEMPTS
GROUP_FILTER CONNECTION_ATTEMPT_
INTERVAL
GROUP_IN DEPTH
INCLUDE_ARGS DETECT_CIRCULAR_REFERENCES
INCLUDE_CONSTRAINTS FORMAT
INCLUDE_DESCRIPTORS GROUP_OUT
NEXT_OP MODE
OBJECT_REF OUTPUT_TYPE
PASSWD SESSION_ID
REFERENCE_EXCEPTIONS
SELECTBY
SELECTBY_BASELINE_REF
SELECTBY_CONFIG_ITEM_REF
SELECTBY_CONFIGSPEC_REF
SELECTBY_DATE
SELECTBY_IN_USE_BY_USER
SELECTBY_INCLUDE_
WORKING
SELECTBY_LIFECYCLE_STATE
SELECTBY_UNIT
SELECTBY_VIEW_REF
TYPE

176 PTC Windchill® Adapter Guide


Required Interdependent Optional
WHERE
WHERE_CASE_SENSITIVITY

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

A U T O _ N AV I G AT E
Specifies whether the initial navigation results should be post-processed
automatically to produce results that are usually more directly usable. If not
specified, the default value is TRUE. This parameter is optional.
In Windchill, product structures are constructed from iterated and versioned
objects that have a master and iteration data model.
The root of a product structure is a master object that might have multiple
iterations. Masters are linked to their iterations, and each iteration is linked, in
turn, to the masters that represent their children in the product structure. Typically,
applications do not want to navigate the master and iteration links themselves.
Instead, they prefer to see only the iterations, which contain all of the relevant
attributes.
The AUTO_NAVIGATE parameter enables the webject to navigate automatically
from masters to iterations so that the output group contains the information that
the federated client application typically seeks. The AUTO_NAVIGATE
parameter also enables the webject to de-reference LightweightProxy objects
automatically, returning elements in the output group that have been retrieved
from remote systems.

A U T O _ N AV I G AT E _ TO P L E V E L
If set to TRUE, then the AUTO_NAVIGATE parameter applies to the top-level
object in a product structure.
If AUTO_NAVIGATE_TOPLEVEL is set to FALSE, then the AUTO_
NAVIGATE parameter works as it typically does. The default is FALSE.
Depending on the type of relationship within a structure, it might not be possible
to apply automatic navigation to the top-level object.
This parameter only applies if AUTO_NAVIGATE is set to TRUE.

Windchill Adapter Webject Library 177


C I R C U L A R _ R E F E R E N C E _ B E H AV I O R
The webject behavior when a circular reference is detected. This parameter is
optional.
• EXCEPTION—The expansion of the tree is terminated. This is the default
value.
• LABEL—The webject causes metadata to be placed on the group and
elements. Nodes that are detected as being the first circular node are inserted
into the output, but are not expanded further.
When specified as LABEL, the following information is added:
• On the output group produced by the webject:
com.infoengine.circular.contains=true
This signals that the output group contains circular references.
• On the original element that is referenced by one of its descendants:
com.infoengine.circular.referenced=true
This signals that this element is the original node that has children, one of
which refers back to this element.
• On the element that duplicates an element previously expanded within the path
between this element and the root of the tree:
com.infoengine.circular.reference=true
Expanding on this element further constitutes a re-expansion of a portion of
the tree previously expanded, allowing it to loop back on itself.

C O N F I G S P E C _ O B J E C T _ M E TA
The name of the metadata containing the ConfigSpec object to use when filtering
objects. This parameter only applies if SELECTBY=CONFIGSPEC_OBJECT.
The default value is com.ptc.windchill.configSpec.

DEPTH
The maximum number of levels of product structure to descend recursively. If not
specified, the default value is 1. This parameter is optional.

DETECT_CIRCULAR_REFERENCES
If specified as TRUE, the webject attempts to detect circular references. If
specified as FALSE, the webject does not detect circular references. The default
value for this parameter is FALSE. This parameter is optional.

178 PTC Windchill® Adapter Guide


Note
If specified as TRUE, the action the webject takes when circular references are
detected can be tailored by using the CIRCULAR_REFERENCE_
BEHAVIOR parameter.

DIRECTION
The role played by the link class for the objects to be returned. For example:
u s e d B y , r e f e r e n c e s , and r e f e r e n c e d B y .
Valid values are dependent upon the link classes defined by the TYPE parameter.
If the TYPE parameter is multi-valued, the DIRECTION parameter must be multi-
valued, and the number of values specified for these two parameters must be the
same. Each value of the TYPE parameter corresponds with a value of the
DIRECTION parameter.
This parameter is required.

GROUP_IN
Specifies a group containing objects. For each element of the group that contains
an object ID (OBID) attribute, the object referenced by the OBID attribute value is
used as a base object.
If not specified, the OBJECT_REF parameter must be specified. If the OBJECT_
REF parameter is not specified, this parameter must be specified. If both the
OBJECT_REF and GROUP_IN parameters are specified, the multiple indicated
base objects are navigated.

GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

MODE
The mode of the list contained in the output group. Valid values for this parameter
are the following:
• FLAT—The output group contains a flat list of objects. Relationships between
objects and the relative depth of each object within the tree are registered in
metadata returned in each object.
• NESTED—The output group contains a nested list of objects. Each object that
has children includes attributes whose values are the children.

Windchill Adapter Webject Library 179


The names of these attributes are formed by concatenating the class name of
the link that defines the parent and child relationship with the role name
associated with the children. For example, if the link class is wt.part.
WTPartUsageLink, and the role of the children is named “uses,” then an
object having children will have an attribute named wt.part.
WTPartUsageLink.uses and each value of this attribute is a child object. If a
child object has children, it too will have attributes containing its children,
recursively.
The default for this parameter is FLAT. This parameter is optional.

OBJECT_REF
Specifies the Unique Federation Identifier (UFID) of an object that serves as the
base object, and returns all objects associated with this base object by the
relationship specified in the TYPE parameter (and, recursively, all objects related
to those objects).
If this parameter is multi-valued, the multiple base objects are navigated, and the
output group contains the combination of all objects associated with multiple base
objects by the link classes specified by the TYPE parameter.
If this parameter is not specified, then the GROUP_IN parameter must be
specified. If this parameter and GROUP_IN are both specified, then multiple
indicated base objects are navigated.

OUTPUT_TYPE
Specifies whether to return the associated objects, the link objects themselves, or
both. Link objects are the objects defining the relationship between two objects.
Valid values for this parameter are the following:
• OTHER_SIDE—Returns the objects to which objects specified by TYPE,
WHERE, or OBJECT_REF are related.
• RELATION—Returns the link objects themselves.
• FULL—Returns the objects to which specified objects are related, merged
with attributes from the link objects that define each such relationship. The
name of each attribute obtained from a link object is formed by concatenating
the object class name of the link object with attribute name from the link
object in the following format:
wt.part.WTPartUsageLink.quantity.amount

○ wt.part.WTPartUsageLink is the class of a link object.


○ quantity.amount is the name of the link object attribute.
The default for this parameter is OTHER_SIDE. This parameter is optional.

180 PTC Windchill® Adapter Guide


SELECTBY
The Windchill configuration specification that is applied when the objects
referenced by the specified type of link are members of a product structure
(versioned objects). Valid values for this parameter are:
• LATEST—Returns the latest versions of the objects.
• USER—Returns objects selected by the default configuration specification
defined for the calling user. If the calling user has no default configuration
specification, LATEST is used.
• BASELINE—Returns objects associated with a specific baseline. The
SELECTBY_BASELINE_REF parameter must also be specified to identify
the baseline to apply.
• VIEW—Returns objects associated with a specific view. The SELECTBY_
VIEW_REF parameter must also be specified to identify the view to apply.
• LIFECYCLE —Returns objects associated with a specific lifecycle state. The
SELECTBY_LIFECYCLE_STATE parameter must also be specified to
identify the lifecycle state to apply.
• IN_USE—Returns objects that are in use.
• EFFECTIVITY—Returns objects associated with specific effectivities. The
SELECTBY_CONFIG_ITEM_REF, SELECTBY_DATE, and SELECTBY_
UNIT parameters must also be specified to define the effectivity constraints to
apply.
• STANDARD—Returns objects associated with the standard configuration
specification. The SELECTBY_VIEW_REF, SELECTBY_LIFECYCLE_
STATE, and SELECTBY_INCLUDE_WORKING parameters can also be
specified to identify constraints to apply.

Note
This value is specific to WTPart objects.

• STANDARD_DOCUMENT—Selects objects associated with the standard


configuration specification. The SELECTBY_LIFECYCLE_STATE,
SELECTBY_INCLUDE_WORKING, and SELECTBY_IN_USE_BY_USER
parameters can also be specified to identify constraints to apply.
• CONFIGSPEC_REF—Selects objects based on a configured and persisted
ConfigSpec object. The SELECTBY_CONFIGSPEC_REF parameter must
also be specified.
• CONFIGSPEC_OBJECT—Allows a custom ConfigSpec object to be
programmatically constructed and passed to the webject to use during
filtering. The CONFIGSPEC_OBJECT_META parameter may also be

Windchill Adapter Webject Library 181


specified. Using the SELECTBY value requires that a GROUP_IN is supplied
to seed navigation and that the ConfigSpec object has been stored on the
GROUP_IN object as metadata.
The default for this parameter is LATEST. This parameter is ignored when
AUTO_NAVIGATE is specified as FALSE

SELECTBY_BASELINE_REF
The UFID of a baseline object used when SELECTBY is specified as BASELINE.

SELECTBY_CONFIG_ITEM_REF
The UFID of a configuration item used when SELECTBY is specified as
EFFECTIVITY. When this parameter is specified, either SELECTBY_DATE or
SELECTBY_UNIT must also be specified.

SELECTBY_CONFIGSPEC_REF
A reference to a persisted ConfigSpec object to use in filtering objects.

S E L E C T B Y _ D AT E
A date used when SELECTBY is specified as EFFECTIVITY. This parameter can
be used by itself, or it in conjunction with SELECTBY_CONFIG_ITEM_REF.

SELECTBY_IN_USE_BY_USER
Specifies whether only to select objects in use by the user. This parameter is a
boolean. It is only used of SELECTBY=STANDARD_DOCUMENT. If not
specified, then in use is not used as criteria when selecting objects.

SELECTBY_INCLUDE_WORKING
Specifies whether to include working objects when SELECTBY is specified as
STANDARD. Working objects are objects in the personal cabinet of a user. Valid
values for this parameter are TRUE and FALSE. The default for this parameter is
TRUE.

S E L E C T B Y _ L I F E C Y C L E _ S TAT E
The name of a life cycle state used when SELECTBY is specified as LIFECYCLE
or STANDARD.

SELECTBY_UNIT
A unit value used when SELECTBY is specified as EFFECTIVITY. If this
parameter is specified, then SELECTBY_CONFIG_ITEM_REF must also be
specified.

182 PTC Windchill® Adapter Guide


SELECTBY_VIEW_REF
The UFID of a view object used when SELECTBY is specified as VIEW or
STANDARD.

TYPE
The object type name. If WHERE is specified, TYPE must also be specified. For
more information, see Specifying the TYPE and WHERE Parameters on page 34.
OBJECT_REF can be specified instead of or in addition to this parameter. This
parameter is required.

WHERE
A query expression identifying the objects for which to query. This parameter can
be used instead of or in combination with OBJECT_REF.
If OBJECT_REF is not specified, WHERE must be specified. If WHERE is
specified, TYPE must also be specified. For more information, see Specifying the
TYPE and WHERE Parameters on page 34.

Q u e r y - Ty p e - Tr e e

Note
This webject is no longer used. Instead, use the Query-TypeHierarchy webject.
For details on the Query-TypeHierarchy webject, see the Info*Engine User's
Guide.

The Query-Type-Tree webject returns a group containing the display names for
Windchill object types and their descendants. The group is a hierarchical list of
elements.

Syntax
<ie:webject name="Query-Type-Tree" type="OBJ" >
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ADD_ALL_TYPE" data="[TRUE | FALSE]"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INCLUDE_ARGS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_CONSTRAINTS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_DESCRIPTORS" data="[TRUE | FALSE]"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="NEXT_OP" data="operation_name"/>

Windchill Adapter Webject Library 183


<ie:param name="OBJECT_REF" data="ufid"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="ROOT_LEVEL" data="root_level"/>
<ie:param name="SEARCH_TYPE"
data="[ROOT_TYPES | HARD_TYPES | SOFT_TYPE | BOTH]"/>
<ie:param name="SESSION_ID" data="$(session_id[]SESSION_ID[])"/>
</ie:webject>

Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION ACCEPT_LANGUAGE
ROOT_LEVEL CONTAINER_REF ADD_ALL_TYPE
DBUSER FORMAT
INCLUDE_ARGS GROUP_OUT
INCLUDE_CONSTRAINTS SEARCH_TYPE
INCLUDE_DESCRIPTORS SESSION_ID
NEXT_OP
OBJECT_REF
PASSWD
REFERENCE_EXCEPTIONS

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

ADD_ALL_TYPE
If more than one type is specified in the ROOT_LEVEL parameter and this
parameter is set to TRUE, a dummy type (of type wt.fc.Persistable) is returned
with a display value of “All.”

C O N TA I N E R _ R E F
The Unique Federation Identifier (UFID) of the organization context that should
be used to retrieve the subtypes, provided the parameter SEARCH_TYPE is set to
SOFT_TYPES or BOTH.

184 PTC Windchill® Adapter Guide


GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

OBJECT_REF
The Unique Federation Identifier (UFID) of an existing object type that serves as
the base object, and returns all descendants associated with types specified in the
SEARCH_TYPE parameter.

ROOT_LEVEL
The object types that are the top-level nodes in the resulting group. The ROOT_
LEVEL parameter is a required parameter that must contain one or more objects
to be part of the resulting group.

SEARCH_TYPE
Specifies what type of descendants should be returned for each object type
specified in the ROOT_LEVEL parameter.
• ROOT_TYPES—No descendants are returned, and only the types specified in
the ROOT_LEVEL parameter are returned in the group.
• HARD_TYPES—Only descendants that are provide by PTC are returned
along with the parent type.
• SOFT_TYPES—Only descendants that are customer-created are returned
along with the parent type.
• BOTH—Descendants that are PTC-provided and customer-created types are
returned along with the parent type.

Search-Objects
The Search-Objects webject provides federated search capability for searches
against multiple types in a single query based on both modeled and global
attribute values. Global, modeled, and derived attributes can be returned in the
result set.

Syntax
<ie:webject name="Search-Objects" type="OBJ">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute"/>
<ie:param name="ATTRIBUTE_TYPE_CONTEXT"
data="attributeTypeContext"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="COMPONENT_ID" data="componentId"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>

Windchill Adapter Webject Library 185


<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="CONTAINER_TYPE" data="containerType"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="ITERATION" data="[ALL | LATEST]"/>
<ie:param name="MEMBER_OF" data="memberOf"/>
<ie:param name="PAGE_COUNT" data="pageCount"/>
<ie:param name="PAGE_OFFSET" data="pageOffset"/>
<ie:param name="PAGING_SESSION_ID" data="pagingSessionId"/>
<ie:param name="PASSWD" data="password"/>
<ie:param name="SORTBY" data="sortBy"/>
<ie:param name="SORTED" data="sorted"/>
<ie:param name="TYPE" data="type"/>
<ie:param name="UNFORMATED" data="dataType" />
<ie:param name="VERSION" data="[ALL | LATEST]"/>
<ie:param name="WHERE" data="where_clause"/>
</ie:webject>

Parameters
Required Interdependent Optional
INSTANCE ATTRIBUTE_TYPE_CONTEXT ACCEPT_LANGUAGE
WHERE AUTHORIZATION ATTRIBUTE
CONTAINER_REF COMPONENT_ID
DBUSER CONNECTION_ATTEMPTS
PASSWD CONNECTION_ATTEMPT_
INTERVAL
TYPE CONTAINER_TYPE
FORMAT
GROUP_OUT
ITERATION
MEMBER_OF
PAGE_COUNT
PAGE_OFFSET
PAGING_SESSION_ID
SORTBY
SORTED
UNFORMATTED
VERSION

186 PTC Windchill® Adapter Guide


Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

AT T R I B U T E _ T Y P E _ C O N T E X T
Specifies the type of context within which the specified attributes are to be
searched.
If only one TYPE parameter value is specified, and this is left blank, then the
ATTRIBUTE_TYPE_CONTEXT value defaults to the value of TYPE.
If more than one type is specified, then this parameter is required and an exception
is thrown if it is not specified. For most multiple-type searches, this should be set
to wt.fc.Persistable.

COMPONENT_ID
The string that specifies which client component is invoking the search. It is used
to select the list of classes to query against as defined in com\ptc\
windchill\enterprise\search\server\
SearchableTypes.properties.
This parameter is optional.

C O N TA I N E R _ R E F
A Windchill context to apply the webject against. This parameter accepts the
following types of input:
• The UFID of a Windchill context. Multiple UFIDs can be specified for this
parameter.
• MEMBERSHIP—The query finds only those contexts of which the user is a
member.
When this parameter is specified, the scope of queries executed against the TYPE
and WHERE parameters are restricted to the associated context.

C O N TA I N E R _ T Y P E
A single context type to constrain a query against. This parameter is optional.

GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

Windchill Adapter Webject Library 187


I T E R AT I O N
Specifies where to return all or latest iterations of any iterated objects in the
results. Accepted values are ALL or LATEST. The default for this parameter is
LATEST. This parameter is optional.

MEMBER_OF
Specifies whether or not to constrain a query against contexts that the current user
is a member of. This parameter is optional.

PA G E _ C O U N T
The number of objects to return per page in query result. This parameter is
optional.

PA G E _ O F F S E T
The number of objects to offset by for a paged query result. This parameter is
optional.

PA G I N G _ S E S S I O N _ I D
The unique identifier for the current paging session. This is a system-generated
value that is added to the output group for the query result.
If PAGING_SESSION_ID is specified, the next page of results is fetched from it.
Otherwise, a new query is performed.

SO RT B Y
Specifies a set of attributes whose sorting orders are specified by the SORTED
parameter to be sorted by and returned by the query.
Multiple values can be specified for this parameter. If multiple values are
specified, then the first value is the primary sort attribute, the second value is the
secondary sort attribute, and so on.
When multiple values are involved, if the list of SORTED parameters is shorter
than the list of SORTBY parameters, then the last SORTED is used for the
difference.
For example:
SORTBY=a SORTED=ASC
SORTBY=b SORTED=DESC
SORTBY=c
SORTBY=d

188 PTC Windchill® Adapter Guide


Both c and d would use descending order. If you do not specify SORTED, then all
SORTBY values use ascending as it is the default value. This parameter is
optional.

SO RT E D
Specifies whether the current attribute to sort by should be sorted as descending
(DESC) or ascending (ASC). Multiple values can be specified for this parameter.
The default value is ASC. This parameter is optional.
SORTED only produces sorted output if the SORTBY parameter is specified.

TYPE
The set of Windchill object types to constrain the search against. For example, wt.
part.WTPart or wt.doc.WTDocument. If more than one type is specified,
ATTRIBUTE_TYPE_CONTEXT must also be specified.

VERSION
Specifies whether to return all, latest, or specific versions of any versioned objects
in the results. Accepted values are ALL, LATEST or SPECIFIC. The default for
this parameter is ALL. This parameter is optional.

WHERE
Specifies a where clause in terms of (attribute name = 'value') pairs.
Attributes should be the valid attributes of the object types specified in the TYPE
parameter.
When specifying a where clause, consider the following to ensure that you enter
the proper syntax:
• Attribute syntax:
When creating a where clause for a single attribute case, the following is the
proper syntax:
<ie:param name="WHERE" data="(name='1660043')"/>

When creating a where clause for a multi-attribute case, the following is the
proper syntax:
○ For OR:
<ie:param name="WHERE" data="((name='1660043')|(number="1"))"/>

○ For AND:
<ie:param name="WHERE" data="((name='1660043')&(number="1"))"/>

• Wildcard syntax:

Windchill Adapter Webject Library 189


The wildcard designation for this clause is the percent symbol (%) rather than
the customary asterisk (*). The following shows the proper syntax when using
a wildcard:
<ie:param name="WHERE" data="(name='%abc%')"/>

• Backslashes
When using a backslash (\) in the attribute name field, \ is escaped by three
backslashes preceding the first backslash. For example, to find a part named
test\part0 using this webject, the proper syntax for the where clause is
as follows:
<ie:param name="WHERE" data="(name='test\\\\part0')"/>

When using the wildcard designation to search for objects with a backslash (\)
in the attribute name field, use the same procedure of preceding the first
backslash with three backslashes. For example, the following syntax finds all
objects that contains \ in the attribute name:
<ie:param name="WHERE" data="(name='%\\\\%')"/>

This parameter is required. If there are no attributes to be given in the where


clause, then it should be "()".

Va l i d a t e - U s e r
The Validate-User webject returns a status group if the supplied username and
credentials are valid and can be used to access the Windchill system. Otherwise,
an exception is thrown.

Syntax
<ie:webject name="Validate-User" type="OBJ">
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="PASSWD" data="password"/>
</ie:webject>

190 PTC Windchill® Adapter Guide


Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION CONNECTION_ATTEMPTS
DBUSER CONNECTION_ATTEMPT_
INTERVAL
PASSWD GROUP_OUT

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

GROUP_OUT
The name of the output group containing the results. The default value is
Status. This parameter is optional.

Ve r s i o n - H i s t o r y
The Version-History webject returns the values for the specified attributes for the
previous versions of a Windchill object. The specified Windchill class must
implement the wt.vc.Versioned interface.

Syntax
<ie:webject name="Version-History" type="OBJ">
<ie:param name="ACCEPT_LANGUAGE"
data="$(@SERVER[]accept_language[])"/>
<ie:param name="ATTRIBUTE" data="attribute"/>
<ie:param name="AUTHORIZATION"
data="$(@SERVER[]authorization[0])"/>
<ie:param name="CONNECTION_ATTEMPTS" data="attempts"/>
<ie:param name="CONNECTION_ATTEMPT_INTERVAL" data="interval"/>
<ie:param name="CONTAINER_REF" data="[ufid | MEMBERSHIP]"/>
<ie:param name="DBUSER" data="username"/>
<ie:param name="DESCRIPTOR" data="attribute_name"/>
<ie:param name="FORMAT" data="[TRUE | FALSE]"/>
<ie:param name="GROUP_FILTER" data="group_filter"/>
<ie:param name="GROUP_IN" data="group_in"/>
<ie:param name="GROUP_OUT" data="group_out"/>
<ie:param name="INCLUDE_ARGS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_CONSTRAINTS" data="[TRUE | FALSE]"/>
<ie:param name="INCLUDE_DESCRIPTORS" data="[TRUE | FALSE]"/>
<ie:param name="INSTANCE" data="appl_name"/>
<ie:param name="NEXT_OP" data="operation_name"/>
<ie:param name="OBJECT_REF" data="object_ref"/>
<ie:param name="PASSWD" data="password"/>

Windchill Adapter Webject Library 191


<ie:param name="REFERENCE_DELIMITER" data="^" />
<ie:param name="REFERENCE_EXCEPTIONS" data="[TRUE | FALSE]"/>
<ie:param name="REFERENCE_OUTPUT_DELIMITER" data="^" />
<ie:param name="SESSION_ID" data="$(session[]session_id[])"/>
<ie:param name="TYPE" data="type_name"/>
<ie:param name="UNFORMATED" data="dataType" />
<ie:param name="WHERE" data="where_clause"/>
<ie:param name="WHERE_CASE_SENSITIVITY" data="[TRUE | FALSE]"/>
</ie:webject>

Parameters
Required Interdependent Optional
INSTANCE AUTHORIZATION ACCEPT_LANGUAGE
CONTAINER_REF ATTRIBUTE
DBUSER CONNECTION_ATTEMPTS
DESCRIPTOR CONNECTION_ATTEMPT_
INTERVAL
GROUP_FILTER FORMAT
INCLUDE_ARGS GROUP_IN
INCLUDE_CONSTRAINTS GROUP_OUT
INCLUDE_DESCRIPTORS REFERENCE_DELIMITER
NEXT_OP REFERENCE_OUTPUT_DELIMITER
OBJECT_REF SESSION_ID
PASSWD UNFORMATTED
REFERENCE_EXCEPTIONS
TYPE
WHERE
WHERE_CASE_SENSITIVITY

Note
If a parameter is listed in the table but is not defined below, then it has a
common parameter definition. For descriptions of those parameters, see
Common Webject Parameters on page 57.

192 PTC Windchill® Adapter Guide


C O N TA I N E R _ R E F
A Windchill context to apply the webject against. This parameter accepts the
following types of input:
• The UFID of a Windchill context. Multiple UFIDs can be specified for this
parameter.
• MEMBERSHIP—The query finds only those contexts of which the user is a
member.
When this parameter is specified, the scope of queries executed against the TYPE
and WHERE parameters are restricted to the associated context.

GROUP_IN
Name of an input group containing one UFID per element (OBID attribute) on
which to retrieve the version history. This parameter is optional.

GROUP_OUT
The name of the output group containing the results. If this parameter is omitted,
then the name of the output group is constructed by appending the string
“-Output” to the webject name. This parameter is optional.

OBJECT_REF
The Unique Federation Identifier (UFID) of a Windchill object. Multiple values
can be specified for this parameter to identify multiple objects.
This parameter can be used instead of or in combination with WHERE. If
WHERE is not specified, then OBJECT_REF must be specified.

TYPE
The object type name. If WHERE is specified, TYPE must also be specified. For
more information, see Specifying the TYPE and WHERE Parameters on page 34.

WHERE
A query expression identifying the objects for which to query. This parameter can
be used instead of or in combination with OBJECT_REF.
If OBJECT_REF is not specified, WHERE must be specified. If WHERE is
specified, TYPE must also be specified. For more information, see Specifying the
TYPE and WHERE Parameters on page 34.

Windchill Adapter Webject Library 193


6
Custom Windchill Adapter
Web je c ts
Implementing Custom Windchill Adapter Webjects..................................................... 196
Hello-World Example ............................................................................................... 198
Type-Based Webject Delegate Example ................................................................... 203
About the wt.adapter.delegates.properties File .......................................................... 208

You can add new webject delegates to the Windchill adapter. Webjects are simple
XML tags that contain requests to retrieve, organize, or manipulate information.
The work is done by webject delegates.
The following topics describe how to add new webject delegates to the Windchill
adapter.

195
Implementing Custom Windchill Adapter
We b j e ct s
The Windchill adapter is an embedded component of the Windchill method server.
The Windchill adapter receives requests to execute Info*Engine tasks and
webjects. Webjects can perform various functions, including the following:
• Comparing, combining, and sorting groups of business objects
• Searching for information matching a specified criteria
• Performing information manipulation actions such as creating, copying, and
updating.
Query and action webjects are specialized for each adapter that is used to access
and alter data in an information system. These and other categories of webjects are
further described in the Info*Engine User's Guide, which also describes how to
create custom webjects.
You can provide custom query and action webjects for use with the Windchill
adapter.

Setti ng Up a New Cust om Webj ect Del ega te


Each webject delegate must have a unique name. The Windchill adapter uses this
name along with any class information provided by the webject to locate a class
implementing your webject delegate. All type-aware webject delegates must
implement the com.ptc.core.adapter.server.impl.TypeAwareWebjectDelegate
interface, which provides the following method:
com.infoengine.object.factory.Task invoke(com.infoengine.object.factory.Task task)

This invoke() method performs all the work of each concrete webject delegate
class implementing the TypeAwareWebjectDelegate interface.
The following is the basic outline of operation for an implementation of the
invoke() method:
1. Extract the webject object from the incoming task object.
2. Perform operations based on the parameters specified in the webject object.
3. Store the resulting data in element objects within a group object.
4. Return a new task object containing the group object output data.
For more information on the com.infoengine.object.factory.Task class, refer to its
javadoc.

196 PTC Windchill® Adapter Guide


L o c a t i n g t h e C u s t o m We b j e c t C l a s s
Webject delegates are registered with the Windchill adapter by entries in wt.
adapter.delegates.properties. The Windchill adapter invokes webject delegates
based on the webject name and the class or type of the target object.
For example, the following line in wt.adapter.delegates.properties registers the
CheckinObjectsWebjectDelegate with the Windchill adapter:
CHECKINOBJECTS.WCTYPE|
java.lang.Object=com.ptc.core.adapter.server.impl.CheckinObjectsWebjectDelegate

The class (or Windchill subtype) of the target object is taken from the TYPE
parameter of the incoming webject. Hyphens included in the webject name by the
caller are ignored, and the webject lookup is also case-insensitive.
This performs the following functions:
1. The adapter receives a webject request for CHECKINOBJECTS for a target
object with the java.lang.Object class.
2. The webject delegate com.ptc.core.adapter.server.impl.
CheckinObjectsWebjectDelegate is instantiated.
3. Its invoke() method is then executed.

Wr i t i n g a N e w We b j e c t D e l e g a t e
Most Windchill adapter webjects reside in the com.ptc.core.adapter.server.impl
package. For simplicity, the Windchill adapter webjects are not modeled. Most
webject subclasses have common parent classes that based on the type of adapter
webject.
• OBJ webjects typically extend com.ptc.core.adapter.server.impl.
ObjectWebject
• ACT webjects extend com.ptc.core.adapter.server.impl.ActionWebject
• Both ObjectWebject and ActionWebject extend com.ptc.core.adapter.server.
impl.AbstractWebject.
Each class provides useful convenience methods and parameter support applicable
to the type of webject being written. Subclasses of any of these also inherit the
TypeAwareWebjectDelegate interface. Subclasses need only implement the
invoke() method.
For a detailed list of methods available to each, refer to the javadoc for com.ptc.
core.adapter.server.impl.
Windchill adapter webjects drive parameter gathering and validation by use of
core Info*Engine Java annotations. This ensures that all webjects process input
parameters as consistently as possible, report consistent error messages, and do
not need to duplicate source code for routine tasks.

Custom Windchill Adapter Webjects 197


If you make use of existing super classes (ObjectWebject, ActionWebject, or
AbstractWebject), each class defines the parameters that it gathers and uses, so
subclasses need only define the parameters that they specifically use that are not
already being gathered by a parent class. Webject parameter validation can then
perform all basic validation of things such as the following:
• Existence of required parameters
• Existence of interdependent parameters
• Mutually exclusive parameters are not specified together
• Parameters conform to the data types they are defined to contain
This leaves only basic parameter validation to the webject implementation itself.
If you decide to extend an existing base class, then the first thing your class should
do in its invoke method implementation is to call the parent class' preset method.
This validates parameters and gathers common parameters.
If you do not decide to extend a common base class, then you must either force
parameter validation yourself (if using annotations) or manually gather parameters
from the webject.
The annotations that are used for parameter validation are com.infoengine.object.
factory.WebjectDef and com.infoengine.object.factory.ParameterDef.. For more
information, see the examples in the following topics.

He l l o- Wor l d Ex am pl e
The following example steps take you through the process of creating a new type-
aware Hello-World webject delegate. The webject creates an output group based
on an input group, and optionally echoes some “Hello World” messages to an
output java.io.PrintWriter.

St ep 1: Wri t e the n ew web je ct d el egat e


Since the Hello-World webject is not actually interacting with Windchill business
objects and is not going to make use of any convenience methods provided by the
Windchill adapter base classes, it simply needs to implement
com.ptc.core.adapter.server.impl.TypeAwareWebjectDele
gate.

Note
This example is most effective if you read through the source for this webject.
The webject source can be found under:
<Windchill>/prog_examples/adapter/windchill/customwebjects/src

198 PTC Windchill® Adapter Guide


Step 2: Inform the Windchill adapter of the new webject
In order for the Windchill adapter to be able to recognize the new webject
delegate, it must be registered in wt.adapter.delegates.properties.
Add the following line:
HELLOWORLD.WCTYPE|
java.lang.Object=ext.example.HelloWorldWebjectDelegate

This entry specifies the name of the new webject delegate, HELLOWORLD, and
it indicates that the webject is valid for target objects of class or type
java.lang.Object. Finally, it indicates which class contains the invoke()
method that should be executed.
You must restart the method server for this change to be recognized.

Step 3: Create an XML task


Now, create an XML task document containing a Hello-World webject. You must
create the task within the tasks directory that was set up for your Windchill server.
The following is an example Hello-World.xml:

Note
The task source can be found in your installation at:
<Windchill>/prog_examples/adapter/windchill/customwebjects/tasks

<%@page language="java"%>

<%@taglib uri="http://www.ptc.com/infoengine/taglib/core" prefix="ie"%>

<!--com.infoengine.soap.rpc.def

This task simply invokes the Hello-World example adapter webject delegate
with generic input.

@return INFOENGINE_GROUP ${helloWorldResults}

-->

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


<ie:param name="ELEMENT" data="a=b:b=c:c=d"/>
<ie:param name="ELEMENT" data="a=b1:b=c1:c=d1"/>
<ie:param name="ELEMENT" data="a=b2:b=c2:c=d2"/>
<ie:param name="ELEMENT" data="a=b3:b=c3:c=d3"/>
<ie:param name="GROUP_OUT" data="helloInput"/>
</ie:webject>

<ie:webject name="Hello-World" type="ACT">


<ie:param name="INSTANCE" data="$(@FORM[]supporting-adapter[*])"
delim="!" valueSeparator="!"
default="<%=com.infoengine.au.NamingService.getVMName(
)%>"/>

Custom Windchill Adapter Webjects 199


<ie:param
name="GROUP_IN" data="helloInput" />
<ie:param
name="GROUP_OUT" data="helloWorldResults" />
<ie:param
name="HELLO_WHERE" data="out" />
<ie:param
name="HELLO_WORLD" data="bob,steve,fred"
delim=","/>
<ie:param name="START" data="1" />
<ie:param name="STOP" data="2" />
</ie:webject>

S t e p 4 : Te s t t h e n e w w e b j e c t d e l e g a t e
To test the webject, execute the following URL:
http://<yourIEServer>/<IEAlias>/Hello-World.xml

• <yourIEServer> is the name of the server on which you are running the
Info*Engine servlet.
• <IEAlias> is the name of the servlet alias set up for Info*Engine tasks.
For example:
http://host.company.com/Windchill/servlet/IE/tasks/ext/example/HelloWorld.xml

The output returned from this URL is similar to the following:


<?xml version="1.0" encoding="UTF-8"?>
<wc:COLLECTION xmlns:wc="http://www.ptc.com/infoengine/1.0">
<Unknown-Class-Name
NAME="helloWorldResults"
TYPE="Unknown" STATUS="0">
<wc:INSTANCE>
<a>b1</a>
<b>c1</b>
<c>d1</c>
</wc:INSTANCE>
<wc:INSTANCE>
<a>b2</a>
<b>c2</b>
<c>d2</c>
</wc:INSTANCE>
</Unknown-Class-Name>
</wc:COLLECTION>

This example hard codes all the parameter values.

Using Info*Engine ParameterDef Annotations


P a r a m e t e r D e f annotations have the following default values:
• The default for t y p e is String, meaning there is no need to specify type if
the parameter is a string.
• The default for m i n Va l u e s is 0

200 PTC Windchill® Adapter Guide


m i n Va l u e s determines whether the parameter is required. A value of greater
than 0 indicates that the parameter is required.
• The default for m a x Va l u e s is 1.
m a x Va l u e s determines whether an array is returned when using
Webject.objectParamValue.
○ If the value is less than or equal to 0, the parameter is multi-valued and
unbounded. Calling Webject.objectParamValue for a parameter
defined this way results in an array being returned containing zero or more
objects with no limitation on how many objects can be returned.
○ If the value is 1, this means the parameter is single-valued (this is the
default) and an array is not be returned.
○ If the value is greater than 1, the parameter is multi-valued, but the user
can specify no more than m a x Va l u e s parameters. Specifying m i n Va l u e s
in conjunction decides how many the user must supply (0 meaning
optional)
• The default for d e f a u l t Va l u e is "" which is equated to null at runtime

Best Practice
If a single-valued parameter is not specified, null will be returned. This is why
defaults are important for data types like Boolean, Integer, and so on. If the
default values are not there, you must check for null and cannot simply cast
the results into your variable. Logical default values for parameters are always
a good idea.

The following are some additional points of interest when using P a r a m e t e r D e f


annotations:
• If a multi-valued parameter is optional and not specified, an empty array is
returned. This is inconsistent with the null of single-valued parameters, but is
done for convenience purposes to avoid having to explicitly check for null
when performing iteration on multi-valued parameters.
• Interdependent attributes are validated in webject.validate (these
attributes are discussed below).
• The values of m i n Va l u e s and m a x Va l u e s are validated in
webject.validate.
If for example, you require two GROUP_IN parameters, then you would set
minValues="2" and maxValues="2". When gathering the groups, you
might do something such as "Group [ ] grps = (Group [
])webject.objectParamValue ( "GROUP_IN" )".

Custom Windchill Adapter Webjects 201


As a result, the grps array has a length of two and contains the groups
specified on the webject. If more or less than two GROUP_IN parameters are
supplied, an exception would be raised. If any of the specified GROUP_IN
parameters referenced a group not found in the VDB, then an exception would
be also be thrown.

Note
If you are extending one of the supplied base classes and are overriding a
parameter gathered by a parent class, then you must not change the type or
cardinality or the parameter.
Since adapter webjects make use of a parameter named GROUP_IN, which is
single valued, you cannot make that parameter an array (as mentioned above).
If you need such a parameter in a webject that extends one of the common
adapter base classes, then you should give the parameter a unique name.

The following are some additional P a r a m e t e r D e f attributes:


• i n t e r d e p e n d e n t —A string of interdependent parameter names.
• s e l e c t —A string of mutually-exclusive parameter names.
• e x a m p l e Va l u e —Used for documentation purposes only.
ParameterDef Example
...
@ParameterDef(name="TYPE",interdependent={"WHERE"},select=
{"OBJECT_REF"},description="The business object type."),
@ParameterDef(name="WHERE,maxValues=-1,interdependent={"TYPE"},
select={"OBJECT_REF"},description ="The where clause(s)."),
@ParameterDef(name="OBJECT_REF",maxValues=-1,
select={"TYPE","WHERE"},description="The ufid(s).",exampleValue="ufid")
...

In the above example an error would occur on validate if:


• Either TYPE or WHERE were specified but not both (the parameters are
dependent on one another).
• OBJECT_REF was specified and either TYPE or WHERE was specified
(the TYPE and WHERE parameters are defined as mutually exclusive to
OBJECT_REF).

202 PTC Windchill® Adapter Guide


Best Practice
When using these annotations in a hierarchy:
• Sub-classes override P a r a m e t e r D e f s found within super-classes.
• These annotations are supported within interfaces as well, so you can
inherit parameter definitions from shared interfaces.
• As it pertains to Windchill webjects and AbstractWebject in particular,
you need to be very careful when overriding parameters. When
extending a common adapter base class (ObjectWebject,
ActionWebject or AbstractWebject) you should never change a
parameter’s type, cardinality, or remove its d e f a u l t Va l u e .
If you do so you are almost sure to introduce a bug for your webject,
since those base classes are coded based on their own annotations and
have no knowledge of extending class annotations.

Ty p e - B a s e d W e b j e c t D e l e g a t e E x a m p l e
With the “Hello, World!” example, the class or type of the target object was not
relevant except for webject delegate lookup, because the webject delegate did not
perform actions upon or query for a target object or objects.
This example shows how to create a type-based webject delegate that is specific to
the Windchill type wt.part.WTPart.
The basic operation of the Fetch-PartRelations webject is to search for or fetch
instances of wt.part.WTPart. It also resolves some immediate relationships
between that part and other parts and documents, returning the part along with the
related objects as nested Info*Engine elements.

St ep 1: Wri t e the n ew web je ct d el egat e


Since the Fetch-PartRelations webject is based on a lot of the same basic
functionality as a webject such Query-Objects, this webject extends com.ptc.core.
adapter.server.impl.ObjectWebject.
By extending ObjectWebject, the Fetch-PartRelations webject automatically
inherits most core OBJ webject parameters (for instance: TYPE/WHERE,
OBJECT_REF, REFERENCE_DELIMITER, CONTAINER_REF, and so on).
Which parameters are actually used by the webject are based on what shared
convenience methods it calls.

Custom Windchill Adapter Webjects 203


The first thing the webject does is call the preset(Task) method, which
causes the parent classes to validate the incoming webject and gather common
parameters.
The webject later uses the getTargetTypeInstances() method to perform
the base search and fetch (as appropriate per the TYPE/WHERE and OBJECT_
REF and other parameters supplied).
As a result, it uses most of the parameters associated with performing a search.
Despite the fact that the webject uses these parameters, it does not need to
explicitly perform any validation of them itself since that is handled by the parent
classes.
The webject source contains many descriptive comments to clarify how it works.
The webject source can be found on your installation at:
<Windchill>/prog_examples/adapter/windchill/
customwebjects/src

Note
The webject uses an inherited instance variable named a d a p t e r L o g g e r . This
instance variable is a reference to a log4j logger that is used by Windchill
adapter webjects.
By reusing the inherited log4j loggers, your adapter webjects can inherit
existing log4j Windchill adapter configurations without needing to invent your
own logging mechanism. See the javadoc for AbstractWebject to see what
other loggers are available for you to use implicitly by virtue of extending a
Windchill adapter base class.

Step 2: Inform the Windchill adapter of the new webject


In order for the Windchill adapter to be able to recognize the new webject
delegate, it must be registered in wt.adapter.delegates.properties.
Add the following line:
FETCHPARTRELATIONS.WCTYPE|
wt.part.WTPart=ext.example.FetchPartRelationsWebjectDelegate

This entry performs the following functions:


• Specifies the name of the new webject delegate, FETCHPARTRELATIONS.
• Indicates that the webject is valid for target objects of class or type wt.part.
WTPart.
• Indicates which class contains the invoke() method that should be
executed.

204 PTC Windchill® Adapter Guide


Note that the property definition attaches this webject delegate directly to wt.part.
WTPart rather than to a more inclusive class such as java.lang.Object. This is
done because this webject is specific to instances of wt.part.WTPart and cannot be
called for other types.
If someone were to attempt to call this webject with a type other than wt.part.
WTPart (or one of its subclasses) the adapter would fail to find the webject
delegate and throw the appropriate exception. Attaching it to the wt.part.WTPart
class implicitly avoids the obscure errors that would result from trying to apply
logic intended for parts to other business object types.
You must restart the method server for this change to be recognized.

Step 3: Create an XML task


Now, create an XML task document containing a Fetch-PartRelations webject.
You must create the task within the tasks directory that was set up for your
Windchill server. The following is an example Fetch-PartRelations.xml:

Note
The task source can be found in your installation at <Windchill>/prog_
examples/adapter/windchill/customwebjects/tasks
<%@page language="java"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core"
prefix="ie"%>

<!--com.infoengine.soap.rpc.def

The following fetches or searches for base parts and then expands references to
related objects as requested by input:
@param string[] object_ref One or more object references of
parts to fetch.
@param string type The base type
(must be wt.part.WTPart or a subclass).
@param string where If searching for parts the where clause
used to select part/s.
@param string[] what What relations to return
(PARENTS,CHILDREN,DOCS or ALL).
@param string[] attribute What attributes to
fetch on base parts.
@param string[] part_atts What attributes to
fetch on related parts.
@param string[] partmaster_atts What attributes to fetch on
related part masters.
@param string[] doc_atts What attributes to
fetch on related documents.

Custom Windchill Adapter Webjects 205


@return INFOENGINE_GROUP ${partRelations}
-->

<ie:webject name="Fetch-PartRelations" type="OBJ">


<ie:param name="INSTANCE" data="$(@FORM[]supporting-adapter[*])"
delim="!" valueSeparator="!"
default="<%=com.infoengine.au.NamingService.getVMName()%>"/>
<ie:param name="OBJECT_REF" data="${@FORM[]object_ref[*]}"
valueSeparator="!" delim="!" />
<ie:param name="TYPE" data="${@FORM[]type[0]}"
default="wt.part.WTPart" />
<ie:param name="WHERE" data="${@FORM[]where[0]}" />
<ie:param name="FETCH_WHAT" data="${@FORM[]what[*]}"
default="ALL" delim="," />
<ie:param name="ATTRIBUTE" data="${@FORM[]attribute[*]}"
default="name,number" delim="," />
<ie:param name="PART_ATTRIBUTES" data="${@FORM[]part_atts[*]}"
default="name,number,masterReference" delim="," />
<ie:param name="PARTMASTER_ATTRIBUTES"
data="${@FORM[]partmaster_atts[*]}" default="name,number"
delim="," />
<ie:param name="DOCUMENT_ATTRIBUTES"
data="${@FORM[]doc_atts[*]}" default="name,number" delim=","
/>
<ie:param name="GROUP_OUT" data="partRelations" />
</ie:webject>

The following starts the server management utility and method server. Then,
execute it with a URL as before. For example:
http://host.company.com/Windchill/servlet/IE/tasks/ext/example/
Fetch-PartRelations.xml?where=name='ParentPart'

In this case we are only specifying the w h e r e parameter and letting all the other
defaults as defined in the task source be used.
The output from the URL would be similar to the following:
<?xml version="1.0" encoding="UTF-8"?>
<wc:COLLECTION xmlns:wc="http://www.ptc.com/infoengine/1.0">
<wt.part.WTPart NAME="partRelations" TYPE="Unknown" STATUS="0">
<wc:INSTANCE>
<obid>VR:wt.part.WTPart:36028:925175337-1180978871749-4365289-
98-8-253-132@host.company.com</obid>
<class>wt.part.WTPart</class>
<name>ParentPart</name>
<number>PARENTPART.0</number>
<parents>
<wc:INSTANCE>

206 PTC Windchill® Adapter Guide


<obid>VR:wt.part.WTPart:36089:925175337-1180978871749-
4365289-98-8-253-132@host.companny.com</obid>
<class>wt.part.WTPart</class>
<masterReference>OR:wt.part.WTPartMaster:36087:925175337-
1180978871749-4365289-98-8-253-
132@padams03l.ptcnet.ptc.com</masterReference>
<number>ROOTPART.0</number>
<name>RootPart</name>
</wc:INSTANCE>
</parents>
<children>
<wc:INSTANCE>
<obid>OR:wt.part.WTPartMaster:36051:925175337-
1180978871749-4365289-98-8-253-132@host.company.com</obid>
<class>wt.part.WTPartMaster</class>
<name>ChildPart</name>
<number>CHILDPART.0</number>
</wc:INSTANCE>
</children>
<children>
<wc:INSTANCE>
<obid>OR:wt.part.WTPartMaster:42041:925175337-1180978871749-
4365289-98-8-253-132@host.company.com</obid>
<class>wt.part.WTPartMaster</class>
<name>AnotherChild</name>
<number>ANOTHERCHILD.0</number>
</wc:INSTANCE>
</children>
<documents>
<wc:INSTANCE>
<obid>VR:wt.doc.WTDocument:32023:925175337-1180978871749-
4365289-98-8-253-132@host.company.com</obid>
<class>wt.doc.WTDocument</class>
<name>wcadapter.txt</name>
<number>WCADAPTER.TXT.0</number>
</wc:INSTANCE>
</documents>
</wc:INSTANCE>
</wt.part.WTPart>
</wc:COLLECTION>

The FETCH_WHAT parameter is an enumerated parameter type. Acceptable


values for that parameter are based on the coded enumeration. If a caller were to
supply an invalid value for the FETCH_WHAT parameter they would receive a
localized error message similar to the following:
<?xml version="1.0" encoding="UTF-8"?>

Custom Windchill Adapter Webjects 207


<wc:COLLECTION xmlns:wc="http://www.ptc.com/infoengine/1.0">
<exception NAME="exception" TYPE="Exception" STATUS="-1">
<wc:MESSAGE>wt.util.WTException: Fetch-PartRelations: Invalid value
&quot;NOTHING&quot; for parameter &quot;FETCH_WHAT&quot;. Must be
one of &quot;[PARENTS, CHILDREN, DOCS, ALL]&quot;.</wc:MESSAGE>
<wc:INSTANCE>
<hierarchy>com.infoengine.util.IEException</hierarchy>
<hierarchy>javax.servlet.jsp.JspException</hierarchy>
<hierarchy>java.lang.Exception</hierarchy>
<hierarchy>java.lang.Throwable</hierarchy>
<hierarchy>java.lang.Object</hierarchy>
</wc:INSTANCE>
</exception>
</wc:COLLECTION>

A b o u t t h e w t . a d a p t e r. d e l e g a t e s .
properties File
The wt.adapter.delegates.properties file contains properties for
configuring Windchill adapter webject delegates. It includes sections for defining
the following:
• Available webject delegates
• Delegates for attribute translation
• Default attributes sets for certain Windchill types
• Sets of attributes to exclude for certain Windchill types

Note
You must restart the method server before changes to
wt.adapter.delegates.properties are recognized.

De f i n i n g We b j e c t D e l e g a t e s
Entries in this section specify the names of Windchill adapter webject delegates
along with the type of object for which each webject delegate is valid. The form of
a webject delegate definition is:
webjectName.TYPE|targetType=webjectDelegateClassname

• webjectName is the name of the webject


• targetType is the class or Windchill type specified in the TYPE parameter
• webjectDelegateClassname is the class name of the webject delegate to invoke

208 PTC Windchill® Adapter Guide


For example, consider the following webject delegate definitions:
QUERYOBJECTS.WCTYPE|
java.lang.Object=com.ptc.core.adapter.server.impl.QueryObjectsWebjectDelegate

QUERYOBJECTS.WCTYPE|
wt.org.WTPrincipal=wt.adapter.org.QueryPrincipalsWebjectDelegate

Two webject delegates are defined with the name QUERYOBJECTS. The first
delegate is for objects of type java.lang.Object. The second delegate is for objects
of type wt.org.WTPrincipal.
When the Windchill adapter is asked to invoke a webject named
QUERYOBJECTS it first looks at the TYPE parameter of the webject. If the
TYPE parameter specifies wt.org.WTPrincipal or the name of a subclass of the wt.
org.WTPrincipal class, then the second webject delegate is used.
The Windchill adapter then invokes the class wt.adapter.org.
QueryPrincipalsWebjectDelegate to query for participants using the search criteria
specified by the user.
Alternatively, if the TYPE parameter of the QUERYOBJECTS webject contains
the name of any class or Windchill type that is not an instance of wt.org.
WTPrincipal, the first webject delegate is used. The Windchill adapter invokes the
class com.ptc.core.adapter.server.impl.QueryObjectsWebjectDelegate to query for
objects using the search criteria specified by the user.

Note
The case of characters is ignored in webject names within tasks, and dashes
are discarded when looking up webject delegates. Webject names specified in
wt.adapter.delegates.properties must be specified entirely in
uppercase and without dashes.

D e f i n i n g D e l e g a t e s f o r A t t r i b u t e Tr a n s l a t i o n
When a group is returned from Windchill adapter webjects, the FORMAT
parameter determines whether or not the attribute values in the group type
instances are formatted for the end user.
The attribute translation delegates defined in wt.adapter.delegates.properties
determine how attribute values are translated when attribute formatting is
requested by the user. Attribute translators are also used to translate values from
external string form to the internal type needed by objects being created or
updated.
The form of an attribute translation delegate is:
Attribute.attributeClass=attributeTranslatorClass

Custom Windchill Adapter Webjects 209


• attributeClass is the fully qualified name of the class of the attribute
value to translate
• attributeTranslatorClass is the fully qualified name of the class
that performs the translation
An attribute translation delegate entry is also valid for super classes of
attributeClass. If no attribute translator is found for attributeClass,
then a default translator is used.
The following example states that attribute values of the simple type boolean
should be formatted for the end user by using the com.ptc.core.adapter.server.
impl.BooleanTranslator class:
Attribute.boolean=com.ptc.core.adapter.server.impl.BooleanTranslator

This returns a string value of "true" or "false" for the boolean object content of the
attribute.
Attribute values can also be translated from Windchill types. The following
example indicates that attribute values of type com.ptc.core.meta.common.
TypeInstanceIdentifier should be formatted for the end user by using the com.ptc.
core.adapter.server.impl.ObjectReferenceTranslator class:
Attribute.com.ptc.core.meta.common.TypeInstanceIdentifier=
com.ptc.core.adapter.server.impl.ObjectReferenceTranslator

The ObjectReferenceTranslator class translates a TypeInstanceIdentifier by


returning the persistence identifier of the TypeInstanceIdentifier.

Defining Default Attribute Sets


When the user does not specify an ATTRIBUTE parameter for a webject, the
Windchill adapter returns the set of all attributes valid for the type instances in the
output group.
You can configure the Windchill adapter to return a set of default attributes for
certain types when no ATTRIBUTE parameter is specified for a webject. The
form for specifying a default attribute set for a type is:
DefaultAttributes.type=attributeList

where type is the type of the type instances in the output group and
attributeList is a comma-delimited list of logical attribute names valid for
type.
In the following example, when WCTYPE|wt.part.WTPartUsageLink type
instances are returned in an output group for a webject for which no ATTRIBUTE
parameter is specified, the attributes quantity.amount and
quantity.unit are included:
DefaultAttributes.WCTYPE|
wt.part.WTPartUsageLink=quantity.amount,quantity.unit

210 PTC Windchill® Adapter Guide


Defining Attribute Sets to Exclude
Sites might want to exclude attributes from certain type instances. You can
configure the Windchill adapter to not return these attributes in output groups.
The format for specifying a set of attributes to exclude from a type is:
ExcludeAttributes.type=attributeList

where type is the type of the type instance from which to exclude attributes and
attributeList is a comma-delimited list of logical attribute names valid for
type.
In the following example, type instances in output groups of type
WCTYPE|wt.annotation.StructuredAnnotationSet will not include
the creator attribute.
ExcludeAttributes.WCTYPE|
wt.annotation.StructuredAnnotationSet=creator

Custom Windchill Adapter Webjects 211

Das könnte Ihnen auch gefallen