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

We are happy to announce the new Windchill Customization board! Learn more.

Help with attribute defaults (OIRs) and Security Tables

avillanueva
22-Sapphire I

Help with attribute defaults (OIRs) and Security Tables

Docs seem pretty clear even with examples but I cannot seem to get the UI to preselect the default when creating a Part. I have the following defined in OIR:

<attrvalue id="EXPORT_CONTROL" algorithm="wt.rule.algorithm.StringConstant">
<arg>DO NOT EXPORT</arg>
</attrvalue>
<attrconstraint id="EXPORT_CONTROL" algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">
<value algorithm="com.ptc.core.rule.server.impl.GetServerPreGeneratedValue"/">
</attrconstraint>
I tried using a Boolean constraint that would key off the part number format (regex) but I can't even get this to work. And its straight from docs! For the <arg> block, there are two entries in the line for the value of the security label to default to. Docs show the example of "LNS" which is the internal value they gave to a certain label. They show it appearing twice. Should they be the same?

Is there an error in docs or in 9.1? Is there logging that I can turn on to see if its working? I should expect that when I click on security table when creating at new part, that my default choice appears, right?
Antonio Villanueva - Sr. Software Engineer - ISR Systems
UTC AEROSPACE SYSTEMS
100 Wooster Heights Road, Danbury, CT 06804
Tel: +1 203 797 5682
antonio.villanueva@utas.utc.com<">mailto:antonio.villanueva@utas.utc.com> www.utcaerospacesystems.com
CONFIDENTIALITY WARNING: This message may contain proprietary and/or privileged information of UTC Aerospace Systems and its affiliated companies. If you are not the intended recipient please 1) do not disclose, copy, distribute or use this message or its contents, 2) advise the sender by return e-mail, and 3) delete all copies (including all attachments) from your computer. Your cooperation is greatly appreciated.

3 REPLIES 3

What my ultimate goal is this:

<attrvalue id="EXPORT_CONTROL" algorithm="wt.rule.algorithm.StringConstant">
<value algorithm="wt.rule.algorithm.BooleanBranch">
<value algorithm="wt.rule.algorithm.StringRegExEqualsTest">
<attr id="number"/">
<arg>[A-Z]\\d{2}-\\d{5}-\\d{3}</arg>
</value>
<arg>LICENSE REQUIRED-STATE(ITAR)</arg>
<arg>NULL</arg>
</value>
</attrvalue>
<attrconstraint id="EXPORT_CONTROL" algorithm="com.ptc.core.rule.server.impl.GatherAttributeConstraints">
<value algorithm="com.ptc.core.rule.server.impl.GetServerPreGeneratedValue"/">
</attrconstraint>
This should look at my number format and default to ITAR if it matches other default to NULL or Unknown as it is defined in my setup.

No dice. Didn’t make a difference. That was not documented to I would be surprised if it worked. Has anyone in the field used an OIR rule to default Security Labels to a certain value?

Log 4j on wt.rule.algorithm.StringRegExEqualsTest enabled such that you it’s being executed? Have you used the regex specified outside of OIR in a class with pattern compile to determine its validity?



I have set security labels to default before, but not based on a regex.








Top Tags