Skip to main content
9-Granite
January 9, 2024
Solved

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

  • January 9, 2024
  • 1 reply
  • 1380 views

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. 
Best answer by HelesicPetr

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

1 reply

HelesicPetr
22-Sapphire II
22-Sapphire II
January 17, 2024

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

cmhaka9-GraniteAuthor
9-Granite
January 22, 2024

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