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

Re: Developing code in Workflow Template Administrator

$
0
0

I Already found that, but i'm having problems understanding the logic of programming here..

 

Yogesh, i'm  using this way:

 

wt.fc.QueryResult theQueryResult;
wt.maturity.PromotionNotice pn = (wt.maturity.PromotionNotice)primaryBusinessObject;
wt.content._ContentHolder cHolder;try{    theQueryResult = wt.maturity.MaturityHelper.service.getPromotionTargets(pn);    wt.vc.Versioned theVersioned = null ;    wt.epm.EPMDocument myDoc;    if (theQueryResult != null){        while(theQueryResult.hasMoreElements()){            theVersioned = (wt.vc.Versioned)theQueryResult.nextElement();            if (theVersioned instanceof wt.epm.EPMDocument) {                System.out.println("IS A EPM DOCUMENT");                myDoc = (wt.epm.EPMDocument)theVersioned;                if(myDoc.getDocType().toString().equals("CADDRAWING")){                    System.out.println("===== DRAWING ===== ");                    System.out.println("NOW GET THE PDF DOCUMENT");                    cHolder =(wt.content.ContentHolder)primaryBusinessObject;                    System.out.println( "downloadPrimary: name   = " + myDoc.getName() );                    System.out.println( "downloadPrimary: number = " + myDoc.getNumber() );                     System.out.println("theContent to appData");                    wt.content.ApplicationData appData = wt.content.ApplicationData.newApplicationData((wt.content.ContentHolder)cHolder);                     System.out.println( "primary file name = " + appData.getFileName());                                    }            }else{                System.out.println("THIS IS NOT A  EPM");            }        }    }    result="Approved";}catch (wt.maturity.MaturityException me){         errorMsg=me.getMessage();         result="Rejected";   }

 

 

And, what I get is : "primary file name = null"

 

what is wrong ?


Viewing all articles
Browse latest Browse all 8876

Trending Articles



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