ѧ
JOURNAL OF SOFTWARE 
1999 10 5 Vol.10 No.5 1999



ھӪ֪ʶĶ̬عҵϢϵͳģ
Ծ͢鰡ܿ
ժҪҵϢϵͳʵʩдڵĽṹԼЧʵķƷ,ʹҵ Ӫ̲ϱ仯ʱӦ,׵ǱڵĴںͶĳɱ. ͷֲʽĻ,˻ھӪ֪ʶľӪĲνṹģ.һ ģ,еȵĹͨصݶ˿ӳԼǶĿ,˾ϸ ȵĻӪ֮临ӵĵùϵ,ṩ4Ӧϵͳع.,¸ PetriӪΪģ͵ʵ÷.ͨһ,ģֲʽs erver֮佨ĶӦϵ,ӶʹҵϢϵͳĿٿƳΪ.
ؼʡӪ,,ֲʽ,ݶ˿,Petri.
ͼšTP311
A Business Knowledge Based Approach to Model the Dynamically ReconstructableEn terprise Information System
ZHANG Xiao-dongCHAI Yue-tingREN Shou-juLI Fan g-yun
Department of AutomationTsinghua UniversityBeijing10 0084
AbstractThe existent ill-structured architecture and the low efficiency of analysis and design methods during the implementation of enterprises information systems are the main factors, in regard to the continuous changes of the business processes , which disable the quick response capability of enterprises and are apt to resu lt in potential errors, delays and extra costs. On the basis of the componentwar e and distributed object technology, a hierarchical model of knowledge-based bu siness objects is proposed in this paper, within which the medium-grained proce ss-components mask the intricate interactions between fine-grained basic busin ess objects by means of the special dataports mapping and built-in rulebase con trol. Also, four kinds of reconstruction strateqies are available under this mod el. Finally a kind of Petri net-based approach to model the business objects' b ehaviors in the business processes is given. Through this approach, the unambigu ous relationship between the model constructs and the distributed object servers can be explicitly established so as to facilitate the rapid development of ente rprises applications.
Key words Business objects, componentware, distributed objects, dataports, Petri net.
֪,ҵϢϵͳķʵʩһʱ䳤ʴϵͳ.ҵ Ӫϱ仯,δҵ벻ϽоӪٹ(business process reengineeri ng,BPR),ܾ߱־õľ.ҪϢϵͳܹBPRʵʩ,Ѹٵ ־Ӫ̵ı仯.Ȼӵǰҵĸʵ,Ϣϵͳ߱ԵĽ ,չԲ,ɲִ۸ӵĽϹϵʹӦó޸ǣһȫ,׵ ´ظͶ.ͬʱ,ϢϵͳʵʩȻȱ֮Чķģָ,ҵģ ͵ĸı䲻ܿٵطӳʵ,,ͶBPRеòϣ1 .
90,2ݺͷֲʽʾ,ڴ˻ ԾӪ(business objects)ΪĵҵϢϵͳΪҵ۵Ľ 35.Ӫڷֲʽм,CORBA6,7ݻDCOM(distributed compon ent object model)8,9ݵ֧,ԷֲĶserverʽ,Լ弴 ʽĶ̬عϵͳƶŵгγɾԶ.һ ֻھӪ֪ʶľӪĲνṹģͼӦĽģ,ڱ֤ľϸ ͬʱ,ҵľӪ߼Կʽװڲ.ĵ1ڲӪ͹ Ĳοģͺ˼.2ԼӦϵͳò., һʵʰ˵ζԾӪ̽пٽģ,ľӪ.
1Ӫ
1.1˼·
Ӫ5ΪӪԡԼݵļĴ,лһ,Ӷ ֤Ӫ־ӪԵҪ,ܾӪ,ȷʱ,ȷ, ȷķʽ˳ִ.ƿþӪĹ,ָ˼Ӧʹ һĶԺ.Ϊ,ӪھӪ.ӪĴ洢 תơԼӪ˵Ľ,ǾӪ뾭Ӫ໥õĽ.ͼ1ǾӪ 뾭Ӫ໥õʾͼ.Ӫϱ仯.Ӫı ʽ(user interface management system,UIMS)ӪݵĴ洢(DBMS)Լ Ӳƽ̨Ͳϵͳѡǵ¾Ӫ仯ļ.Ƚ϶,ܾӪй ͵Լгı仯,ܵ¾Ӫ߼ĸԸı,־ӪʵʵЩ Ӫ߼ȶ.,ӪںӦ־Ӫ߼,εЩļ ,ƵصڶԾӪ߼.뾭Ӫ߼޹صĶ󱻶Ϊ ,GUI(graph user interface)DBMS,Ӫ뼼Ͷһ ͬҵϢϵͳ.

