Article - CS140636

How to implement OIR and RuleAlgorithm to generate document number according to constants, IBAs and custom sequences in Windchill PDMLink

Modified: 18-Dec-2023   


Applies To

  • Windchill PDMLink 9.1 to 12.1

Description

  • How to implement OIR and RuleAlgorithm to generate document number according to constants, IBAs and custom sequences
  • A unique custom sequence should be used per document subtype
  • What is the OIR syntax?
  • How is the wt.rule.algorithm.RuleAlgorithm interface implemented to use the OIR?
  • How to customize self sequence generator class?
  • Exception while implementing custom RuleAlgorithm using OIR
DocumentNumber {GEN:wt.enterprise.SequenceGenerator:XXXX:#:#}
com.ptc.core.command.common.InvalidConstraintForAttributeException: com.ptc.core.meta.container.common.ConstraintException: The value for attribute Number must be between 0 and 32 characters in length, inclusive. Constraint Violation in isValid()
Nested exception is: com.ptc.core.meta.container.common.ConstraintException: The value for attribute Number must be between 0 and 32 characters in length, inclusive. Constraint Violation in isValid()
wt.util.WTException: com.ptc.core.command.common.InvalidConstraintForAttributeException: com.ptc.core.meta.container.common.ConstraintException: The value for attribute Number must be between 0 and 32 characters in length, inclusive. Constraint Violation in isValid()
Nested exception is: com.ptc.core.meta.container.common.ConstraintException: The value for attribute Number must be between 0 and 32 characters in length, inclusive. Constraint Violation in isValid()
Nested exception is: com.ptc.core.command.common.InvalidConstraintForAttributeException: com.ptc.core.meta.container.common.ConstraintException: The value for attribute Number must be between 0 and 32 characters in length, inclusive. Constraint Violation in isValid()
Nested exception is: com.ptc.core.meta.container.common.ConstraintException: The value for attribute Number must be between 0 and 32 characters in length, inclusive. Constraint Violation in isValid()
    at com.ptc.core.meta.container.common.impl.DefaultConstraintValidator.isValid(DefaultConstraintValidator.java:277)
    at com.ptc.core.meta.container.common.impl.DefaultConstraintValidator.isValid(DefaultConstraintValidator.java:331)
    at com.ptc.core.rule.server.delegate.init.TypeHelper.enforceConstraintsOnOirAtts(TypeHelper.java:307)
    at com.ptc.core.rule.server.delegate.init.TypeHelper.getObject(TypeHelper.java:433)
    at com.ptc.core.rule.server.delegate.init.TypeBasedInitRuleApplier.applyRule(TypeBasedInitRuleApplier.java:358)
    at com.ptc.core.rule.server.delegate.init.TypeBasedInitRuleApplier.applyRule(TypeBasedInitRuleApplier.java:211)
    at wt.rule.impl.StandardRuleService.applyRule(StandardRuleService.java:382)
    at wt.rule.impl.StandardRuleService$1.notifyVetoableMultiObjectEvent(StandardRuleService.java:985)
    at wt.events.StandardKeyedEventBranch.intDispatchEvent(StandardKeyedEventBranch.java:306)
    at wt.events.StandardKeyedEventBranch.dispatchVetoableEvent(StandardKeyedEventBranch.java:255)
    at wt.events.StandardKeyedEventDispatcher.intDispatchEvent(StandardKeyedEventDispatcher.java:304)
    at wt.events.StandardKeyedEventDispatcher.dispatchVetoableEvent(StandardKeyedEventDispatcher.java:228)
    at wt.services.StandardManagerService.intDispatchVetoableEvent(StandardManagerService.java:410)
    at wt.services.StandardManagerService.dispatchVetoableEvent(StandardManagerService.java:303)
    at wt.fc.StandardPersistenceManager.dispatchVetoableEvent(StandardPersistenceManager.java:2972)
    at wt.fc.StandardPersistenceManager.dispatchVetoableEvent(StandardPersistenceManager.java:2952)
    at wt.fc.StandardPersistenceManager.store(StandardPersistenceManager.java:1429)
    at wt.fc.StandardPersistenceManager.store(StandardPersistenceManager.java:534)
    at sun.reflect.GeneratedMethodAccessor713.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at wt.services.ServiceFactory$ServerInvocationHandler.invoke(ServiceFactory.java:399)

 
This is a printer-friendly version of Article 140636 and may be out of date. For the latest version click CS140636