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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Using Create-Objects webject to create customer experience object in Windchill

cmhaka
8-Gravel

Using Create-Objects webject to create customer experience object in Windchill

I am new to working with webjects and am trying to use the Create-Objects webject to create a Customer Experience object in Windchill. I am using Windchill version 11.1 M020.

 

I created a simple webject to start with and am executing it as a task from the browser. The code for the task is below:

 

<%@page language="java" session="false" access="http"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core" prefix="ie"%>
 
<ie:webject name="Get-Properties" type="MGT">
<ie:param name="AUTHORIZATION" data="${@SERVER[]authorization[]}"/>
<ie:param name="ATTRIBUTE" data="wt.federation.ie.VMName"/>
<ie:param name="GROUP_OUT" data="properties"/>
</ie:webject>
 
<ie:webject name="Create-Objects" type="ACT">
<ie:param name="INSTANCE" data="$(properties[0]wt.federation.ie.VMName[0])"/>
<ie:param name="FIELD" data="name='TestCreate'"/>
<ie:param name="FIELD" data="counrtyOfOccurrence='JPN'"/>
<ie:param name="FIELD" data="eventCode='CEM-A0-B4'"/>
<ie:param name="FIELD" data="description='description'"/>
<ie:param name="TYPE" data="com.ptc.qualitymanagement.cem.CustomerExperience"/>
</ie:webject>
 
When I execute I get "Exception during Create" and "Exception during Save" errors. Does anyone have any tips on where to start for debugging these errors to find what I am doing wrong? I have attached the full text of what shows on the screen after execution with the exceptions highlighted. Thank you in advance for any input. 
1 ACCEPTED SOLUTION

Accepted Solutions
HelesicPetr
22-Sapphire I
(To:cmhaka)

Hi @cmhaka 

The point is if the Customer Experience object is supported to be created by the ie:webject

 

the error "A persistence error occurred." mean that the object can not be saved in the database.

There are many reasons for that error. 

 

wrong type, wrong attributes, wrong user, wrong syntax of values, wrong access in the system, internal error and many more.


I would start with debugging the log files in the Windchill . 

 

PetrH

View solution in original post

3 REPLIES 3
HelesicPetr
22-Sapphire I
(To:cmhaka)

Hi @cmhaka 

The point is if the Customer Experience object is supported to be created by the ie:webject

 

the error "A persistence error occurred." mean that the object can not be saved in the database.

There are many reasons for that error. 

 

wrong type, wrong attributes, wrong user, wrong syntax of values, wrong access in the system, internal error and many more.


I would start with debugging the log files in the Windchill . 

 

PetrH

Thank you for your feedback @HelesicPetr. I will check the logs to see if I can find additional information there.

 

Hello @HelesicPetr ,

 

I did find in the log files that the Name and Number attributes were coming in as null values and that was preventing the object from being created. I modified my webject to include those and was able to successfully create the Customer Experience object. I did find that the object created did not show the full structure in the Windchill interface. Only the attributes that I populated in the webject showed in the interface at all. I am currently researching how to create the object using the Windchill REST services to see if that would be a better path to go.  

Top Tags