<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Update Value of an Attribute on Resulting Objects (type EPMDocument) through Expression Robot in Windchill Customization</title>
    <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/Update-Value-of-an-Attribute-on-Resulting-Objects-type/m-p/1045917#M10793</link>
    <description>&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;PA_11085333&lt;/P&gt;&lt;P&gt;You can use this code snippet&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ChangeActivity2 changeActivity = (ChangeActivity2) primaryBusinessObject;&lt;BR /&gt;QueryResult theChangeablesAfterResult = ChangeHelper2.service.getChangeablesAfter(changeActivity,&lt;BR /&gt;false);&lt;BR /&gt;while (theChangeablesAfterResult.hasMoreElements()) {&lt;BR /&gt;Object element = theChangeablesAfterResult.nextElement();&lt;BR /&gt;if (element instanceof ChangeRecord2) {&lt;BR /&gt;changeRecord = (ChangeRecord2) element;&lt;BR /&gt;Changeable2 theChangeable = changeRecord.getChangeable2();&lt;/P&gt;</description>
    <pubDate>Wed, 03 Dec 2025 08:28:18 GMT</pubDate>
    <dc:creator>MTH</dc:creator>
    <dc:date>2025-12-03T08:28:18Z</dc:date>
    <item>
      <title>Update Value of an Attribute on Resulting Objects (type EPMDocument) through Expression Robot</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/Update-Value-of-an-Attribute-on-Resulting-Objects-type/m-p/1045080#M10776</link>
      <description>&lt;DIV&gt;Hello! I am looking for some help with updating the value of an attribute that exists on resulting objects of a change activity through the use of an expression robot in the workflow of the change activity. The resources I've been able to find all seem to call out the object that's having its attribute modified as the primarybusinessobject, so where I am having trouble is calling to the resulting objects while the change activity is the primarybusinessobject of the workflow.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I tried the following, but had the error returned "WTChangeActivity2 cannot be converted to FormDataHolder"&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;wt.change2.WTChangeActivity2 changeTask = (wt.change2.WTChangeActivity2) primaryBusinessObject;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;java.util.Vector results = com.ptc.windchill.enterprise.changeable.ChangeableDataFactory.getResultingObjects(changeTask);&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 26 Nov 2025 17:16:33 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/Update-Value-of-an-Attribute-on-Resulting-Objects-type/m-p/1045080#M10776</guid>
      <dc:creator>PA_11085333</dc:creator>
      <dc:date>2025-11-26T17:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Update Value of an Attribute on Resulting Objects (type EPMDocument) through Expression Robot</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/Update-Value-of-an-Attribute-on-Resulting-Objects-type/m-p/1045620#M10789</link>
      <description>&lt;P&gt;Could you share some more of the code you're trying?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Essentially I think you need to navigate from the ECN to the Resulting Objects. A first step would be this:&amp;nbsp;&lt;A href="https://www.ptc.com/en/support/article/CS55955?source=search" target="_blank"&gt;https://www.ptc.com/en/support/article/CS55955?source=search&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Dec 2025 21:35:12 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/Update-Value-of-an-Attribute-on-Resulting-Objects-type/m-p/1045620#M10789</guid>
      <dc:creator>joe_morton</dc:creator>
      <dc:date>2025-12-01T21:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: Update Value of an Attribute on Resulting Objects (type EPMDocument) through Expression Robot</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/Update-Value-of-an-Attribute-on-Resulting-Objects-type/m-p/1045917#M10793</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;PA_11085333&lt;/P&gt;&lt;P&gt;You can use this code snippet&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ChangeActivity2 changeActivity = (ChangeActivity2) primaryBusinessObject;&lt;BR /&gt;QueryResult theChangeablesAfterResult = ChangeHelper2.service.getChangeablesAfter(changeActivity,&lt;BR /&gt;false);&lt;BR /&gt;while (theChangeablesAfterResult.hasMoreElements()) {&lt;BR /&gt;Object element = theChangeablesAfterResult.nextElement();&lt;BR /&gt;if (element instanceof ChangeRecord2) {&lt;BR /&gt;changeRecord = (ChangeRecord2) element;&lt;BR /&gt;Changeable2 theChangeable = changeRecord.getChangeable2();&lt;/P&gt;</description>
      <pubDate>Wed, 03 Dec 2025 08:28:18 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/Update-Value-of-an-Attribute-on-Resulting-Objects-type/m-p/1045917#M10793</guid>
      <dc:creator>MTH</dc:creator>
      <dc:date>2025-12-03T08:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Update Value of an Attribute on Resulting Objects (type EPMDocument) through Expression Robot</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/Update-Value-of-an-Attribute-on-Resulting-Objects-type/m-p/1046672#M10806</link>
      <description>&lt;P&gt;Thank you both for the responses! I've used your suggestions to get to the below state of the expression. The issue I'm having now is that " ChangeHelper2.service.getChangeablesAfter" is returning the error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;" error: package ChangeHelper2 does not exist".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I search for it in the JavaDoc, ChangeHelper2 doesn't have the&amp;nbsp;getChangeablesAfter method. What does have that method is what&amp;nbsp;&lt;a href="https://www.ptcusercommunity.com/t5/user/viewprofilepage/user-id/205842"&gt;@joe_morton&lt;/a&gt;&amp;nbsp;suggested, (wt.change2.ChangeService2.getChangeablesAfter) but that returns the error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; "error: non-static method getChangeablesAfter(ChangeActivityIfc,boolean) cannot be referenced from a static context".&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Below is the entire code I'm working with. I'm going to continue playing around to see what I can get going but I do believe this is great progress!&lt;/P&gt;&lt;P&gt;______________________________________________________________________________________________________________&lt;/P&gt;&lt;P&gt;wt.change2.ChangeActivity2 changeActivity = (wt.change2.ChangeActivity2) primaryBusinessObject;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;wt.fc.QueryResult theChangeablesAfterResult = ChangeHelper2.service.getChangeablesAfter(changeActivity,false);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;while (theChangeablesAfterResult.hasMoreElements()) {&lt;BR /&gt;Object element = theChangeablesAfterResult.nextElement();&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;if (element instanceof wt.change2.ChangeRecord2) {&lt;BR /&gt;wt.change2.ChangeRecord2 changeRecord = (wt.change2.ChangeRecord2) element;&lt;BR /&gt;wt.change2.Changeable2 theChangeable = (wt.change2.Changeable2) changeRecord.getChangeable2();&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; com.ptc.core.lwc.server.PersistableAdapter adapter = new com.ptc.core.lwc.server.PersistableAdapter(theChangeable,null,null,new com.ptc.core.meta.common.UpdateOperationIdentifier());&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;// Load the attribute&lt;BR /&gt;&amp;nbsp; &amp;nbsp; adapter.load("Watermark");&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; // Set the new value&lt;BR /&gt;&amp;nbsp; &amp;nbsp; adapter.set("Watermark", "TestWatermark");&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; // Apply the change&lt;BR /&gt;&amp;nbsp; &amp;nbsp; adapter.apply();&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; // Save to database&lt;BR /&gt;&amp;nbsp; &amp;nbsp; PersistenceHelper.manager.modify(theChangeable);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Dec 2025 16:14:44 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/Update-Value-of-an-Attribute-on-Resulting-Objects-type/m-p/1046672#M10806</guid>
      <dc:creator>PA_11085333</dc:creator>
      <dc:date>2025-12-08T16:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: Update Value of an Attribute on Resulting Objects (type EPMDocument) through Expression Robot</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/Update-Value-of-an-Attribute-on-Resulting-Objects-type/m-p/1046685#M10807</link>
      <description>&lt;P&gt;An Update: It looks like I needed to change "&lt;SPAN&gt;ChangeHelper2.service.getChangeablesAfter&lt;/SPAN&gt;" to "wt.change2.ChangeHelper2.service.getChangeablesAfter". This made the Syntax acceptable for the Expression Robot. I ran this and the expression got hung up.&amp;nbsp;I can see from the&amp;nbsp;WfUserWorkQueue that the issue is that the file isn't being checked out before it's updated. I'm currently working through making that happen. This is what I have so far but it's not functional:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;wt.change2.ChangeActivity2 changeActivity = (wt.change2.ChangeActivity2) primaryBusinessObject;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;wt.fc.QueryResult theChangeablesAfterResult = wt.change2.ChangeHelper2.service.getChangeablesAfter(changeActivity,false);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;while (theChangeablesAfterResult.hasMoreElements()) {&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Object element = theChangeablesAfterResult.nextElement();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;if (element instanceof wt.change2.ChangeRecord2) {&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;wt.change2.ChangeRecord2 changeRecord = (wt.change2.ChangeRecord2) element;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;wt.change2.Changeable2 theChangeable = (wt.change2.Changeable2) changeRecord.getChangeable2();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;//Get check out folder for the current user in the session&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;wt.folder.Folder checkoutFolder = wt.vc.wip.WorkInProgressHelper.service.getCheckoutFolder();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;//Check out object&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;wt.vc.wip.CheckoutLink chklink = wt.vc.wip.WorkInProgressHelper.service.checkout(theChangeable, checkoutFolder, "Check out comment");&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;wt.epm.EPMDocument wrk = (wt.epm.EPMDocument) chklink.getWorkingCopy();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; com.ptc.core.lwc.server.PersistableAdapter adapter = new com.ptc.core.lwc.server.PersistableAdapter(wrk,null,null,new com.ptc.core.meta.common.UpdateOperationIdentifier());&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;// Load the attribute&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; adapter.load("Watermark");&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; // Set the new value&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; adapter.set("Watermark", "TestWatermark");&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; // Apply the change&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; adapter.apply();&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; // Save to database&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; PersistenceHelper.manager.modify(theChangeable);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;// Check in object&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;wt.vc.wip.WorkInProgressHelper.service.checkin((wt.vc.wip.Workable) wrk, "Check in comment");&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Mon, 08 Dec 2025 17:51:56 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/Update-Value-of-an-Attribute-on-Resulting-Objects-type/m-p/1046685#M10807</guid>
      <dc:creator>PA_11085333</dc:creator>
      <dc:date>2025-12-08T17:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: Update Value of an Attribute on Resulting Objects (type EPMDocument) through Expression Robot</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill-Customization/Update-Value-of-an-Attribute-on-Resulting-Objects-type/m-p/1046689#M10808</link>
      <description>&lt;P&gt;I'm happy to share I believe I have something that works! I didn't realize that I needed to Cast to a Workable since the checkout method was being cast to a changeable. The following expression successfully checked out the files, applied the desired string to the attribute on each resulting object (I did test to make sure it worked on multiple) and then checked the files back in. Thank you for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;wt.change2.ChangeActivity2 changeActivity = (wt.change2.ChangeActivity2) primaryBusinessObject;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;wt.fc.QueryResult theChangeablesAfterResult = wt.change2.ChangeHelper2.service.getChangeablesAfter(changeActivity,false);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;while (theChangeablesAfterResult.hasMoreElements()) {&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Object element = theChangeablesAfterResult.nextElement();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;if (element instanceof wt.change2.ChangeRecord2) {&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;wt.change2.ChangeRecord2 changeRecord = (wt.change2.ChangeRecord2) element;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;wt.change2.Changeable2 theChangeable = (wt.change2.Changeable2) changeRecord.getChangeable2();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;//Get check out folder for the current user in the session&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;wt.folder.Folder checkoutFolder = wt.vc.wip.WorkInProgressHelper.service.getCheckoutFolder();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;//Cast to Workable (required for checkout)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;wt.vc.wip.Workable workable = (wt.vc.wip.Workable) theChangeable;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;//Check out object&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;wt.vc.wip.CheckoutLink chklink = wt.vc.wip.WorkInProgressHelper.service.checkout(workable, checkoutFolder, "Check out comment");&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;wt.epm.EPMDocument wrk = (wt.epm.EPMDocument) chklink.getWorkingCopy();&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; com.ptc.core.lwc.server.PersistableAdapter adapter = new com.ptc.core.lwc.server.PersistableAdapter(wrk,null,null,new com.ptc.core.meta.common.UpdateOperationIdentifier());&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;// Load the attribute&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; adapter.load("Watermark");&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; // Set the new value&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; adapter.set("Watermark", "TestWatermark");&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; // Apply the change&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; adapter.apply();&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; // Save to database&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; PersistenceHelper.manager.modify(wrk);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;// Check in object&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;wt.vc.wip.WorkInProgressHelper.service.checkin(wrk, "Check in comment");&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Mon, 08 Dec 2025 18:37:27 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill-Customization/Update-Value-of-an-Attribute-on-Resulting-Objects-type/m-p/1046689#M10808</guid>
      <dc:creator>PA_11085333</dc:creator>
      <dc:date>2025-12-08T18:37:27Z</dc:date>
    </item>
  </channel>
</rss>

