<?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: Retrieving a Attribute from an Object Using an Expression in a Workflow in Windchill</title>
    <link>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87780#M10289</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;getting this error when checking syntax&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Checking Syntax...&lt;/P&gt;&lt;P&gt;C:\ptc\Windchill_10.2\Windchill\temp\WfExpression831571.java:39: error: cannot find symbol&lt;/P&gt;&lt;P&gt;IBAValue_VM_Name= VM_Name&lt;/P&gt;&lt;P&gt;^&lt;/P&gt;&lt;P&gt; symbol: variable IBAValue_VM_Name&lt;/P&gt;&lt;P&gt; location: class WfExpression831571&lt;/P&gt;&lt;P&gt;Note: C:\ptc\Windchill_10.2\Windchill\temp\WfExpression831571.java uses unchecked or unsafe operations.&lt;/P&gt;&lt;P&gt;Note: Recompile with -Xlint:unchecked for details.&lt;/P&gt;&lt;P&gt;1 error&lt;/P&gt;&lt;P&gt;Syntax check complete.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Feb 2015 20:25:01 GMT</pubDate>
    <dc:creator>zsmith</dc:creator>
    <dc:date>2015-02-10T20:25:01Z</dc:date>
    <item>
      <title>Retrieving a Attribute from an Object Using an Expression in a Workflow</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87757#M10266</link>
      <description>Hi All,I need to retrieve an attribute ("Operation") which which I have added to a Change Notice in a workflow expression - since the value of this attribute alters downstream activities.So far I have got as far as:wt.change2.WTChangeOrder2 co = (wt.change2.WTChangeOrder2)primaryBusinessObject;String</description>
      <pubDate>Wed, 02 May 2018 16:08:01 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87757#M10266</guid>
      <dc:creator>Toby.Pettit</dc:creator>
      <dc:date>2018-05-02T16:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving a Attribute from an Object Using an Expression in a Workflow</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87758#M10267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would help to learn the wt.query and wt.fc packages. Short of that, just use info engine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;public static Group test(WTObject primaryBusinessObject) throws Exception {&lt;/P&gt;&lt;P&gt; String instance = WTProperties.getLocalProperties().getProperty("wt.federation.ie.VMName");&lt;/P&gt;&lt;P&gt; IeService service = new IeService();&lt;/P&gt;&lt;P&gt; ObjectWebject webject = new ObjectWebject("QUERY-OBJECTS");&lt;/P&gt;&lt;P&gt; webject.setService(service);&lt;/P&gt;&lt;P&gt; webject.setParam("INSTANCE",instance);&lt;/P&gt;&lt;P&gt; webject.setParam("OBJECT_REF",PersistenceHelper.getObjectIdentifier(primaryBusinessObject).getStringValue());&lt;/P&gt;&lt;P&gt; webject.setParam("ATTRIBUTES","*");&lt;/P&gt;&lt;P&gt; webject.invoke();&lt;/P&gt;&lt;P&gt; Group group = webject.getService().getGroup();&lt;/P&gt;&lt;P&gt; return group;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;group.getAttributeValue(0, "Operation");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p.s. Don't hardcode this inside an expression. And it has to run on the MethodServer. Your servlet engine won't like it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2011 17:57:19 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87758#M10267</guid>
      <dc:creator>MatthewKnight</dc:creator>
      <dc:date>2011-11-10T17:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving a Attribute from an Object Using an Expression in a Workflow</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87759#M10268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We do this very often in many workflow templates, without using webjects - just need simple Java code.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But - In 10.0, check out the new GUI-based way to do this that is available - very nice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2011 18:19:38 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87759#M10268</guid>
      <dc:creator>MikeLockwood</dc:creator>
      <dc:date>2011-11-10T18:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving a Attribute from an Object Using an Expression in a Workflow</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87760#M10269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We do this very often in many workflow templates, without using webjects - just need simple Java code.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But - In 10.0, check out the new GUI-based way to do this that is available - very nice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Nov 2011 18:21:16 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87760#M10269</guid>
      <dc:creator>MikeLockwood</dc:creator>
      <dc:date>2011-11-10T18:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving a Attribute from an Object Using an Expression in a Workflow</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87761#M10270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mike,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently we are only on 9.1 (need a proE upgrade first), so will not be getting 10.0 for about another year. So if you can do it in a workflow then can you please tell me the java expression I need? Or at least where precisely I should be looking.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, is the Windchill Javadoc the only means of learning the packages as Matthew has suggested I do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Toby&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 13:53:40 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87761#M10270</guid>
      <dc:creator>Toby.Pettit</dc:creator>
      <dc:date>2011-11-16T13:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving a Attribute from an Object Using an Expression in a Workflow</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87762#M10271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know of two other ways to retrieve IBA values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Would be to write your own queryspec, joining your pbo to the *value table, and joining that to the *definition table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Uses your pbo's AttributeContainer, and retrieves the AttributeDefDefaultViews and AbstractValueViews.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 is the approach we use when writing reports. 2 is the approach we use when dealing with single objects where we want to get/set values, but involves lots of code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike, can you share your method?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Toby, you're kind of in a tough spot if you don't have an expert on hand. When I'm trying to figure something new out, I'll usually start with looking into how PTC does it. Knowing how they structure their packages and name their classes helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you were doing something with documents, you may start by looking in the wt.doc package. There you'd find wt.doc.WTDocumentHelper.&lt;/P&gt;&lt;P&gt;If you were doing something with parts, you may start by looking in the wt.part package. There you'd find wt.part.WTPartHelper&lt;/P&gt;&lt;P&gt;If you were doing something with access control, you may start by looking in the wt.access package. There you'd find wt.access.AccessControlHelper&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Beyond that, "helpers" often have "managers" or "services." So you could end up with WTDocumentHelper.service.* etc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 16:42:22 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87762#M10271</guid>
      <dc:creator>MatthewKnight</dc:creator>
      <dc:date>2011-11-16T16:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving a Attribute from an Object Using an Expression in a Workflow</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87763#M10272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've been browsing the Javadoc and it is helping a lot. I'm sort of okay if I know what I am looking for.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These questions I am asking are generally related to my "Wish List" of features I want to add but are not a necessity for this initial implimentation, they will just make administration easier in a number of ways. I do therefore have time to get to grips with this (I have only known what Windchill is for a month and a half and been using it for a month). My only problem is where to get the knowledge from without running a big consultancy bill up.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2011 16:49:52 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87763#M10272</guid>
      <dc:creator>Toby.Pettit</dc:creator>
      <dc:date>2011-11-16T16:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving a Attribute from an Object Using an Expression in a Workflow</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87764#M10273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found this on another post (&lt;A _jive_internal="true" href="https://www.ptcusercommunity.com/message/165328"&gt;http://communities.ptc.com/message/165328&lt;/A&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;wt.fc.QueryResult qr = null;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;wt.doc.WTDocument RCIDFDoc=((wt.doc.WTDocument)primaryBusinessObject);&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;ext.generic.util.IBAUtil objHelper = new&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;ext.generic.util.IBAUtil(RCIDFDoc);&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;ApplicationNum=objHelper.getIBAValue("ApplicationNum");&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;BusinessCategory=objHelper.getIBAValue("BusinessCategory");&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;EstimatedNetSales=objHelper.getIBAValue("EstimatedNetSales");&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;FGNum=objHelper.getIBAValue("FGNum");&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tweaked this to the following:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;result = "NAY";&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;wt.fc.QueryResult qr = null;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;wt.change2.WTChangeOrder2 co =((wt.change2.WTChangeOrder2)primaryBusinessObject);&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;ext.generic.util.IBAUtil objHelper = new ext.generic.util.IBAUtil(co);&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;String selectedOption=objHelper.getIBAValue("UpdateJobs");&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;if (selectedOption.equals("No")) {&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt; result = "YAY";&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It came up with no errors when I first compiled it, I tested it, it failed, now when I compile it it comes up with the following error:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Checking Syntax...&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;/apps/ptc/Windchill_9.1/Windchill/tmp/WfExpression8906920.java:39: package ext.generic.util does not exist&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;ext.generic.util.IBAUtil objHelper = new ext.generic.util.IBAUtil(co);&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt; ^&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;/apps/ptc/Windchill_9.1/Windchill/tmp/WfExpression8906920.java:39: package ext.generic.util does not exist&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;ext.generic.util.IBAUtil objHelper = new ext.generic.util.IBAUtil(co);&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt; ^&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;2 errors&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Syntax check complete.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It give anyone any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2011 12:00:57 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87764#M10273</guid>
      <dc:creator>Toby.Pettit</dc:creator>
      <dc:date>2011-11-17T12:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving a Attribute from an Object Using an Expression in a Workflow</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87765#M10274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ext.generic.util.IBAUtil was something custom they created. It's not OOTB, as far as I know&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2011 16:06:15 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87765#M10274</guid>
      <dc:creator>MatthewKnight</dc:creator>
      <dc:date>2011-11-17T16:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving a Attribute from an Object Using an Expression in a Workflow</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87766#M10275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you are right, I have seen that kind of thing referenced a number of times and it definitely is not a package in our system.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2011 16:08:36 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87766#M10275</guid>
      <dc:creator>Toby.Pettit</dc:creator>
      <dc:date>2011-11-17T16:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving a Attribute from an Object Using an Expression in a Workflow</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87767#M10276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ext is a custom class, however, we get booleans, strings, ints, longs from workflows with just java. &lt;/P&gt;&lt;P&gt;The code below can be tweaked to get different types from the workflows. We rolled these methods into a class in ext package as well. &lt;/P&gt;&lt;P&gt;Setting can also be done with a little more code as well. This code is not supported and in 10 there is a much more efficent way with code to get these variables from the workflow. Since you were asking for a sting I only included String but by chaning the casting around you should be able to get the rest of the types.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;//Declares a attributeContainer of type DefaultAttributeContainer and gets the container with the function getAttributeContainer()&lt;BR /&gt;wt.iba.value.DefaultAttributeContainer attributeContainer=(wt.iba.value.DefaultAttributeContainer)ibaHolder.getAttributeContainer();&lt;/P&gt;&lt;P&gt;//Try Block used to catch a blank String &lt;BR /&gt;try&lt;BR /&gt;{&lt;BR /&gt;//Defines a attributeDefinition of type AttributeDefDefaultView that gets the variable in question (name in type/atribute manager.) &lt;BR /&gt;wt.iba.definition.litedefinition.AttributeDefDefaultView attributeDefinition=defService.getAttributeDefDefaultViewByPath("your var name here");&lt;BR /&gt;System.out.println("Size:"+attributeContainer.getAttributeValues(attributeDefinition).length);&lt;/P&gt;&lt;P&gt;//Declares attValue of type StringValueDefaultView (string, change for diff values) and sets it equal to the getAttributeValues function&lt;BR /&gt;wt.iba.value.litevalue.StringValueDefaultView attValue= (wt.iba.value.litevalue.StringValueDefaultView)attributeContainer.getAttributeValues(attributeDefinition)[0];&lt;/P&gt;&lt;P&gt;//Sets the StringVar = to previously defined attvalue. &lt;BR /&gt;StringVar=attValue.getValue();&lt;BR /&gt;System.out.println("StringVar");&lt;BR /&gt; }&lt;BR /&gt; catch (Exception e){System.out.println("Error getting attribute value,"+e.getMessage());}&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;This gets the value of a string named in the getAttributeDefDefaultViewByPath. This doesnt get multivalue strings, you will have to do more tweaking to get that a well but it is possiable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2011 19:39:18 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87767#M10276</guid>
      <dc:creator>MatthewHoover</dc:creator>
      <dc:date>2011-11-17T19:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving a Attribute from an Object Using an Expression in a Workflow</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87768#M10277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You probably have to "refresh" your attribute container before calling these methods.&lt;/P&gt;&lt;P&gt;Docs/Parts/ChangeRequests/etc implement IBAHolder&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WTDocument doc = findRandomDocument();&lt;/P&gt;&lt;P&gt;doc = (WTDocument)IBAValueHelper.service.refreshAttributeContainer(new IBAHolder[] { doc })[0];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2011 21:33:35 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87768#M10277</guid>
      <dc:creator>MatthewKnight</dc:creator>
      <dc:date>2011-11-17T21:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving a Attribute from an Object Using an Expression in a Workflow</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87769#M10278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Matt is right. I forgot the first 2 lines of the method. OPS!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;//Declares a ibaHolder of type IBAHolder and sets it equal to IBAHolder of the PBO from the function refreshAttributeContainer&lt;BR /&gt;wt.iba.value.IBAHolder ibaHolder=wt.iba.value.service.IBAValueHelper.service.refreshAttributeContainer((wt.iba.value.IBAHolder)primaryBusinessObject, null, null, null); &lt;/P&gt;&lt;P&gt;//Declares a DefService of type StandardIBADefinitionService and sets it to StandardIBADefinitionService function&lt;BR /&gt;wt.iba.definition.service.StandardIBADefinitionService defService=new wt.iba.definition.service.StandardIBADefinitionService();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Nov 2011 21:46:47 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87769#M10278</guid>
      <dc:creator>MatthewHoover</dc:creator>
      <dc:date>2011-11-17T21:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving a Attribute from an Object Using an Expression in a Workflow</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87770#M10279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well I tried the following (which is a combination of both of Matthew Hoover's posts):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Declares a ibaHolder of type IBAHolder and sets it equal to IBAHolder of the PBO from the function refreshAttributeContainer&lt;/P&gt;&lt;P&gt;wt.iba.value.IBAHolder ibaHolder=wt.iba.value.service.IBAValueHelper.service.refreshAttributeContainer((wt.iba.value.IBAHolder)primaryBusinessObject, null, null, null); &lt;/P&gt;&lt;P&gt;//Declares a DefService of type StandardIBADefinitionService and sets it to StandardIBADefinitionService function&lt;/P&gt;&lt;P&gt;wt.iba.definition.service.StandardIBADefinitionService defService=new wt.iba.definition.service.StandardIBADefinitionService();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Declares a attributeContainer of type DefaultAttributeContainer and gets the container with the function getAttributeContainer()&lt;/P&gt;&lt;P&gt;wt.iba.value.DefaultAttributeContainer attributeContainer=(wt.iba.value.DefaultAttributeContainer)ibaHolder.getAttributeContainer();&lt;/P&gt;&lt;P&gt;//Try Block used to catch a blank String &lt;/P&gt;&lt;P&gt;try&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;//Defines a attributeDefinition of type AttributeDefDefaultView that gets the variable in question (name in type/atribute manager.) &lt;/P&gt;&lt;P&gt;wt.iba.definition.litedefinition.AttributeDefDefaultView attributeDefinition=defService.getAttributeDefDefaultViewByPath("&lt;STRONG&gt;UpdateJobs&lt;/STRONG&gt;");&lt;/P&gt;&lt;P&gt;System.out.println("Size:"+attributeContainer.getAttributeValues(attributeDefinition).length);&lt;/P&gt;&lt;P&gt;//Declares attValue of type StringValueDefaultView (string, change for diff values) and sets it equal to the getAttributeValues function&lt;/P&gt;&lt;P&gt;wt.iba.value.litevalue.StringValueDefaultView attValue= (wt.iba.value.litevalue.StringValueDefaultView)attributeContainer.getAttributeValues(attributeDefinition)[0];&lt;/P&gt;&lt;P&gt;//Sets the StringVar = to previously defined attvalue. &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;String &lt;/STRONG&gt;StringVar=attValue.getValue();&lt;/P&gt;&lt;P&gt;System.out.println("StringVar");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if (StringVar.equals("No")) {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; result = "SUCCESS";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;} else {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; result = "FAIL";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt; catch (Exception e){System.out.println("Error getting attribute value,"+e.getMessage());}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The parts in bold that I either added or changed or to suit my needs or because the syntax checker highlighted an error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I syntax check it, it says that there are no errors, however when it comes to runtime it falls over with a nullPointer exception?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The attribute I am currently trying to pull up is called "Update Jobs" (logical identifier "UpdateJobs") and it is on a change notice - I tried using both as the parameters in the &lt;CODE class="jive-code jive-java"&gt;getAttributeDefDefaultViewByPath()&lt;/CODE&gt; method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I right in thinking this can go in a wf and does not need to be in a class?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2011 11:54:33 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87770#M10279</guid>
      <dc:creator>Toby.Pettit</dc:creator>
      <dc:date>2011-11-18T11:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving a Attribute from an Object Using an Expression in a Workflow</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87771#M10280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The server logs are saying the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fri 11/18/11 05:43:42: WfPropagationQueue.PollingThread: ECN name: Attribute Grabber 004&lt;/P&gt;&lt;P&gt;Fri 11/18/11 05:43:42: WfPropagationQueue.PollingThread: Size:0&lt;/P&gt;&lt;P&gt;Fri 11/18/11 05:43:42: WfPropagationQueue.PollingThread:Error getting attribute value,0&lt;/P&gt;&lt;P&gt;Fri 11/18/11 05:43:42: WfPropagationQueue.PollingThread: wt.util.WTException: wt.workflow.definer.InvalidEventException: null event&lt;/P&gt;&lt;P&gt;Fri 11/18/11 05:43:42: WfPropagationQueue.PollingThread: Nested exception is: wt.workflow.definer.InvalidEventException: null event&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(I got an identical log entry for each of the attempts I made)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2011 12:08:30 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87771#M10280</guid>
      <dc:creator>Toby.Pettit</dc:creator>
      <dc:date>2011-11-18T12:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving a Attribute from an Object Using an Expression in a Workflow</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87772#M10281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Put it in a main and see what it does. add e.printStackTrace() so you can see where it fails.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change System.out.println("StringVar") to System.out.println("StringVar: " + StringVar); so you know what's in it. Can it be null? Account for that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2011 13:42:58 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87772#M10281</guid>
      <dc:creator>MatthewKnight</dc:creator>
      <dc:date>2011-11-18T13:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving a Attribute from an Object Using an Expression in a Workflow</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87773#M10282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; You can try the code below as it works fine -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wt.change2.WTChangeOrder2 cm1 = (wt.change2.WTChangeOrder2) primaryBusinessObject;&lt;/P&gt;&lt;P&gt;wt.iba.value.IBAHolder ibaHolder1 = (wt.iba.value.IBAHolder)cm1;&lt;/P&gt;&lt;P&gt;ibaHolder1 =wt.iba.value.service.IBAValueHelper.service.refreshAttributeContainer(ibaHolder1, null, null, null);&lt;/P&gt;&lt;P&gt;wt.iba.value.DefaultAttributeContainer attributeContainer =(wt.iba.value.DefaultAttributeContainer) ibaHolder1.getAttributeContainer();&lt;/P&gt;&lt;P&gt;wt.iba.definition.service.StandardIBADefinitionService defService = new wt.iba.definition.service.StandardIBADefinitionService();&lt;/P&gt;&lt;P&gt;wt.iba.definition.litedefinition.AttributeDefDefaultView attributeDefinition = defService.getAttributeDefDefaultViewByPath("PhoneNumber"); //Here give the attribute name instead of "PhoneNumber".&lt;/P&gt;&lt;P&gt;wt.iba.value.litevalue.AbstractValueView svc = attributeContainer.getAttributeValues(attributeDefinition)[0]; &lt;/P&gt;&lt;P&gt;IBAValue_PhoneNumber = svc.getLocalizedDisplayString();&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 May 2012 09:18:37 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87773#M10282</guid>
      <dc:creator>dsolat</dc:creator>
      <dc:date>2012-05-22T09:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving a Attribute from an Object Using an Expression in a Workflow</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87774#M10283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apologies I thought it did not work, I got an error but I think I may have made a mistake with the attribute logicID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is now working, thankyou!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Toby&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2012 09:12:05 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87774#M10283</guid>
      <dc:creator>Toby.Pettit</dc:creator>
      <dc:date>2012-05-23T09:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving a Attribute from an Object Using an Expression in a Workflow</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87775#M10284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are using 10.0 there are much simpler programmatic methods for getting and setting of IBA values -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;More info can be found in the javadoc - &lt;STRONG&gt;com.ptc.core.lwc.server.LWCNormalizedObject&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are some examples&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example usage:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CREATE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; LWCNormalizedObject obj = new LWCNormalizedObject("com.acme.AcmePart",null,null);&lt;/P&gt;&lt;P&gt; obj.load("name","number");&lt;/P&gt;&lt;P&gt; obj.set("name","my name");&lt;/P&gt;&lt;P&gt; obj.set("number","12345");&lt;/P&gt;&lt;P&gt; obj.persist();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; RETRIEVE&lt;/P&gt;&lt;P&gt; LWCNormalizedObject obj = new LWCNormalizedObject(my_persistable,null,null,null);&lt;/P&gt;&lt;P&gt; obj.load("name","number");&lt;/P&gt;&lt;P&gt; Object nameValue = obj.get("name");&lt;/P&gt;&lt;P&gt; Object numberValue = obj.get("number");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; UPDATE&lt;/P&gt;&lt;P&gt; LWCNormalizedObject obj = new LWCNormalizedObject(my_persistable,null,Locale.US,new UpdateOperationIdentifier());&lt;/P&gt;&lt;P&gt; obj.load("attributeA","attribtueB");&lt;/P&gt;&lt;P&gt; obj.set("attributeA",new Boolean(true));&lt;/P&gt;&lt;P&gt; obj.set("attribtueB","PURPLE");&lt;/P&gt;&lt;P&gt; obj.apply();&lt;/P&gt;&lt;P&gt; ...&lt;/P&gt;&lt;P&gt; PersistenceHelper.manager.modify(my_persistable);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2012 18:25:46 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87775#M10284</guid>
      <dc:creator>JeffZemsky</dc:creator>
      <dc:date>2012-05-23T18:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving a Attribute from an Object Using an Expression in a Workflow</title>
      <link>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87776#M10285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jeffrey, unfortunately we are stuck with 9.1 for the short-mid term. I will most likely move to this cleaner approach when we do move to 10 though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Toby&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 May 2012 09:25:24 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Windchill/Retrieving-a-Attribute-from-an-Object-Using-an-Expression-in-a/m-p/87776#M10285</guid>
      <dc:creator>Toby.Pettit</dc:creator>
      <dc:date>2012-05-24T09:25:24Z</dc:date>
    </item>
  </channel>
</rss>

