Integration with Other Applications > Introduction to Windchill ESI > Using Windchill Integration for MES > Diagnosing and Resolving Problems
  
Diagnosing and Resolving Problems
After detecting a problem that cannot be corrected automatically or by the user, you need to begin diagnosing the problem. This involves categorizing and localizing the problem to determine its root cause.
Localizing Problems
To localize the source of the problem, you need to ask questions such as:
Is the problem associated with a business process issue such as a system-of-record violation, a functional issue such as invalid data, or a technical issue such as a server being down?
Is the problem associated with Windchill PDMLink, or the distribution target MES system?
Is the problem associated with the underlying physical network and computing, rather than Windchill Integration for MES?
Can the problem scenario be duplicated in a test system with the same configuration as the production environment?
Categorizing Problems: Key Areas of Focus for Troubleshooting
To categorize problems, you need to focus on key problem areas and get familiar with error handling reports such as error logs and error handling codes.
Most system-related, technical issues can be categorized according to the location of the root cause.
It is also important for you to become familiar with the business process and functional troubleshooting information in the online help. Users who are not familiar with this information may escalate these issues to you.
The following categories of problems and their descriptions are not intended to be exhaustive step-by-step procedures. Rather, they are provided to help you focus on some of the key or potential root causes of technical issues:
Problems originating from Windchill Integration for MES
Problems originating from the distribution target
Problems indicated in Windchill Integration for MES logs
Windchill Integration for MES Problems
The following lists how to deal with problems that may originate from Windchill ESI services:
Verify that the Windchill server is running
Scan for error messages in the Windchill administrative logs
Verify that the system that represents the distribution target (for example, the relevant FTP or e-mail server) is up and running and that the identifier is set correctly for the given target
Verify the appropriateness of the values of the relevant Windchill Integration for MES properties
Distribution Target Problems
Several common problems can cause errors in publishing objects from Windchill PDMLink to a target system. You can diagnose these problems by searching the available message logs and coordinating your resolution efforts with your system administrator.
To diagnose the issue, the Enterprise Systems Transaction Administration GUI logs the error messages for the overall transaction and associated subtransactions. By clicking the link for the subtransaction or transaction, the associated error messages can be viewed.
Below are the formats for the error message that are logged in the GUI for a transaction and associated subtransaction:
Resolving Problems
After you have diagnosed the problems, you need to resolve them. The following lists some general techniques you can use when troubleshooting as well as a list of specific problems with their solutions:
Resolving Specific Problems
The following section lists specific problems, provides possible causes, and suggests solutions to resolve them:
Problem
The following message appears in the Windchill Integration for MES transaction log GUI:
System errors occurred when publishing 0000000081 to distribution target E-Mail. javax.mail.MessagingException: Could not connect to SMTP host: int-mail.ptc.com, port: 25;
nested exception is:
java.net.SocketException: Software caused connection abort: connect
Possible Cause
Port is blocked due to a firewall or due to network security.
Solution
Consult a network administrator or a system administrator to allow connections to the server.
Problem
The following message appears in the Windchill Integration for MES transaction log GUI:
System errors occurred when publishing 0000000101 to distribution target FTP to i2440
Error trying to invoke webject: "Write-To-Ftp". Nested exception is: java.net.ConnectException: Connection timed out: connect
Possible Cause
The FTP Server is not running or there is a network problem.
Solution
Consult a server administrator or a system administrator to allow connections to the server.
Problem
The following message appears in the Windchill Integration for MES transaction log GUI:
System errors occurred when publishing 0000000101 to distribution target FTP to i2440. Error trying to invoke webject: "Write-To-Ftp". Nested exception is: sun.net.ftp.FtpLoginException: Not logged in.
Possible Cause
An invalid user name or password is being used to login to the FTP server.
Solution
Correct the user name or password by recreating the distribution target.
Problem
The Distribution Targets table is not displayed in the properties page of custom parts like 'wt.wadm.FADProduct' after the targets are created in the database.
Possible Cause
The default version of the file <Windchill>\codebase\netmarkets\jsp\tgt\distributionList.jsp is not designed to display the distribution targets table for custom parts.
Solution
To enable the Distribution Targets table for custom parts such as wt.wadm.FADProduct.
1. Open the file: <Windchill>\codebase\netmarkets\jsp\tgt\distributionList.jsp
2. Modify the if statement as follows, by adding the custom part type.
For example, if the object type is wt.wadm.FADProduct modify the if statement as follows:
if (oid.indexOf("wt.doc") != -1 ||
oid.indexOf("wt.epm") != -1 ||
oid.indexOf("wt.part") != -1 ||
oid.indexOf("com.ptc.windchill.mpml.processplan.MPMProcessPlan") != -1 ||
oid.indexOf("com.ptc.windchill.mpml.resource.MPMProcessMaterial") != -1 ||
oid.indexOf("com.ptc.windchill.mpml.resource.MPMTooling") != -1 ||
oid.indexOf("com.ptc.windchill.mpml.resource.MPMSkill") != -1 ||
oid.indexOf("com.ptc.windchill.option.model.OptionSet") != -1 ||
oid.indexOf("wt.wadm.FADProducts") != -1)
3. Save the file and restart the servlet engine.
Problem
A subtype attribute, or its value, is not rendered for an object in the response file.
Possible Cause
This problem could occur if:
The mapping is incorrect
A unique identifier (internal name) is not defined for the subtype attribute
The unique identifier (internal name) is not the source attribute name in the Map element defined for the given object type in the ESI response meta information file.
Solution
Ensure that the mapping is correct. For example, if a subtype attribute has been defined on wt.part.WTPart then:
Attribute name: volume
Unique identifier: org.ptc.volume
Mapping: <esi:attributeMapping sourceAttribute="org.ptc.volume">Volume</esi:attributeMapping>
Problem
A distribution target does not get automatically assigned to a part during publication, although the attribute Default for Context on the target is set to Yes and the target belongs to either the same context as the part, or to a higher level context.
Possible Cause
The Windchill Integration for MES preference View To Distribution Target Mappings is not set appropriately.
Solution
Ensure that the preference View To Distribution Target Mappings is set to an appropriate value. For example, if the part in question is created in the Design view, the preference must be set to a value such as Design:001, in order for a distribution target with number 001 to be automatically assigned to the part when publishing the latter. Alternatively, the preference can have a value that makes no reference to the number of the target.
Problem
An error message appears when associating a certain distribution target to a part.
Possible Cause
This problem could be caused by any one of the following:
 The Windchill Integration for MES preference View To Distribution Target Mappings is not set appropriately.
 The distribution target is already assigned to the part.
