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

Pushing a workflow attribute to a soft type document


Pushing a workflow attribute to a soft type document

I have pushed attributes from a Change Activity to a Change Notice upon completion of the activity.  Now what I would like to do is push an attribute from a document approval workflow to a soft type of document.  I have defined a workflow variable called string1 as type java.lang.String and also a variable parentDocument of type wt.doc.WTDocument.  I tried to use the logic that I had but I am getting an error.  It would be great if this possible.


Here is my transition code:


com.ptc.core.lwc.server.LWCNormalizedObject obj=new com.ptc.core.lwc.server.LWCNormalizedObject(parentDocument,null,null, new com.ptc.core.meta.common.UpdateOperationIdentifier());



The error I get when I check the syntax is:


warning: Supported source version 'RELEASE_7' from annotation processor '' less than -source '1.8' error: cannot find symbol
symbol: class hoshinet
location: package com
Note: uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
1 warning

Syntax check complete.


Your issue is you quoted string1 instead of using it as a variable name. Try this:


@RandyJones I got the same error when I took out the quotes.  On my task to notice string variables I have quotes on them.  That is why I had used them.

@RandyJones I figured it out as far as the syntax.  I needed to change string one with internal_name_string_on_softtype.  Once I did this, I did not get a syntax error.  I still need to finish building my workflow so that I can test it out.  I went back and looked at my other code and that is when I realized what I had done.

I am glad you figured it out. As a side note the LWCNormalizedObject class has been deprecated and replaced by the PersistableAdapter class: