powered by CADENAS

Manual

Manual

3.3.1. JSP files

General information

  • The required JSPs have to be stored in the customer's Windchill system. For this, normally they are stored by the customer in a subfolder of the directory <WindchillInstallDirectory>\Windchill\codebase\infoengine\jsp .

  • Then for each JSP the URL used for calling the respective JSP has to be stored in the configuration file <windchill_public_api.cfg>, in the section [JspPaths]. Normally the URL has the following format.

    http://<WindchillServer>/Windchill/infoengine/jsp/<Unterverzeichnisstruktur>/<JSPDateiname>

    Should the JSPs be stored at another place by customer, the URL has to be provided by the customer.

  • Not always all JSPs are needed (see description of the respective JSP).

  • In order to be able to access the JSPs, login data (user, password) is required. Depending on the use they can be stored in the configuration files ifproepdmlink.cfg or pdmProxies.cfg.

CNS_AddLinkedWTPartToWorkspace.jsp

Required for the function AddLinkedWTPartToWorkspace.

Input:

workspaceName The name of the target Workspace.
workspaceContainerName The name of the Container the Workspace is located in. Default is "".
documentCADName The CADname of the document to get the part for.
documentType The document type to use when searching for the EPMDocument in the Workspace. Default is "wt.epm.EPMDocument".
partType The part type to use when retrieving the parts referenced by the EPMDocument. Default is "wt.part.WTPart".
mode Bitfield controlling what happens if no or multiple linked parts are found. Default is 0.
  • 0: No error

  • 1: No linked part > error

  • 2: Multiple linked parts > error

Get the Workspace identified by <workspaceName>, get the EPMDcoument identified by <documentSearchAttribute><documentSearchValue> from the workspace, get the linked WTPart(s) from the EPMDocument and add it/them to the Workspace.

CNS_ChangeIdentity.jsp

Required for the function ChangeIdentity.

Input:

searchKey The name of the attribute to use when searching for the Windchill object. This has to be an attribute with an unique value. E.g. "name" or "number". Default is "number".
searchValue The value to use when searching for the Windchill object using <searchKey>.
where Optional where statement for advanced search. Overrides <searchKey> & <searchValue>.
type The type of the Windchill object. {"wt.epm.EPMDocument", "wt.part.WTPart", ...}. Default is "wt.epm.EPMDocument".
attrToChange The attribute to change.
newVal The new value for the attribute.

Searches for a Windchill object and sets the attribute <attrToChange> to <newVal>.

CNS_CreateAndLinkPart.jsp

Required for the function CreateAndLinkPart.

Input:

docType The document type to search for. Default is "wt.epm.EPMDocument".
epmDocSearchKey The name of EPMDocument attribute to use when searching for the EPMDocument. This has to be an attribute with an unique value. E.g. "name" or "number".
epmDocSearchValue The value to use when searching for the EPMDocument using <epmDocSearchKey>.
partType The type of the part to create. Default is "wt.part.WTPart".
wtPartSearchKey The name of part attribute to use when searching for the part. This has to be an attribute with an unique value. E.g. "name" or "number".
wtPartSearchValue The value to use when searching for the part using <wtPartSearchKey>.
createPart Create part if no part is found? 0 -> no | 1 -> yes; Default is 1;
customAttributeNameX The name of the Xth attribute to set when creating the Part. X : {0,1,2,...}.
customAttributeValueX The value to set <customAttributeNameX> to when creating the Part. X : {0,1,2,...}.
linkType The link type to create. Default is "wt.epm.build.EPMBuildRule".
  • "wt.epm.build.EPMBuildRule" : creates owner link from Document to Part (direction must be set to "DocumentToPart").

  • "wt.epm.structure.EPMDescribeLink" : creates content link from Part to Document (direction must be set to "PartToDocument").

  • all other Windchill link types valid for linking a EPMDocument to a WTPart

linkDirection The direction of the link. Valid values: {"DocumentToPart", "PartToDocument"}. Default is "DocumentToPart".
  1. Search for document by <epmDocSearchKey>==<epmDocSearchValue>. IF no document is found execution is aborted with an appropriate error message!

  2. IF <wtPartSearchKey> & <wtPartSearchValue> are set: Search for a part of type <partType> using these values.

  3. IF no part is found in (2) & <createPart> is set to 1: Create new part (if attribute "name" is not provided the name of the EPMDocument will be used the same applies to "number")

    IF no part is found in (2) & <createPart> is set to 0: Execution is aborted with an appropriate error message!

  4. Checkout part

  5. IF <linkDirection>="PartToDocument" then checkout Document

  6. Link EPMDocument with Part

  7. Check in Part

  8. Check in Document if checked out