1.2Ӫ
ľӪ԰ǵʻΪ3,ֱʵ¼Ϳƶ .3󹹳ɾӪϵײ,Ǿоϸ.ÿӪʵھӪ ھΨһĶʶ(identity),Ӫֻͨ÷ʽд.3 .
ʵ(entity objects)ԾӪеʽнģ,緢ƱӦ̺Ͳɹͬ ʵ.ͨ,ʵ3Ӷ,Ǹ(body)洢(BodySet)͵ (iterator),ӶֻҪô洢ʵҪ.嶨ʵ ĸ״̬()Ӧṩķ().,ʵĸ廹 ,һʵļṹ(KeyStruct),һǴ洢(BodySet).KeyStru ctʾܹΨһȷСԼ,BodySet洢øĶ󼯺,ṩ ԸڿƺͲѯ.ʵĴ洢Դ͵.ͨ ,ܹԴ洢ѯиֱ.ͼ2г˾ӪʵĲοģ.

¼(EventObjects)ԾӪĴƽнģ.ھӪд3¼ ,Ƿֱ¼(RequestEvent)֪ͨ¼(NotificationEvent)ʱ¼(Tem poralEvent).,¼ɾӪ,ͨ˻ӿ.,ûеİ ť,Բһ¼.¼ζŻϵͳ,װصĻ Ϣ.֪ͨ¼ϵͳĳ,߽Ϣݸ,û֪ ִ;߽һϵͳڲ.,ϵͳܹû趨Զ һЩʱйص¼,,ʱӡԼʱ̵,¼Ϊʱ¼.¼ ֿ״ֱ̬ʹ(enabled)ͽֹ״̬(disabled).¼Ĳοģͼ 3ʾ.

ƶ(ControlObjects)ԾӪеĶʽнģ.ƶͨɾӪ¼ ,ʵݶ󽻻,µĻ޸ԭеʵݶ,ڽ ʱܲµ¼.ƶװԭ߼Լ.ͼ4ǿ ƶĲοģ.ƶṩͲִ(commit)ͻָ(roll back).Commitʾִеǰ,Rollbackʾȡǰִ,뽻ʵ ¼ִָз񱻵֮ǰ״̬.RollbackԸû, ִй̳쳣ʱԶ.ÿƶ뻷Ľӿͨݶ˿ʵֵ. Ϊƶһ,ݶ˿(dataports)һƶϢͨ ,ÿdataportͼ5ʾĽṹ.ͨ,һݶ˿ڵֵ(value)ǲƹ̵һ¼ʵݶ .ÿݶ˿ھϸ(TypeCode),ζݶ˿ڵֵֻǾͬ TypeCode(TypeCodeĶϢ,,IDLļ).ݶ˿ڵ PolarityԱʾ,Polarity=+-͡+/-,ֱʾö˿ǿ ƶ˿ڡ˿ں˿.ÿƶṩͳһsetport(s)g etport(s)dataportв.˿PortNamePortID,d ataportиֵȡֵ.ÿݶ˿ڵıźڸÿƶΧڱΨһ.


1.3ݶ
ݶ(DataObjects)Ӧϵͳеһ.ݶҪĿǷװֲ ʽ㻷иĽϢ7.뾭Ӫͬ,ݶûΨһide ntity,ݶֵַͨʽд.ݶΪɿɱ ͵,.ʵʽṹ൱һΪName-ValueԵ .ÿName-ValueԶԾ߱ͬݸʽ,ValueһIDL﷨еanyʾ .ݶǶ׹ϵǺϷ,ζһǶһݶʵ .ݶṩһµķӿ,Add(һ)Delete(ɾһ)Des cribe(ȡб͸ʽб)Set(Եֵ)Get(ȡ ֵ).ݶΪset-getport(s)ĲÿƶĶ˿.
1.4νṹģ
(ProcessComponent)һеȵľӪ,ȻľӪ,¼ ʵͿƶӽӦò.ЭƶĹ,ԭ϶һľӪ̽п,ʵ,һ ӵľӪ̿ɶͬ.
ɲݶ˿dataports;Ӫrulebase. ݶ˿ƶݶ˿ڽṹ,,˿ڵ,ԷӳӪ пƶdataports.,һӿƶݶ˿ڵݶ˿ڵӳ. ÿƶĶ˿ڿĶ˿Ӧ,ͬʱ,ÿĶ˿ҲԶ Ӧڶƶݶ˿.ͼ6ǹPC4ƶCO1,CO2,CO3CO4Ķ˿ӳ ʾͼ.˿֮򻡱ݵĴݷ.ÿݶ˿ڵıź ڸΧڱΨһ,ƶ,Ҳṩ˿ƺͱŽеsetport(s) getport(s).ÿ˿ڿܴЧ(valid)Ч(invalid)״̬.ǰ ߱ʾö˿ֵԷ,߱ʾ˿ֵЧ,Ըö˿ڵgetport쳣. 

