一個詭異的ModelCHECK集成配置問題

前幾日接到一個ModelCHECK集成配置的問題,按說ModelCHECK的集成配置雖有些繁瑣,但都是比較固定的東西,不會出什麼問題,但當時卻遇到一個煩人的報錯,,每次檢入模型時總是提示模型修改後未執行ModelCHECK,無論如何配置,包括完全重新設置客戶端,都沒有效果,MethodServer的日誌信息如下:
2013-05-16 14:13:03,264 INFO  [ajp-bio-8011-exec-6] com.ptc.windchill.uwgm.proesrv.request.CheckinRequest administrator - CheckinRequest.doCheckin :: ModelCheck is Enabled, Performing Validations ...
2013-05-16 14:13:03,269 DEBUG [ajp-bio-8011-exec-6] com.ptc.windchill.uwgm.common.delegate.CheckinGateKeepingDelegateFactory administrator - CheckinGateKeepingDelegateFactory.getInstanceOfDelegate :: <> About to retrieve authAppDescritor by auth app : PROE
2013-05-16 14:13:03,270 DEBUG [ajp-bio-8011-exec-6] com.ptc.windchill.uwgm.common.delegate.CheckinGateKeepingDelegateFactory administrator - CheckinGateKeepingDelegateFactory.getInstanceOfDelegate :: <> Retrieved authAppDescritor by auth app : PROE
2013-05-16 14:13:03,271 DEBUG [ajp-bio-8011-exec-6] com.ptc.windchill.uwgm.proesrv.util.ModelCheckHelper administrator - ModelCheckHelper.getPermissibleTimeRange :: tsSetting as read from Preferences : 24
2013-05-16 14:13:03,271 DEBUG [ajp-bio-8011-exec-6] com.ptc.windchill.uwgm.proesrv.util.ModelCheckHelper administrator - ModelCheckHelper.getPermissibleTimeRange :: Permissible MC Time Range is 24 hrs.
2013-05-16 14:13:03,272 DEBUG [ajp-bio-8011-exec-6] com.ptc.windchill.uwgm.proesrv.util.ModelCheckHelper administrator - ModelCheckHelper.getPermissibleErrorCondition :: errSetting as read from Preferences : 7
2013-05-16 14:13:03,272 DEBUG [ajp-bio-8011-exec-6] com.ptc.windchill.uwgm.proesrv.util.ModelCheckHelper administrator - ModelCheckHelper.getPermissibleErrorCondition :: Permissible MC NumErrors: 7
2013-05-16 14:13:03,273 DEBUG [ajp-bio-8011-exec-6] com.ptc.windchill.uwgm.proesrv.util.ModelCheckHelper administrator - ModelCheckHelper.getPermissibleConfigs :: configSetting as read from Preferences : 
Default:check/default_checks.mch,start/nostart.mcs,constant/mm.mcn Basic:check/default_checks.mch,start/nostart.mcs,constant/mm.mcn Release:check/default_checks.mch,start/nostart.mcs,constant/mm.mcn Approval:check/default_checks.mch,start/nostart.mcs,constant/mm.mcn Review:check/default_checks.mch,start/nostart.mcs,constant/mm.mcn
2013-05-16 14:13:03,273 DEBUG [ajp-bio-8011-exec-6] com.ptc.windchill.uwgm.proesrv.util.ModelCheckHelper administrator - ModelCheckHelper.getPermissibleConfigs :: 
 ModelCHECK config :LifeCycleKey->Default
ConfigValue->check/default_checks.mch,start/nostart.mcs,constant/mm.mcn
2013-05-16 14:13:03,274 DEBUG [ajp-bio-8011-exec-6] com.ptc.windchill.uwgm.proesrv.util.ModelCheckHelper administrator - ModelCheckHelper.getPermissibleConfigs :: 
 ModelCHECK config :LifeCycleKey->Basic
ConfigValue->check/default_checks.mch,start/nostart.mcs,constant/mm.mcn
2013-05-16 14:13:03,274 DEBUG [ajp-bio-8011-exec-6] com.ptc.windchill.uwgm.proesrv.util.ModelCheckHelper administrator - ModelCheckHelper.getPermissibleConfigs :: 
 ModelCHECK config :LifeCycleKey->Release
ConfigValue->check/default_checks.mch,start/nostart.mcs,constant/mm.mcn
2013-05-16 14:13:03,275 DEBUG [ajp-bio-8011-exec-6] com.ptc.windchill.uwgm.proesrv.util.ModelCheckHelper administrator - ModelCheckHelper.getPermissibleConfigs :: 
 ModelCHECK config :LifeCycleKey->Approval
