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



ֲʽϵͳFlowAgentĶ̬
ľͺ
ժҪʵʵҵҵҪWFMS(workflow management system)ܰѷֲҵʻе˹Զ񼯳ɵһУ԰ҵʵҵȫ̻.ĿǰWFMSڼеݿϵͳ,þ̬֯ṹ.ΪʵȫֲЭͬ,FlowAgentϵͳ˷ḻĶ̬߼һʺڹ̬Եҵṹ.
ؼʡϵͳ,,,,,,ṹ.
ͼšTP316
The Dynamic Scheduling of a Distributed Workflow Management System FlowAgent
WANG Wen-junZHONG Cui-hao
(Institute of Software The Chinese Academy of Sciences Beijing 100080)
Abstract Real enterprise processes require WFMS (workflow management system) to run under heterogeneous environments involving human and automated tasks distributed across enterprises. But most of the WFMSs are based on traditional centralized DBMS, and constructed under the limitation of static organization structure. FlowAgent develops its own way to realize dynamical task-scheduling logic, and a federation structure for enterprise processes.
Key wordsWFMS(workflow management system), taskflow, agent, task agent, task processor, task domain, multitask domain architecture.
1ϵͳ
ȫΧڵľ,ҵͼѹŵĲ֯ṹ,ʹҵҵ̺;߽ҹĻ,͵BPR(business processes reengineering)оĳ:׳Ĵͳҵе˹Զ񼯳ɵֲʽҵITУ1,2.Internet¼ΪBPRʵִһҵ¸ϵͳ(workflow management system,WFMS).WFMSϵͳ԰˹ҵʻеԶӦϵͳɵͳһҵ.ҵеļʩ,ͨҵϵ,WFMSϵͳԽиӵЭͬ.
еĸWFMSģ֮ĲͬҪڹ̵ȵ.ȻһЩоĿñȡ񡱸ϸ(¼״̬)ȡ񡱣3,ϵͳڡһ,ѹ̶Ϊ.Ϊַʽҵҵ˹ȷǳһ,Ҳͳ˹Ȼķʽ.еWFMSϵͳIBMFlowMark4ݺTwenteѧWIDEϵͳ5ݵȵ.
2ֲʽϵͳ
֯еҵ̳漰ֲڲͬλϵԴߺԱԣWFMSܽȫֲȵĶ.ЭͬϢԱֲʻ,һĸı佫Ӱ쵽ҵ,ǿWFMSĿԺͿɿ.
CORBAJavaBeansȷֲʽĳ,Ҳʼ칤ϵͳ.,FlowMarkʹObjectStoreԷֲĹͻϵͳмеĿƹ4ݣWIDEϵͳʹCORBAֲĹͻṩеĵȲԶͿƣ5.ǲûʹϵṹȥûعWFMS,ʹ÷ֲʽʩѼеĿݴ洢ֲĻȥ,ڹ佻еġ״̬¼(MentorĿʹTuxedoʵʩϢأ3,6,7).
ΪֲʽʩΪֲʽϵͳĹ׼,ΪֲʽĸṩҪķֲͨ,ϵͳʵĶ̬.Ϊֲʽֱ֮ͨԶ̵̹롰̡ȷϵ,ڷֲʽԺܺõؽģ͵WFMS.,Exotica(FlowMarkķֲʽϵͳ)ͨ־Ϣϵͳ(IBMMQSeries)ʵִĽڵ֮Ϣ,ڼʽдڵͨƿ9; ΪCORBAĹϵͳ,ORBWork÷ֲCORBAһֶ̬ṹ,ϵͷɢЩ(task manager,task)У9,10.
ŷֲʽ̻ķչ,(agent)𽥱ڷֲʽӦϵͳɣ11:һҵ̿ԺȻرһɸͽЭͬȵĴļ.,DartFlowϵͳ,ƶĴԴӼе֪̿ʶȡԼҪ·Ϣ,Ӷʹֲڲͬصڶܲ뵽е12ݣADEPTϵͳ,һһضӦóṩġ,ͬĴ֮ͨЭġ̡ķṩ/ʹùϵ11. 
3ṹ
FlowAgentǽ(ǳΪTaskAgent)ϵϵͳ,һȫֲϵṹ֧Ķ̬Ⱥ͹̵ĸ߿.һֲʽϵṹ,ҪʵֵĶֹġҽԺڵסԺ.ΪЩϵͳֽԶĹ.еʵ嶼ΪTaskAgent().ÿжһΪTaskDomain()TaskAgentʵ壬Эͬʵ干ͬɡ˳ΪMOTHER(ĸ).TaskDomainƵTaskAgentеCHILD(),˴֮以ΪBROTHER(ֵ).һTaskAgentɸֵĺ,ЩֵܾTaskAgentFOLLOWER(),TaskAgentЩֵܵPREDECESSOR(ǰ).һTaskAgentִеǸùĸ׵ĺ,ĸ׾TaskAgentǰ.
еĶTaskAgent,ҪôһTaskProcessor(Ӧó),ҪôһTaskDomain.ɴ˶ϵṹ.
ùеĸͨЭͬͬɸùġ.ЩֱӶӦĳӦóTaskProcessor,ЩӵԼĶӵĵͲTaskDomain.Ķṹ(multi-TaskDomain architecture),ǳӵĹҲԱֽɲTaskDomain֮.ÿTaskDomain,/ȵĿ߼Զر޸,ǣ߲/ͲTaskDomainֵTaskDomainĵ߼.ɴ,ǿԿһTaskDomainĸ,ʵ.
4FlowAgentϵͳ
һFlowAgentɷֲвλṹġеɢTaskAgentɵ.ͨ໥̡ʵֱӵ໥.ͼ1FlowAgentϵͳ:һвνṹɸ,ÿTaskDomain,һ(domain monitor)ٺͼ¼жӵ¼,һԶʹŸTaskAgent(agent designer).򡱵TaskDomainΪĶӽϵͳĽӿ,ʹĶӿͨϵͳϢ.

ͼ1FlowAgentϵͳ
һFlowAgent漰ӦóǷǳӵ(ͼ1ʾӦóApplication C).ΪӦóаźõTaskAgentĸӵȹϵ,еÿ趼һTaskAgent,ӦóTaskAgent໥ȹϵ͹˶ԸӦóȿƵ߼ȡ(ͼ1ʾTaskDomainCĶӡc c2 c3,һ˶ӦóApplication Cеĵ߼ȡ).,ǾͿԸذѸӦó򼯳ɵһFlowAgent.ĿǰWFMSϵͳ(ADEPT11)ѹеġ񡱶ΪĳӦó˹ҵΪṩĳ֡,Ӧϵͳڲ״̬ͺѱŵ̵.һTaskAgentһӦóеĳ,,FlowAgent̾ͽڱӦó塰񡱸ϸ֮.
FlowAgentȫֲʽϵṹ,TaskAgent֮ڡӦóпв֡ʵ໥ȹϵĶ.ȲԱֲÿTaskAgentԼһTaskAgentĺ֮ġȲѯ֮.ͨȲ,TaskAgent֮ʵCommitAbortConditional Existenceϵ13,ҿʵTaskAgent֮ĸӿ(ֲʽTaskAgentеִڿơ֧/Ͽ).
4.1TaskAgentĶ̬
һʱ,Ҫɵġ漰ĿϢ,ǿԶеĹ漰ٻTaskAgent.ڵϢ(,)/ṩϵ,ǿԶһЩȷеTaskAgent֮໥ȹϵ.Щǲͬ߼,ɡTask-exitһƥTask-entry.һTaskAgentһTask-entryTask-exit.ЩΪЩTaskAgentĶ̬ṩƥ䣬ʹЩTaskAgentҵЩTaskAgentԳΪǵĵĿ.еΪ򡱶TaskAgentͨŵЭ.ⲻͬڴWFMSϵͳ(ADEPT11)Ȳ,ǰѡ񡱶ΪĳӦóṩ塰:
(1) еġӦϵͳṩض,һ붨иġ;
(2) еһӦóṩĳضġ,̵ĵ߼òΪɵƬΣ
(3) еġǴȵġ,ΪȿƴӦóȡ㹻Ϣ,Ժʵֶ̬Ȼ.
һ򡱵ͨƥʵеTaskAgentĵȿ:ĳضTask-exitTaskAgent͸Task-exitƥTask-entryTaskAgentʹܹϵ.ڹʱ,һTaskAgent-ҪTaskAgent-Ϊĺ,ֱӵһTask-exit-ȵõTask-entry-ȵĵͨ.TaskAgent-ֵȵTask-exit-,̬ġȲѯΪиúĺѡTaskAgentṩˡOr߼.ʵ˶TaskAgentִж̬ѯĵȲ,ֵȲԲǻһӦóṩ塰,һҵ֯ṹеĹ̶ɫ(ĿǰWFMSϵͳõķʽ).
һTaskAgent-ÿTask-entry,ΪTaskAgent-ö˺TaskAgentԵȦǵĺΪȲеƥ䶨,һԶӦֵõݴݻ.TaskAgent-õTask-entry֮ġAnd߼ϵ:õTask-entryӵӦǰṩ,òſԿʼ.
4.2TaskAgentĵ߼
TaskAgent߼4
ͼ2ʾ,TaskAgent-ֵĵ߼(TaskAgentTaskAgent)4:

