Quantcast
Channel: PTC Community: Message List - Windchill
Viewing all articles
Browse latest Browse all 8876

Re: FolderHelper.assignFolderByReference

$
0
0

Hi Mani,

 

I appreciate your efforts on this. I am struggling to create a workflow which checks if the document created is a part? If yes, then move to Product 'XYZ' and a folder called WTPart into it.

 

When I tried to put the code you suggested, and it wont work. Gives error. The following which I tried:

 

java.lang.String pboType=primaryBusinessObject.getClass().getName();

if (pboType.equals("wt.part.WTPart"))

{

WTPart doc=pboType.getNumber();

WTContainer cont=doc.getContainer("XYZ");//you give different container also

}

 

Error

--------------------------------------------

Checking Syntax...

D:\ptc\Windchill10\Windchill\temp\WfExpression3373668605.java:26: cannot find symbol

symbol  : method getNumber()

location: class java.lang.String

wt.part.WTPart doc=pboType.getNumber();

                          ^

D:\ptc\Windchill10\Windchill\temp\WfExpression3373668605.java:27: cannot find symbol

symbol  : class WTContainer

location: class wt.workflow.expr.WfExpression3373668605

WTContainer cont=doc.getContainer("XYZ");//you give different container also

^

D:\ptc\Windchill10\Windchill\temp\WfExpression3373668605.java:27: getContainer() in wt.part._WTPart cannot be applied to (java.lang.String)

WTContainer cont=doc.getContainer("XYZ");//you give different container also

                    ^

3 errors

Syntax check complete.

-----------------------------------------------------------

 


Any help??

 

Thanks,

 

Wasim


Viewing all articles
Browse latest Browse all 8876

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>