CNS_EPMExists.jsp

Required for the NativeCheckin.

Input:

searchKey The name of EPMDocument attribute to use when searching for the EPMDocument. This has to be an attribute with an unique value. E.g. "name" or "number".
searchValue The value to use when searching for the EPMDocument using <searchKey>.

Searches for CAD document and returns 1 if it exists and 0 if not.

CNS_FindDocumentsByAttributes.jsp

Required for the function searchDocumentByAttributes.

type

The document type to search for.

  • For CadDocuments: wt.epm.EPMDocument.

  • For other documents like Pdf, XML ...: wt.doc.WTDocument.

Default is wt.epm.EPMDocument

ReturnAttribute The name of the document attribute to use for the returned list. Default is "CADname".
WHERE_CLAUSE The WHERE clause to use for the search.

Performs the search and returns a "|" separated list of document names containing the name of each document that matches all search criteria.

CNS_GetContainerOIDs.jsp

Required for the document search of PdmProxies (PLMSynchro query).

Get folder, library, product or context OIDs.

jobID

Unique ID to identify a client request. If a timeout occurs the client can send further requests using the same <jobID> and will get information about job execution state and, if the job is completed, the calculated data is returned.

deleteJob

If data from a completed job that was started by an earlier request is returned: delete job from application context?

Values: 1 -> job gets deleted | 0 -> job will not be deleted. Default is 0.

action Defines which action is performed:
  • "path" - Use path, [library|product], and context to get a list of SubFolder OIDs

  • "library" - Use library to get a list of library OIDs

  • "product" - Use product to get a list of product OIDs

  • "exchange"- Get OIDs of all exchange containers

library Windchill Library
libraryOp The operation used for "library". Supported are {"=", "LIKE", "NOT LIKE"}. If using wildcards only "LIKE" and "NOT_LIKE" are supported!. Default is "=".
product Windchill Product
productOp The operation used for "product". Supported are {"=", "LIKE", "NOT LIKE"}. If using wildcards only "LIKE" and "NOT_LIKE" are supported!. Default is "=".
context Windchill Context
contextOp The operation used for "context". Supported are {"=", "LIKE", "NOT LIKE"}. If using wildcards only "LIKE" and "NOT_LIKE" are supported!. Default is "=".
path The folder "path". E.g. "Default/fold1/fold2|/foldA/foldB". Partial folder names are not allowed!
pathOp The operation used for "path". Supported are {"=", "startsWith", "endsWith"}. Default is "startsWith".

CNS_GetDataByObjectIds_WC10.jsp

Required for the data query of PdmProxies (PLMSynchro data retrieval).

Input:

execute

This parameter must be set to "1". Otherwise the data retrieval won't be executed.

jobID Unique ID to identify a client request. If a timeout occurs the client can sen further requests using the same <jobID> and will get information about job execution state and, if the job is completed, the calculated data is returned.
deleteJob

If data from a completed job that was started by an earlier request is returned: delete job from application context ?

Values: 1 -> job gets deleted | 0 -> job will not be deleted. Default is 0.

ObjectIds Comma separated list of EPMDocument ObjectIdentifiers ("wt.epm.EPMDocument:329170,wt.epm.EPMDocument:329225,...").
getChildren Get children for all assemblies ? 0 -> NO, 1 -> YES. Default is 0.
childVersion Get the "latest" or the "asSaved" version of the children. Default is "asSaved".
assemblyMaxSize Skip assemblies having more than <assemblyMaxSize> sub[parts|assemblies]. Default is 0 (no skipping).
getReferences Get references for all documents ? 0 -> NO, 1 -> YES. Default is 0.
referenceVersion Get the "latest" or the "asSaved" version of the references. Default is "asSaved".
getMaterials Get associated WTParts for all documents? 0 -> NO, 1 -> YES. Default is 0.
expandGenerics Get instances for all generics ? 0 -> NO, 1 -> YES. Default is 0.
expandRootInstances Expand all instances (instance >> generic with instances) on root level ? 0 -> NO, 1 -> YES. Default is 0.
getLatestColumn The name of the column storing if a specific instance is the latest version of a object. Default is "iterationInfo.latest".
customDocumentAttributes "|" separated list of custom EPMDocument attributes to retrieve when a query is executed. Only attributes of type String() or attributes with reasonable toString() method!
customPartAttributes "|" separated list of custom WTPart attributes to retrieve when a query is executed. Only attributes of type String() or attributes with reasonable toString() method!
attributeFilter "|" separated list of attribute names (not) to retrieve. Default is an empty list.
filterType
  • "inclusive" : only attributes contained in <attributeFilter> will be added to the returned XML.

  • "exclusive" : attributes contained in <attributeFilter> will not be added to the returned XML.

