Skip to main content
1-Visitor
April 17, 2015
Solved

How to get Resulting Objects before they are Persisted to database?

  • April 17, 2015
  • 2 replies
  • 4547 views

Hi Experts,

I am trying to get resulting Objects added to the change task before they are persisted to the database, as I am trying to put a constraint on the resulting object. I want only the resulting object having design view to be permitted and if other parts are added it should not allow him to create the change notice. So is there a way I can get the resulting object before they are persisted.

Best answer by hmungekar

Hi Lori,

Thanks a lot. I was able to get the resulting items using your link.

List<NmOid> resultingItems = validationCriteria.getAddedItemsByName("changeTask_resultingItems_table");

I used the getAddedItemsByName("changeTask_resultingItems_table") method of UIValidationCriteria.

2 replies

23-Emerald I
April 17, 2015

Hrishikesh,

The following article provides a way to get the Release Targets from the Resulting Objects table in the Edit Change Task wizard. I believe the steps to get the resulting objects views themselves would be somewhat similar. It would be a matter of finding the appropriate key.

http://support.ptc.com/appserver/cs/view/solution.jsp?n=CS194974

hmungekar1-VisitorAuthorAnswer
1-Visitor
April 21, 2015

Hi Lori,

Thanks a lot. I was able to get the resulting items using your link.

List<NmOid> resultingItems = validationCriteria.getAddedItemsByName("changeTask_resultingItems_table");

I used the getAddedItemsByName("changeTask_resultingItems_table") method of UIValidationCriteria.

hmungekar1-VisitorAuthor
1-Visitor
April 22, 2015

Hi lori,

I want to add resulting objects to session as I want the resulting items in change notice form processor. But I am finding it difficult to get NmCommandBean object from UIValidator. Can you help me out over here or is there any other alternative to get the Resulting Items from every change activity to change notice form processor?

23-Emerald I
April 24, 2015

Hi Hrishikesh,

I'm sorry I haven't had a whole lot of time to look into your question this week. You may want to look into perhaps using a custom form processor. That will allow you to get the NmCommandBean object and you could then validate the data within it.

hmungekar1-VisitorAuthor
1-Visitor
April 25, 2015

HI Lori,

no problem lori. I was able to find the other change activities using change notice form processor, not from NmCommandBean but from ObjectBean.

thanks once again lori