ͼ2TaskAgent߶߼4
(1) Task-entryϵġAnd߼,ͼС#1ʾ:ֵÿTask-entryյ˴ǰһ,ֲſ.
(2) ֵһTask-exit-кѡTaskAgent֮ġOr߼,ͼС#2ʾ.ڦֵһTask-exit-,ֿѡκһӵTask-entry-ȵֵΪ.
(3) ԦֶӦӦó״̬/ж,ͼС#3ʾ.ڴӦֶӦӦóȡ״̬/,ִֿһʧܴģ(״̬/ʧ),һģ(״̬/гɹ).
(4) һģеġfollower strategy(̲),ͼС#3ʾ.ֵгɹ,ִֽһģ.ģһfollower strategy,3ֵȲ(VpV,VsV,AsA)Task-exit,ԽЦֵĺ̵ȹ,ҿԶԦѳɹɵȷ/.
ΪTaskAgentĵȹϵǻӦóṩĳ֡.߼ĵ1Ǿ̬ġAnd߼,24ֶ߼һTaskAgentȥTaskAgent.Ȼ߼ĵ2ַǳ,ִĲѯѡʹǵ߼߶̬ԵĲ.߼ĵ34ֿԱḻĵȹϵ.ͨе״̬/ġAnd/Orif-then/loopȿ,3ֵ߼ԶжԹȵĸ.4ֵġfollower strategy߼Ĳ,ԶԸTaskAgentĳɹнȷ,ҿΪеĺͺṩӵĵȿ.
̲Ժ3ֵȲ
һfollower strategy(̲),µȲTask-exit-t1/t2(t1t2):
ParallelOr.Task-exitеصǵĺ.һȳɹ,ⲿ߼ΪTrue.Ϊһɸķ֧.÷šVpVֹϵ:t1 VpV t2.
SerialOr.t1ɹصĺ,̵õһcommitted event,t2Ͳٵĺ,ⲿ߼ΪTrue.÷šVsVֹϵ:t1 VsV t2.t2t1Ĳ,t2Ϊt1Ĳʧָ,,ǿڡtransactional TaskAgentΪԲ.
SerialAnd.t1ںеõˡfailed event,t2ȥĺ,ò߼ΪFalse.,t2ĺ.⽫÷šAsA:t1 AsA t2.
һfollower strategy,Task-exit-Force-True/Force-Falseʹֻȫ߼ֱӵõTrueFalseĽ.ͨTask-exit͵߼VpV,ǿԶһfollower strategy,ѾõܵġTrueFalseĽ󣬼ĵȹ.
Timeout/deadline
TaskAgent-ָĺ-÷,ֽȴ÷ظһ¼úгɹ/ʧ.ͬʱ,ְպ-õġtimeout durationȵ(һTask-exit)һʱ.÷˱õͨʧ,üʱʱһûκ¼Ӧ÷ص,־Ϳ϶Ԧõĵʧ.ʵ,timeout durationڿTaskAgentеġdeadline.,TaskAgent-ֿԶĺ-ádeadline Сʱɲһcommitted event,÷Сʱ,ûû,ʱ󽫵¦϶Ԧõʧ.
ͬ/֧
,ͨ߼ĵ1,ǿԶTaskAgent-Ϊǰͬ:һǰ÷֮ǰ,Ѿ÷ǰֱԼġfollower strategyеĳȵȴظһɹ/ʧ¼.Ϊչ/еͬ,ǿԶһTaskAgentȥTaskAgentΪĺ,ЩȥͬһTaskAgentΪԼıɺ(ڸúгɹ,ǵġfollower strategyܵõΪTrue).ЩTaskAgentһ:һʼ,֧Ϊɸ,Ȼֻϵһ.
һTaskAgent-õǰͬ,õġfollower strategyڦúĺ֮䶨ӵĵͬ.õġfollower strategy.,ѡɸTaskAgentΪĺִ̲ĺ,ں,ÿTask-exitȽ߼ֵɱȷ/񶨦ѳɹɵ.߼ֵΪTrueʱ,òȷɵкͺгɹ.
4.3̬ɫ޶
ڴ͵ҵҵ,λ֯ṹǶ.֯ṹ,һеָɡɫҲǶ̬仯ģ14,15.ʵ,֯ṹеĽɫ޶ŸܵĹϵ,֯ṹǼӵĹϵ! ǣĿǰϵͳеĽɫ޶ǻһе֯ݿ߼ɫӳ䵽ʵʵִ/.ֽɫ޶ԲӦҵ̼֯ṹƵ仯.
FlowAgentܵĽɫ޶,֯ṹָ֯ɡɫֿ,,ɫ̬/һ.̬Ľɫ޶֤ͨ֯ϵͳ/ҵְ֤ʵֵ:ΪһTaskAgentĳԴ(Resource-item)ԼݵķȨ/֤,ʹTaskAgentǰԶ̬ҪԱ(3ϵͳ)֤ͨ֯ϵͳṩ֤ʵ/Ȩ֤,Ӷʵֶָ֯(/ȵ֯).,һTaskAgentڸĺм֤Ϣ:µɻƲŵľִС,úиúǰṩ֤,ȷְ.
5ܽ
FlowAgentϵͳӦJavaBeans/Java RMIȷֲʽʩ,һֿ֧ƽ̨ҵĹ̵ķֲʽϵṹ.ṹڷֲʽWFMSϵͳһЩؼ,ԡ̬ؽɫ޶ȵ,˽Ĵ.,ǽJiniṹͿƶȽӦFlowAgentϵͳ,ָ֧ḻҵҵ,һʵFlowAgentʵüֵ.

