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

Workflow Auto Generated Document number

SOLVED
Sapphire I

Workflow Auto Generated Document number

In the OOTB Change Request workflow, we have the number field set to Auto generate.

In the OIR for Change Request, we have the following lines for the number field.

<AttrValue id = "number"

algorithm="com.ptc.windchill.enterprise.revisionControlled.server.impl.NumberGenerator"

ignore="false" force="false" final="false"

<Arg>CR-</Arg>

<Arg>{GEN:wt.enterprise.SequenceGenerator:WTCHANGEREQUESTID_seq:5:0}</Arg>

</AttrValue>

When we create new Change Requests, we get a random higher than-the-last number for the change request and what we are looking for is a controlled sequential numbering scheme.

Last week, I created 3 CRs, CR-00021, CR-00023 and CR-00041. This week, the next one created was CR-00061.

What do I need to change in the OIR to get the system to give me a steady sequential numbering scheme? If Windchill cannot do it automatically, we may have to fall back to a manually entered numbering scheme from an external database which we are trying to replace with Windchill Change Management. We do not want to maintain 2 systems for tracking changes.

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions

Re: Workflow Auto Generated Document number

Try this on the DB (log into SQLPlus):

ALTER SEQUENCE WTCHANGEREQUESTID_seq NOCACHE;

Are you able to confirm on a test system first?

4 REPLIES 4

Re: Workflow Auto Generated Document number

Try this on the DB (log into SQLPlus):

ALTER SEQUENCE WTCHANGEREQUESTID_seq NOCACHE;

Are you able to confirm on a test system first?

Re: Workflow Auto Generated Document number

I will try that on my test system.

I would guess that other numbers could also be changed to be sequential by doing the same nocache alteration.

Re: Workflow Auto Generated Document number

How do I alter the initial starting number to 3000?

It is currently at 63 and when I tried to edit it in the Oracle Console, it said start number cannot exceed current number. Current number could not be editted in the console.

Highlighted

Re: Workflow Auto Generated Document number

This is assuming Oracle database. The difference between the desired next number and the current next number is (3000-64 = 2936).

ALTER SEQUENCE WTCHANGEREQUESTID_seq INCREMENT BY 2936;

SELECT WTCHANGEREQUESTID_seq.nextval FROM dual;

ALTER SEQUENCE WTCHANGEREQUESTID_seq INCREMENT BY 1;

Again, test it. I might be off by 1 number?

I am quite perplexed as to why these sequences aren't set up OOTB as NOCACHE. I continuously hear of admins complaining about number sequences jumping by 20 (the default cache value) sometimes.

Some references:

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS113612

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS124192

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS133468

Creating a number Sequence in Windchill - Gotcha

FYI...I have never created the sequence with the exec.wtpk.createSequence() command. Instead, I've always used the CREATE SEQUENCE ... command with correct parameters (including NOCACHE at the end of the statement). I don't know of the difference between the 2 methods.

Announcements

Thingworx Navigate content has a new home! Click here to access the new Thingworx Navigate forum! ______________________________ Check out the Windchill Tips Board! We're talking about Whirlpool's use of digital twin, augmented reality, and data-driven design!

The NAVIGATE WORKING GROUP is here! Come innovate with PTC!

Sign up for a Working Group