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

Re: ModelCHECK Gatekeeper - almost there...check in still being blocked...

$
0
0

Conditional in workflow (adjust for your lifecycle states):

 

wt.maturity.PromotionNotice pn = (wt.maturity.PromotionNotice)primaryBusinessObject;
totalError=0;
wt.fc.QueryResult queryresult1 = wt.maturity.MaturityHelper.service.getPromotionTargets(pn);
wt.lifecycle.State st=pn.getMaturityState();
System.out.println("The Maturity State is  ------------------------------     > " +st);
if((st.toString()).equals("READYRELEASE")){
System.out.println("Coming ye ye ye   ------------------------------     > " +st);

isReadyRelease=true;}
wt.fc.WTObject obj=null;
try{
while(queryresult1.hasMoreElements()){
obj=(wt.fc.WTObject)queryresult1.nextElement();
if(obj instanceof wt.epm.EPMDocument){
String mc=ext.alcon.workflow.WorkflowHelper.getIBAValue((wt.iba.value.IBAHolder)obj,"MC_ERRORS");

if(!mc.contains("0")) {totalError++; }}
if(totalError>0)result="Use_Branch";
else{result="Continue";}
}
}
catch( Exception wte )
{
   wte.printStackTrace();
   result = "Continue"; 

}


Viewing all articles
Browse latest Browse all 8876

Trending Articles



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