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

Retrieving a Attribute from an Object Using an Expression in a Workflow

SOLVED

Re: Retrieving a Attribute from an Object Using an Expression in a Workflow

Hi Jeffrey ,

I want to update (revise) an existing document. I have the code for revision.

After revising the document and before using the persistencehelper.save i use the above mentioned code to update iba values on the new version. But that results in two values on the iba.

for e.g

Doc A.1 - Attribute1=123

Doc B.1 - Attribute1=123,345

I also see the values from previous revision. Can you help me in clearing out the Iba values before i store new values.

Because the above scenatio gives a me exception on single value constraint attributes.

Also the Persistencehelper modify does not work as it asks to first checkout the object.So i use the code above first and then the SAVE method before storing the object for the first time in DB.

Re: Retrieving a Attribute from an Object Using an Expression in a Workflow

I am not sure these methods are supported in that use case - why don't you update the values after the revise?

Re: Retrieving a Attribute from an Object Using an Expression in a Workflow

Hi Jeffrey

Once the object is persisted then the PersistenceHelper.manager.modify(my_persistable); api gives a error.

Object is not ready for modification please check out the object. And i dont want to iterate the object.

I have raised a case with PTC for this.

Re: Retrieving a Attribute from an Object Using an Expression in a Workflow

getting this error when checking syntax

Checking Syntax...

C:\ptc\Windchill_10.2\Windchill\temp\WfExpression831571.java:39: error: cannot find symbol

IBAValue_VM_Name= VM_Name

^

symbol: variable IBAValue_VM_Name

location: class WfExpression831571

Note: C:\ptc\Windchill_10.2\Windchill\temp\WfExpression831571.java uses unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

1 error

Syntax check complete.

Re: Retrieving a Attribute from an Object Using an Expression in a Workflow

Hi Zane,

Without seeing your full code I cannot comment too much on your error.

It seems though that you are trying to use a variable "IBAValue_VM_Name" which you have not declared anywhere in your code and this is the source of your error.

Regards,

Toby