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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

wtSafeArea - siteMod best practices?

GMonty
4-Participant

wtSafeArea - siteMod best practices?

My reading of the Windchill Customization Guide guide tells me that the siteMod folder under wtSafeArea is intended for modifications to all OOTB file. Can anyone share with me a good reason why we would store all (OOTB modified files + custom new files) in this location? To me it's a mess. This folder is there for the upgrade process to read and generate the required file updates for OOTB files, 

 

Before I launch a campaign with my team to clean this up, please let me know if there is actually a good reason, benefit to keeping your files this way. My stance otherwise is we move all non-OOTB files out of there and shift the focus to improving our GIT repo management habits.

 

From the Windchill Customization Guide page 102: support.ptc.com/WCMS/files/171950/en/11_0_M20_WindchillCustomizationGuide.pdf

 

  • The following summary describes the purpose of each subdirectory:
    • siteMod – contains the site version of each PTC file that you have modified and
      want to run in production.

We are in the process of maturing our GIT code management practices and currently my organization is storing ALL source files under wtSafeArea/siteMod. Reasons why I don't like this:

  • DRY (don't repeat yourself)
    • Every *.java file is duplicated to the wt_home\src and the wt_home\wtSafeArea\siteMod\src
      • The duplicate files are invariably out of sync
  • This just feels like someone over-adopted, over-corrected the wtSafeArea, probably at a point in time prior to GIT process being fully understood, external repos with deployment scripting in place etc. Holdover from pre-GIT / externally managed repo days.
    • ie. treating siteMod as a file repository

Thoughts?

3 REPLIES 3
rhart
14-Alexandrite
(To:GMonty)

If we ran a CPS bundle complete install and the wtsafearea\siteMod folder was empty - then all our customisations would be overwritten by the PSI.

Maybe it depends on how the CPS updates are going to be done, either running the complete install or safearea install.

 

 

GMonty
4-Participant
(To:rhart)

Thanks for responding.

 

I'm not suggesting the siteMod folder be empty, just that it contain only those files which originally shipped with the OOTB installation of Windchill that have been modified for various reasons. To store dozens of non PTC shipped files under here seems, to me, like gross misapplication of wtSafeArea methodology.

 

But maybe you're getting me toward the answer, possible that there is some nuance in the CPS complete versus safeArea install that I'm missing.

 

Are you saying that in a "complete install" of a CPS, that a wt_home\codebase\com\myCompany\myCustomCode.class would be removed? If so that would be my answer. I just was not aware of that, if true. Either way, good tip that I should read up on the nuances between the two installation modes.

 

Thanks!

rhart
14-Alexandrite
(To:GMonty)

Complete install will only overwrite a file with one with the same name and directory in siteMod, so if there's no myCustomCode.class in siteMod I would not expect it to be removed or overwritten.

 

I'm not sure how it would handled with a safearea install, I think it writes the changed files to a folder in the safearea where you can check them before committing the changes.

Top Tags