Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Version: Windchill 13.0
Use Case: I have the following requirements relating to how a custom workflow I have implemented treats objects as they are moved from state 1 to state 2. 1. The part number should be given a prefix which communicates the date and time its state was changed. 2. A check is made to ensure the part has not historically been at a state of "Released" before allowing the transition to complete.
Description:
Has anybody got a suggestion on how I can implement these aspects into my workflow?
Solved! Go to Solution.
To your point, yes, you could trace back through Windchill and see what happened, but you'd be putting yourself in a more complicated situation than necessary.
Here's a simple scenario to consider:
What would you do here? Assign a new number to the original design? Change the number on the new design, so you can use the original number for the original design? What if the new design has already gone to production? You could try to write rules and policies for all these scenarios.. or just make one rule that numbers can't be reused, period. To me this is the cleaner solution.
I can relate to users wanting to delete files. I try to not allow it as much as possible. Obsoleting the file is better. The only case where I feel it's justified to delete a file is when the file existing creates confusion. If it's just old data that will no longer be used, just obsolete it. You can even move it to an obsolete folder so it doesn't clutter up the folder structure.
you can use an expression robot to change the object identity within the WF
https://www.ptc.com/en/support/article/CS145098
Just know that the part number is part of the master record, meaning that updating the number updates every version of that part going all the way back.
In general, it's not good practice to change a part number. I'm curious for the reasoning for the business requirement
Hi Joe. I was to rename the object to give it a prefix when it moves to a state that will hide the part from the users but will still be available in the system in the event that recovery is required. The reason for the change in part number means that the original part number will be un-consumed and could be assigned to a new part.
That's a huge data concern.. You shouldn't be reusing numbers! That's a recipe for confusion and a mess if you were to get audited.
Hi Joe. My requirement to re-number objects no longer exists but I was wondering if you could educate me - what are the concerns exactly? I was only looking to re-number these objects after users decide that they need to be removed from the system. As far as the user is concerned, they would be changing the state of the object to emulate the object being deleted. However, the state change would not delete the object. It was just make it invisible to them and change its number to include a prefix of a timestamp of when its state was changed. This would be useful in the event that a user needed to recover any of these objects as this would not be possible if the user was to have done a permanent delete on it. Referring to my original post, I would only allow users to transition to this state that makes the object invisible to them if it had not been released into the production domain before. Consequently, there would be no risk of two different objects of the same type being released against the same number. Are you able to provide any adverse scenarios that this approach could lead to, given that the GUI of Windchill produces a comprehensive audit trail against objects and we could develop more comprehensive reports using SQL queries?
To your point, yes, you could trace back through Windchill and see what happened, but you'd be putting yourself in a more complicated situation than necessary.
Here's a simple scenario to consider:
What would you do here? Assign a new number to the original design? Change the number on the new design, so you can use the original number for the original design? What if the new design has already gone to production? You could try to write rules and policies for all these scenarios.. or just make one rule that numbers can't be reused, period. To me this is the cleaner solution.
I can relate to users wanting to delete files. I try to not allow it as much as possible. Obsoleting the file is better. The only case where I feel it's justified to delete a file is when the file existing creates confusion. If it's just old data that will no longer be used, just obsolete it. You can even move it to an obsolete folder so it doesn't clutter up the folder structure.
Thanks for this insight Joe. Having just read your post, I agree with your points and I think this is the way I will proceed.