ConfigValue->check/default_checks.mch,start/nostart.mcs,constant/mm.mcn
2013-05-16 14:13:03,275 DEBUG [ajp-bio-8011-exec-6] com.ptc.windchill.uwgm.proesrv.util.ModelCheckHelper administrator - ModelCheckHelper.getPermissibleConfigs :: 
 ModelCHECK config :LifeCycleKey->Review
ConfigValue->check/default_checks.mch,start/nostart.mcs,constant/mm.mcn
2013-05-16 14:13:03,276 DEBUG [ajp-bio-8011-exec-6] com.ptc.windchill.uwgm.proesrv.util.ModelCheckHelper administrator - ModelCheckHelper.getPermissibleConfigs :: Permissible MC Config :{Release=check/default_checks.mch,start/nostart.mcs,constant/mm.mcn, Default=check/default_checks.mch,start/nostart.mcs,constant/mm.mcn, Basic=check/default_checks.mch,start/nostart.mcs,constant/mm.mcn, Approval=check/default_checks.mch,start/nostart.mcs,constant/mm.mcn, Review=check/default_checks.mch,start/nostart.mcs,constant/mm.mcn}
2013-05-16 14:13:03,276 DEBUG [ajp-bio-8011-exec-6] com.ptc.windchill.uwgm.proesrv.util.ModelCheckHelper administrator - ModelCheckHelper.getPermissibleMode :: MCMode read from preferences : Save
2013-05-16 14:13:03,277 DEBUG [ajp-bio-8011-exec-6] com.ptc.windchill.uwgm.proesrv.action.ModelCheckValidator administrator - ModelCheckValidator.scanModelCheck :: MODEL_NAME xxxxx.prt
MC_ERRORS = 0
MODEL_CHECK Thu May 16 2013 14:11:30 GMT+0800
MODEL_CONFIG check/default_checks.mch, start/nostart.mcs, constant/mm.mcn
MC_MODE Save
MC_VERIFIED 真
2013-05-16 14:13:03,278 DEBUG [ajp-bio-8011-exec-6] com.ptc.windchill.uwgm.proesrv.action.ModelCheckValidator administrator - ModelCheckValidator.scanModelCheck :: MODEL_LIFECYCLE Basic
2013-05-16 14:13:03,278 DEBUG [ajp-bio-8011-exec-6] com.ptc.windchill.uwgm.proesrv.action.ModelCheckValidator administrator - ModelCheckValidator.scanModelCheck :: ModelCheck Failed for: xxxxx.prt Model Check is not verified!

從日誌中可以看到,ModelCHECK的各項檢查條件都沒有問題,但系統卻仍然拋出“xxxxx.prt Model Check is not verified!“的錯誤,但MC_VERIFIED明明就是”真“啊!

需要注意的是,在英文版Windchill中,"MC_VERIFIED 真"會顯示爲"MC_VERIFIED yes",在中文瀏覽器中查看時,MC_VERIFIED的值爲”是“,可以發現對於同一屬性值,Windchill本身卻給出了不同的中文翻譯,因此我懷疑這個問題就是由於軟件本地化做得不到位所造成的,即明明”MC_VERIFIED=真“的含義就是”MC_VERIFIED=yes“,但系統就是不能理解這一點。當然,至於背後的細節,就不得而知了。

事實上,基於多種原因,我都強烈建議大家在安裝Windchill時,安裝語言不要選擇中文,否則後續會有很多麻煩,而且安裝語言是沒辦法修改的,至於瀏覽器等界面上的語言,只要安裝了相應的語言包都可以正常使用,與安裝語言無關。如果安裝語言選擇了中文,那麼MethodServer日誌就是中文版的,不幸的是,這個中文版非常不成熟,中英文混雜在一起,中文翻譯有時像天書一樣讓人難以理解報錯信息到底在說什麼。而這次則又發現了一個更糟糕的弊端,即由於對布爾型屬性的本地化存在問題,直接導致了使用上的問題。最後我只得讓客戶棄用MC_VERIFIED,好在這實際上並沒有什麼影響,事實上Creo的官方幫助文檔中甚至建議不要使用MC_VERIFIED,因爲模型再生時會將MC_VERIFIED值變爲no,從而導致無法檢入,必須再次執行一次ModelCHECK,這有時會帶來非常煩人的問題。很多客戶反映Creo連接Windchill後麻煩增多,其實各種情況下的“再生”往往就是麻煩的根源。

發佈了48 篇原創文章 · 獲贊 10 · 訪問量 7萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章