Solution
Ensure that the said preference is set to an appropriate value. For example, if the part in question is created in the Manufacturing view, the preference must be set to a value such as Manufacturing:002, in order for a distribution target with number 002 to be assignable to the part. Alternatively, the preference can have a value such as Plant1:002 (where Plant1 is a child view of Manufacturing) or one that makes no reference to the number of the target.
Ensure that the part is not already associated to the distribution target being associated.
Problem
A part gets sent to a certain distribution target as a changed one in the ESI response, although the part was neither iterated nor revised, after its last successful publication to that target.
Possible Cause
This could be caused by any one of the following:
Date effectivity was set for the part or was changed since the part was last successfully published.
The lifecycle state on the part was changed since it was last successfully published.
The Windchill Integration for MES preference Publish Common Enterprise Data Information is set to Yes and the ERPMaterial object that represents the part was modified since the part was last successfully published.
The Windchill Integration for MES preference Publish View Specific Enterprise Data Information is set to Yes and the ERPPartSpecificPlantData object that represents plant specific data for the part and target was modified since the part was last successfully published.
Solution
It is an expected behavior that the part is sent as a changed one in the above described circumstances. If you want it sent as an unchanged part instead, use an approach that best suits your needs, keeping in mind the above listed possible causes.
Problem
A certain global attribute added to the type Enterprise Data does not get sent with the ESI response when the corresponding part is published.
Possible Cause
This problem could be caused by any one of the following:
The Windchill Integration for MES preference Publish Common Enterprise Data Informationis set to No.
No attributeMapping entry exists for the global attribute in the ESI response meta information file used for the publication.
An entry exists for the global attribute in the ESI response meta information file, but the XML attribute erpMaterialAttribute for the entry is not set to true.
Solution
Ensure that the preference Publish Common Enterprise Data Information is set to Yes.
Add an attributeMapping entry for the global attribute in the relevant ESI response meta information file, and remember to set its XML attribute erpMaterialAttribute to true.
Problem
A certain global attribute added to the type View Specific Data does not get sent with the ESI response when the corresponding part is published.
Possible Cause
This problem could be caused by any one of the following:
The Windchill Integration for MES preference Publish View Specific Enterprise Data Information is set to No.
No attributeMapping entry exists for the global attribute in the ESI response meta information file used for the publication.
An entry exists for the global attribute in the ESI response meta information file, but the XML attribute plantSpecificAttribute for the entry is not set to true.
Solution
Ensure that the preference Publish View Specific Enterprise Data Information is set to Yes.
Add an attributeMapping entry for the global attribute in the relevant ESI response meta information file, and remember to set its XML attribute plantSpecificAttribute to true.
Problem
The value sent with the ESI response for the Usage element for a certain assembly is different from the value specified for BOM Type for the assembly part from the Manufacturing Product Structure Browser, using the Update Alternate BOM Number option.
Possible Cause
This can occur when the Windchill Integration for MES preferences View To Distribution Target Mappings and View To BOM Type Mappingsare set to override the BOM Type value specified on the assembly part iteration. For example, if these preferences are set to values Design:001,Manufacturing:002 and Design:Engineering,Manufacturing:Production respectively, a value of Engineering will be sent for the Usage element when the assembly is published to the distribution target with number 001, thereby overriding the BOM Type value that may have been specified on the assembly part.
Solution
What is described in the problem statement above is only an expected behavior. If you want the BOM Type value (set on an assembly part) to be sent with the Usage element for the BOM, ensure that the number of the distribution target (to which the BOM is being sent) does not figure in the value of the preference View To Distribution Target Mappings; or if it does, the corresponding view name does not figure in the value of the preference View To BOM Type Mappings.
Problem
Component parts in an assembly are not published to certain distribution targets, although the targets are associated to those parts.
Possible Cause
This problem could be caused by any of the following:
The distribution targets have their Status attribute set to Inactive.
The distribution targets are not associated to the assembly part that holds the component parts; also, the targets belong in a different Windchill Integration for MES destination as compared to those associated to the assembly part.
Solution
Ensure that the distribution targets have their Status attribute set to Active.
Associate the distribution targets in question to the assembly part as well; alternatively, ensure that these targets belong in the same Windchill Integration for MES destination as any of the targets associated to the assembly part.
* 
By default, every Windchill Integration for MES distribution target is considered to belong to a unique destination. You would need to customize ESI services in order for two or more targets to be considered to belong in the same destination. For more information see the Info*Engine Administration.
Problem
An error message pertaining to the ESI response meta information file appears when clicking Finish from the New Distribution Target or the Edit Distribution Target window.
Possible Cause
This problem could be caused by any of the following issues with the value specified for the distribution target attribute ESI Response Meta Information File Path:
The path to the file is a non-existent one.
The contents of the file do not conform to the underlying schema (out-of-the-box, the schema is provided by the file ESIResponseMetaInformation.xsd).
The contents of the file are invalid for example, a MapInformation element in the file references a non-existent Map element. There could be a variety of other reasons for why the contents of the file may be considered invalid.
The id attribute associated with at least one Map element in the file is already in use with a different Map element that is not identical to the former. For example, this can occur if the user makes the distribution target (being created or edited) point to a certain ESI response meta information file, whose Map element for parts is modified to accommodate an additional global attribute, but whose id attribute continues to have the value ESIPart, while a different distribution target is already pointing to the ESI response meta information file that is provided by default.
Solution
Ensure the following:
The path specified as value for the distribution target attribute ESI Response Meta Information File Path exists.
The contents of the referenced ESI response meta information file conform to the underlying schema, and that they are valid.
* 
For more information see the Info*Engine Administration.
Problem
Multiple Release To Manufacturing workflows are created upon releasing a promotion request.
Possible Cause
This happens if the Windchill Integration for MES preference Publish Promotion Requests has a value of No.
Solution
Set the preferencePublish Promotion Requests to Yes in order that a single RTM workflow is created upon releasing a promotion request
* 
With the Windchill Integration for MES preferencePublish Promotion Requests set to No, releasing a promotion request results in as many RTM workflows as there are promotables in the promotion request.
Problem
A document associated to a part (or to a manufacturing object) does not get published to certain distribution targets that are associated to it.
Possible cause
The document is associated to additional distribution targets as compared to the part (or the manufacturing object). In such a case, the document is published only to those distribution targets that are associated to the part (or to the manufacturing object).
Solution
What is described above is only an expected behavior. In order that the document is published to the additional targets, release the document as a standalone object, or in association with a Change Notice or a promotion request.
Problem
Only the top-level document in a CAD document structure is published upon releasing a part (or a manufacturing object) associated to the structure.
Possible cause
This is only an expected behavior, in that related CAD document structures are not processed.
Solution
In order that a CAD document structure is published, release the structure either as a standalone object, or in association with a Change Notice or a promotion request.
Problem
Only the top-level document in a CAD document structure is published upon releasing the structure.
Possible cause
This can occur if any of the following is true:
The distribution target attribute Number of Levels to Publish when Publishing a CAD Document Structure is set to 0 (zero), or to an empty string.
The document masters that represent the first level children in the structure are not resolvable to iterations using the distribution target attribute Saved Filter to be used when Publishing a CAD Document Structure.
Solution
Set the attribute Number of Levels to Publish when Publishing a CAD Document Structure to a number specifying the required number of levels.
Set the attribute Saved Filter to be used when Publishing a CAD Document Structure to an appropriate value.
Problem
The distribution target attribute Saved Filter to be used when Publishing a Change Notice does not get used when publishing a CAD document structure in association with a Change Notice.
Possible cause
This is only an expected behavior. ESI services use the attribute Saved Filter to be used when Publishing a CAD Document Structure instead.
Solution
Set the attribute Saved Filter to be used when Publishing a CAD Document Structure to the required value.
Problem
Documents that are linked to a WTDocument are not processed by ESI services.
Possible cause
This is only an expected behavior, in that only CAD document structures are processed.
Solution
In order for the documents linked to the top-level document to be published, release those documents separately.
Problem
An option set associated to a part (or to a process plan) does not get published to certain distribution targets that are associated to it.