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.

Custom ECR/ECN numbering scheme

ltourville
3-Visitor

Custom ECR/ECN numbering scheme

I need to create a custom numbering scheme for our ECR/ECN process in PDMLink11.1. The numbers would be YY-XXXX, where YY is the last two digits of the year and XXXX is a sequential number starting at 0001, like "18-0152". I also need the number XXXX to reset to 0001 at the end of the year. So, regardless of the last number used in 2018, when we change to 2019, the number would become "19-0001".

 

Has anybody ever done something similar?

Or does anyone know how to skip numbers in a autogenerated numbering scheme?

 

Thanks

7 REPLIES 7

My first thought is to create for each year a separate number generator (Or reset it to 0).

At the first day of the year, change the prefix and the number generator in the OIR.

If you would like to set the ECR and the ECN to the same number, this won't work without having a customizing.

PK_9725986
5-Regular Member
(To:ltourville)

Dear Itourville,

 

I don´t know if your question is still open or if you have found a solution allready. 

 

But some short advises:

 

you have to create and install your needed numbering scheme in den DB (oracle or SQL) the code should also include your rules, like the rest at the beginning of the year etc.

 

Afterwards you have to change the OIR of the ECN that it will take this new numbering scheme.

 

Best Regards

 

Philipp

Why not just create a custom Java class that calculates the number based on the logic you supplied and then point the OIR's number algorithm to the custom Java class rather than the OOTB number generator.

 

Your logic is very clear.  This is very easy to do.

The solution is simple and bombproof.

Hello d_graham,
I am working with ltourville to set this up, do you have any examples of how to get this started. Since we are not developers the java portion is unclear.
We have a local PTC partner to help but a bit more detail would be much appreciated so we can reduce any development time from "them".
Thank you,

IB

d_graham
17-Peridot
(To:Iblackie)

@Iblackie 

Id like to help you it I can’t tell you how to do something and then have you pass it onto your PTC partner for them to implement.

 

If you want to work with me rather than them on this I’’m up for it.

avillanueva
22-Sapphire I
(To:Iblackie)

We took a slightly different approach to this problem. Shortly after creation of the CN, which just uses OOTB numbering, we enter a block which attempts to "renumber" the CN and related CR using our format. My expression robot simply takes in the CN and determine what the new number should be and renumbers it. The result it sent back to the workflow in case there is any glitches that need to be addressed.

avillanueva_0-1699630737070.png

customization.workflow.RenumberResult r=customization.workflow.<YourClassFileHere>.renumberCN((wt.change2.WTChangeOrder2)primaryBusinessObject);
renumResult=r.getResult();

message=r.getMessage();

  

That works too.

Lots of ways to get there from here.
OIR, an expression robot that does whatever, a listener.

I used OIRs once to make sure the CN numbers where sequential and, per customer’s spec, that the CA had the same number as the CN. Worked great.
And yes, before anyone comments on this, their spec was only one CA per CN.

That said, I usually just advise on options and make it clear the route I would take if I were the decision maker (which I’m not). The customer has the final say and that’s what we do.<BR><BR>
Top Tags