[jbpm]jBPM(六): 由手动建表想到一个教训

来源:互联网 发布:mac mini 遥控 编辑:程序博客网 时间:2024/06/06 11:02

在jBPM(四): 部署jBPM所用表到数据库_1 中, 笔者费了不少篇幅梳理了下怎么用ant命令来生成建表语句,今天又看文档时, 发现如下的话:

  In order to get the proper database script generated for your database, you should use the scripts provided in the jBPM Starter's Kit. In the Starter's Kit under the ${JBPM_SSTARTERSKIT_HOME}/jbpm-db/build/${DATABASE_TYPE}/scripts you will find create scripts for all the major databases.

  原来,那些建表语句不用自己生成!那再想下,自己走的这个弯路有什么可引以为戒的?总不能自己白花这"冤枉钱"吧? 想想,这花钱买来的教训有如下两点:

  1, 没有分清jbpm-db\build目录下以数据库命名的各文件夹与jbpm-db目录下对应文件夹的关系. 如"jbpm-db\build"下的mysql文件夹跟"jbpm-db"下的mysql文件夹. 原来jbpm-db\build下的文件夹是ant运行后的结果,而jbpm-db下的文件夹是专门给ant做配置用的.

  2, 看文档不够细心.这个不够细心的原因可能是总觉得这文档跟自己工作项目中所写文档一样是应付差事.有了这样的心理后,看文档时也就更多地是走马观花地过一遍了, 没能真正用心去体会,更不用说结合文档自己动手做验证了. 现在看来, 不少问题都可以从文档中找到更为详细的答案,而不去在网上搜那些支离破碎的个人描述.

  有了这个教训, 以后看文档时,把正儿巴经地文档当会事,自己会少走很多弯路.

  写到这里想起Thinking In Java第四版序言里作者的一段话:

  Just as often, creating the next edition produces fascinating new ideas, and the embarrassment is far outweighed by the

  delight of discovery and the ability to express ideas in a better form than what I have previously achieved.

原创粉丝点击