лFlowAgentϵͳоڱպѧѧ빤ϵġܿƶĴСĴЭ½кȡý׶Գɹ.Ϊ,رлзںΰ³塢Ѧͬѧ˽.
*оõȻѧ.
߼飺ľ,1969,ʿ,ҪоΪֲʽ.
ͺ,1934,оԱʿʦҪоΪ.
ͨѶϵ:ͺ1000808718
ߵλйѧԺо100080
E-mail: zch@admin.iscas.ac.cn
ο
1Malone T W. Modeling coordination in organizations and markets. Management Science, 1987,33(10):2325
2GarciaMolina. Coordinating Multitransaction Activities. Technical Report, Princeton University, 1990
3Muth P, Wodtke D. From centralized workflow specification to distributed workflow execution. Department of Computer Science, University of the Saarland, 1996
4Alonso G. Failure handling in large scale workflow management systems. IBM Almaden Research Center, 1994
5Casati F, Grefen P. WIDE workflow model and architecture. Technical Report, the Netherlands, Italy: University of Twente, 1997
6Wodtke D, Weissenfels J. The mentor project: step towards enterprisewide workflow management. Technical Report, Department of Computer Science, University of the Saarland, 1996
7Muth Peter, Wodtke Dirk. Enterprisewide workflow management based on state and activity charts. Technical Report, Department of Computer Science, University of the Saarland, 1996
8Alonso G, Mohan C. Exotica/FMQM: a persistent messagebased architecture for distributed workflow management. IBM Almaden Research Center, 1995
9Barbara D, Mehrotra S. INCAs: managing dynamic workflows in distributed environments. Journal of Database Management, Special Issue on Multidatabases, 1996,7(1):515
10Das S. ORBWork: a reliable distributed CORBAbased workflow enactment system for METEOR-2. Technical Report, University of Georgia, 1996
11Jennings N R. Using intelligent agents to manage business processes. Technical Report, Department of Electronic Engineering, Queen Mary & Westfield College, 1996
12Cui Ting, Gloor P A. DartFlow: a workflow management system on the web using transportable agents. Technical Report, Department of Computer Science, Dartmouth College, 1996
13Attie P C, Singh M P. Specifying and enforcing intertask dependencies. In: Proceedings of the 19th International Conference on Very Large Databases. Dublin, Ireland, 1996
14Krishnakumar N, Sheth A. Managing heterogeneous multisystem tasks to support enterprisewide operations. Journal on Distributed and Parallel Database Systems, 1995,3(2):155186
15Lei Yu, Singh M P. A Comparison of workflow metamodels. Technical Report, Department of Computer Science, North Carolina State University, 1997
1998-11-05յԭ,1999-01-11յ޸ĸ