ڹܷӳӪпƶϢ,,԰Щƶ ĴߵĽɫ.ӦóԭҪԶƶеĲ,ֻԵ .ԭӵĶӿڹϵ,Լ䲻ͬĽӿʽ,ڿɸ 򵥡ͳһĽӿڹϵȡ.ֽӿڹϵֻһ(),ֻ ʽ(setportsgetports).Ӧó򲢲ֱƶϵ,Ӧ óĴͲôݸȷĿƶ,Ȼƶִ, ׽쳣,ִнʱ,ѽӿƶݶ˿ӳ䵽ԼĶ˿, Ӧó.,ӦóеȵĹԼϸȵĻӪγ ͼ7ʾĲνṹ.


תͲӳ֧.ľӪ(ruleba se)Ǵ洢ĳ.ECAPʽ洢Ӫ֪ʶ.ECAPʽEVENT(eve nts) COND(conds) ACTION(action) PARAM(params).ʾ,eventsʱ,conds ʱ,params ִaction.rulebaseľ﷨EBNFʽ涨.
Լ
item:ʾitemܷ.{item}*:ʾitemܷ.item: ʾitemΪ ֻ.item1|item2:ʾitem1item2.
﷨
rulebase={RULErule no:rule body;}*
rule no=1|2|3|...
rule body=EVENTevent listCONDcond listACTIONidentity PARAMparameter list
event list=(Pre-eventlist)(Post-eventlist)
cond list=(Pre-condlist)(Post-condlist)
parameter list=(In-paramlist)(Out-paramlist)
Pre-eventlist=0|complete ordered list
Pre-condlist=0|complete ordered list
Out-paramlist=0|complete ordered list
complete ordered list=nonzero dataport No. {,nonzero dataport No.}*
Post-eventlist=ordered list
Post-condlist=ordered list
In-paramlist=ordered list
ordered list=0|nonzero dataport No.{,dataport No.}* 
nonzero dataport No.=1|2|3|...
dataport No.=0|1|2|...
﷨,identityĳƶıʶ.Pre-eventlist Pre-condlist ʾɹԵݶ˿ڱɵȫձ,In-paramlistʾ identityʶĿƶľԵݶ˿ڱɵPost-eventlis tPost-condlistʾɹԵݶ˿ڱɵ,Out-param listʾidentityʶĿƶľԵݶ˿ڱɵȫ .һԹ£Pre-eventlistӦdataportsжЧʹ ¼,Pre-condlistӦdataportsжЧʵݶ ,ô,Щýӳ䵽identityʶĿƶIn-paramlistӦd ataports,ƶ.ִн,In-paramlist ӦdataportsжЧʵݶ,ôЩýӳ䵽 Post-eventlist Post-condlistӦdataports.ĳdataportͬ ʱPre-Post-eventlist,ʾdataportӦeventȻЧʹ,Ϊ Ĭ,eventACTIONִԺͱֹ,ҸdataportЧ״̬.ͬ, ͬʱPre-Post-condlistеdataportsŶӦentitydataʾACTION ִк,ʵݶ󱻸,ȻЧ.,ö˿ڵ״̬ĬϵΪ Ч״̬,ͷŵö˿ڰ(Ƕñͷ,ʵʶɾͷ Ĵ߸).ƪ,ʡйؿƶ֮Ķ˿ӳ, ԼĽṹԺͺϷԸʽ.
2ò
ӹĽṹԿ,ͨݶ˿ڵӳ,԰ѶԶӪʵ¼ תɶԵһµĽӿڲ,󽵵ӦóӿڵƵĸӳ .,ÿṩ磺AddPort,DelPortSetPortParam,GetPortParamȷ ,dataportͲά,AddRule,DelRule,ModifyRulePrintRuleȷ ӪеĹά.,õ3Զ̬ӡɾ޸ĺʹ ӡ,Ϊеserver,̻еĹͿṩͼλĹ ,ʹûߵضݶ˿ں͹.ص,ʹǲ ײڶྫϸȵĻӪ,оӪʺʱ,µľӪ ,޸Ĺ,ԭоӪ̷ı仯,
ӪΪ(server),Էֲϵͳкʵ.һֿеİ취 ,ҵвͬ֯ŵķֱиûĶserver,ͬʱ,ζ ЩбҪά.ڻӪ֮ϵĹ,Ҳserver ʽϵͳ.λϢϵͳиþӪȷ.ǾӪ server,ǹserver,ԿϵͳеĿɹԴ.ṩͬ Ȩ޿,ͬʱΪͬӦóṩ.
еȵĹ뾫ϸȵĻӪγɵĲνṹ,ΪҵϢϵͳṩ ع.ӪΪԪ,ѹȳɲԪ·, ᵽ໥ļ弴Ч(μ1).
14ҵϢϵͳع
Change 
Policy Business ObjectProcess 
Component   ApplicationAnalogy
1(޸)ʵ塢¼ԭеʵ塢¼,޸Ŀƶ, ÿƶݶ˿߼.   ޱ仯.ޱ仯.滻ԭеԪ,µԪ ӿʲ,·岻. 
2(޸)ʵ塢¼ԭеʵ塢¼,޸Ŀƶ,ÿƶ ݶ˿߼ı.޸ĸÿƶӦĹ.ıͬһĳsetportsgetportsĵò.·ӿԭͬ,˸ı֮·. 
3ԭоӪ̵Ļ,µĴ,µĿƶ.µĿƶӦĹ.Ӷͬһһµsetportsg etports.·,֮·. 
4ҵµľӪ,ԭоӪĻ,ҪһϵµľӪ.µĹ.ӦóӶĴ.µ·. 

   3ӪеĶΪģ