Default is "exclusive".

For each ObjectIdentifier the EPMDcoument is retrieved and it's data is written to the returned XML. Gets data from EPMDocument and Element objects. Optionally retrieves components / family table member data.

CNS_GetDownloadLink_WC10.jsp

Required for the document download of PdmProxies (PLMSynchro download).

Input:

searchKey

The name of the attribute to use when searching for the Windchill object. This has to be an attribute with an unique value. E.g. "name", "number".

searchValue The value to use when searching for the Windchill object using <searchKey>.
type The type of the Windchill object.
  • For CAD documents: type=wt.epm.EPMDocument

  • For family table CAD documents: type=wt.epm.familytable.EPMSepFamilyTable

  • For other documents like pdf, xml ...: type=wt.doc.WTDocument

objectIdentifier If this is provided <searchKey>, <searchValue> and <type> will be ignored.

Searches for a Windchill object and returns a download link.

CNS_GetObjectAttribute.jsp

Required for the function GetObjectAttribute.

Searches for a Windchill object using <type>, <searchKey>, <searchValue> and returns the value of the attribute given by <attributeName>.

searchKey

The name of the attribute to use when searching for the Windchill object. This has to be an attribute with an unique value. E.g. "name" or "number".

searchValue

The value to use when searching for the Windchill object using <searchKey>.

type The type of the Windchill object. {"wt.epm.EPMDocument", "wt.part.WTPart", ...}.
attributeName The name of the attribute.
where Where statement for object search. Optional. Overrides <searchKey> + <searchValue>!
separator

If a separator is provided, the values of all objects found by the search are returned in a <separator> separated string.

Default is to return the value of the last object, which is the latest if a unique valued attribute has been used for searching.

CNS_JspTest.jsp

Always required once JSPs are used. Used for the testing of connection.

CNS_MoveObject.jsp

Required for the functions MoveObjects, MoveObject and Move part.

Input:

searchKey

The name of the attribute to use when searching for the Windchill object. Default is "number". This has to be an attribute with an unique value. E.g. "name" or "number".

searchValue The value to use when searching for the Windchill object using <searchKey>.
library The name of the target library.
folderPath The path of the folder starting directly after the library - "/Default/" has to be appended at the front. (No \ supported !!!) E.g. /Default/RootFolder/SubFolderA/SubFolderB.
type The type of the Windchill object to move. {"wt.epm.EPMDocument", "wt.part.WTPart", ...}. Default is "wt.epm.EPMDocument".
create Create not existing folders ? 0 -> no | 1 -> yes; Default is 0;

Move Windchill object(s) given by <searchKey>=<searchValue> to folder given by <library> & <path>.

CNS_SearchObjects.jsp (replaces CNS_QueryObjects.jsp as of V11 Sp12)

Required for the document search of PdmProxies (PLMSynchro query).

Search for Windchill documents using the Search-Objects webject.

execute

This parameter must be set to "1". Otherwise the query won't be executed.

jobID

Unique ID to identify a client request. If a timeout occurs the client can send further requests using the same <jobID> and will get information about job execution state and, if the job is completed, the calculated data is returned.

deleteJob

If data from a completed job that was started by an earlier request is returned: delete job from application context?

Values: 1 -> job gets deleted | 0 -> job will not be deleted. Default is 0.

type Object type to search for. Default is "wt.epm.EPMDocument". Only EPMDocument and sub types of EPMDocument.
getLatestIteration Only get documents with "iterationInfo.latest" = true. This means that all documents with "iterationInfo.latest" = false are ignored by the search! Values: {"ALL", "LATEST"}. Default is "LATEST".
getLatestVersion

Only get documents with latest revision. Values: {"ALL", "LATEST"}. Default is "LATEST".

searchObjectsWhereClause The where clause for the Search-Objects call.

CNS_UnhandledException.jsp

Always required once JSPs are used. Used for the error management of the other JSPs.