Skip to main content
1-Visitor
February 12, 2014
Question

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

  • February 12, 2014
  • 1 reply
  • 2030 views

Need some MC insight here,

I have added the required options into ModelCHECK config_init.mc file.

I have added the IBAs using the Type and Attribute manager in Windchill at the Organizational level.

Created a test part, run model check, errors are 0, try to check in and get the following (see attached image)

There is something really minor going on. The one thing I do not see is the MC_VERIFIED parameter being added into the part.

Any help would be awesome!

Thanks in advance,

Buddy

1 reply

22-Sapphire I
February 12, 2014

Just a comment...

PTC provides a mechanism to prevent checkin if ModelCheck errors are > some value.

We are of the opinion that this is not the best way to handle. You want the data checked in - possibly to allow another user to fix the problems that caused the errors.

Instead, you need to prevent the data from maturing such that it can be used by the business (e.g. prevent getting to Released state). We added code in our Promotion workflow that branches if any affected object has ModelCheck errors (ignores warnings). This works very well.

1-Visitor
February 12, 2014

Hey Mike,

Thanks for the quick reply. That does sound like a better way to do it...care to share a screen shot of your workflow...or if not could you explain in a little more detail about how this works?

Thanks,

Buddy

22-Sapphire I
February 12, 2014

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";

}