PetriܹЧؽʾӪ̵Ķ̬,ԱΪģ., ͨһʵʰ˵õݽɫPetri(HCPN)Ӫ,ʶƾӪ ݶ,ȡĹ.HCPNʽԲμף10, Լ
* ԲȦʾ,еtokenӪ¼ݶʵĸ,to kenɫ(color set)ȼڸöԶ򣻱ǨΪǨͨǨ. ͨǨɷʾ,Ǩķ½ǱӰ.
*ִ¼ʵݶ,Ǩִƶ Ӫ̵.ԶתʾϢ.
ĳҵʵʲɹΪ,ɹ̰4Ʋ,ֱƶɹͬЧ ɹͬٲɹͬԼɹͬ鵵.ɹԱȸݺͬƶԼӦ ̵йϢ,ƶӦĲɹͬȻЧͬ,ѡһֺͬʹЧ. Чĺͬ,Զкͬ.ٵݰͬϢ͵Ϣ,Ҫڸ ٹɺͬٱ.ںͬʱ,Զúͬ鵵.
ͨľӪ̿Եó,̵Ϣƶͬ󡢹ӦϢ Чͬ󡢺ͬϢԼͬϢ;ͬٱͺͬ .ݴ˿ɱʾӪ̵Petri(ͼ8ʾ).ԸPetriֱ۵Ŀ, Ϊһ־RTC(run to complete)ʵԶ.Ҳ˵,һϢȫ߱ ,ɹ̽Զ𲽵ؽȥ,ղ.һ˼,Ըس Щ״̬ıĹ.,һϸǨ,ͼ9ʾĵݽ .ѿ,ʱÿǨĲѲٷ,һԭ.Լ, ʶеĻӪ.,¼ƶͬReqMCЧͬReq VCʵӦSupplierɹͬContract(ƶͬЧͬ ɺֱͬɹͬĲͬ״̬)ͬٱRptTCͺͬĵDocuments, Ҫݿô洢,,ÿʵӦӦĴ洢͵ ݶͬϢArrivalInfo͸ϢPaymentInfoƶƶ ͬMCЧͬVCٺͬTCԼ鵵ͬSC,ǵĽΧֱͼ9б .


ÿƶ¼ʵݶĽ,Petri򻡵 ԼӦÿƶǨеtoken,ԶԲɹеĿƶ ܽ2ʾϢ.
2ƶϢб
¼¼ 
MCReqMCSupplierContrac t(m)
VCReqVCContract(m)Contract(v)
TCContract(v) ,PaymentInfo, ArrivalInfoRptTC,Contract(c )
SCContract(c)Document 

  Ȼڴ˻ƸӪ̵Ĺ,岽£
