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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

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

BuddyHudson
1-Newbie

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

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

5 REPLIES 5

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.

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

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

}

Mike,

Can you show me what and where to change in this code? I am not a programmer and I also see "alcon" in the context. I know what the "Conditional" is but not sure exactly where to put it in the workflow...would appreciate you spelling it out if not too much trouble or time.

Thanks,

Buddy Hudson

Yes, sorry - cryptic what I provided so far. This is from a conditional in a workflow template - this one used for promotion without approval.

Let's have a session on this.

Top Tags