* ÿƶݶ˿(3).
3ƶݶ˿
MC PortIDPortNamePolarity
1ReqMC +
2Supplier+
3Contract-
VCPortIDPortName
1ReqVC+
2Contract+/-
TCPortIDPortNamePolarity
1 Contract+/-
2Payment-Info+
3Arrival-Info+
4RptTC -
SC1Contract +
2Document-

      * пƶݶ˿ӳ䵽ݶ˿ ,Ӷ ݶ˿(4).ͬĶ˿ڿص,ͬ״ֶ̬ͬӦռݲͬ Ķ˿,,ƶɹͬЧɹͬɲɹֱͬӦ˿Contract(m ),Contract(v)Contract(c).
4ݶ˿

PortIDPortNamePolarityCO's por tID
1ReqMC+MC1
2Supplier+MC2
3Contract(m)-MC3
+VC2
4ReqVC+VC1
5Contract(v)-VC2
+TC1
6Contract(c)-TC1
+SC1
7PaymentInfo+TC2
8ArrivalInfo+TC3
9RptTC-TC4
10Document-SC2

* ݹͿƶݶ˿ڶ,Ĺ.ɹĹ 4,ֱӦƶɹͬЧɹͬٲɹͬ͹鵵ɹ ͬ4Ʋ裺
RULE1: EVENT(1)(0) COND(2)(3) ACTION MC PARAM(1,2)(3)
RULE2: EVENT(4)(0) COND(3)(5) ACTION VC PARAM(1,2)(2)
RULE3: EVENT(0)(0) COND(5,7,8)(6,9) ACTION TC PARAM(1,2,3)(1,4)
RULE4: EVENT(0)(0) COND(6)(10) ACTION SC PARAM(1)(2)
4ᡡ
йؾӪνṹģ͵˼Լصݶ˿ڽṹ͹,Ѿ ӦCIMS¾Ӫ(business object component framework,BOCF) ԭϵͳ.ǲ÷CORBA2.0淶IONA-OrbixΪм,Ӫ֪ʶΪ޸ Ĺ򼯳ڷֲʽserver,ЩװɵӦóڶԺͶ̬ Էʾ˽ϺõЧ,ͬʱ,ҲΪ칹ЭԼӿӳ䷽Ľһ оṩ˱ľ.
л оõȻѧ͹863/CIMSĿ ,ĿŷֱΪ69684007863-511-9844-010,ڴ˱ʾл.

оõȻѧ͹863߿ƼĿ.
 ,1971,ʿ,,ҪоΪֲʽ,,Ӫ ٹ,CIMSӦϵͳƽ̨.
Ծ͢,1964,,Ҫ ΪCIMS,Ϣ,ϵͳ.
,1936,,ʿ ʦ,ҪоΪϵͳ,CIMS,֧ƽ̨.
ܿ,Ů,193 6,,ҪоΪCIMS,BPR.
ͨѶϵˣ, 100084,廪ѧԶϵ
ߵλ廪ѧԶϵ100084
ο
[1]Jacobson I, Erricsson M, Jacobson A. The Object Advantage: Bu siness Process Reengineering with Object Technology. Reading, MA: Addison-Wesle y Publishing Company, 1994
[2]Bronsard F. Toward software plug-and-play. ACM SIGSOFT Notices, 1 997,22(3):1929
[3]Fingar P, Dennis R, Stikeleather J. Next Generation Computing: Dist ributed Objects for Business. Eaglewood Cliffs, NJ: Prentice Hall Inc., 1996
[4]Wegscheider E. Toward code-free business application development. IEEE Computer, 1997,30(3):3543
[5]Shelton R E. Business objects-modelling with business pattern. 199 6. http: www.openeng.com
[6]Natan R B. CORBA: a Guide to Common Object Request Broker Architect ure. New York: McGraw-Hill Inc., 1995
[7]Thomas J M, Zahavi R. The Essential CORBA: Systems Integration Usin g Distributed Objects. New York: John Wiley and Sons, Inc., 1995
[8]Microsoft Corporation. The component object model specification. ve rsion 0.9. 1995. http: www.microsoft.com
[9]Mark R, Alan E. An introduction to inside DCOM. 1997. http: www.d bmsmag.com
[10]Jensen K. Coloured Petri nets. In: Rozenberg G ed. Lecture Notes in Comput er Science. Berlin: Springer-Verlag KG, 1986. 249299
1998-04-16յԭ,1998-06-08յ޸ĸ
