分享
 
 
 

(5)Shark工作流的实现和WMFC&OMG规范的对比

王朝other·作者佚名  2006-01-08
窄屏简体版  字體: |||超大  

Shark工作流的实现和WMFC&OMG规范的对比

-----第五部分:工作流的实例化

关键字:Shark 工作流 WMFC OMG 规范

学习了这么多的开源框架,准备自己也实现一个。万事开头难,先说说如何用XPDL来描述流程中需要包含的信息和如何实例化一个流程。

在shark中有一个Package-Business_Example 的例子。其中Customer Service - Request for Partial Shipment (客户服务—对分装运输的要求)流程信息的xdpl描述如下:

<WorkflowProcess>

<WorkflowProcess AccessLevel="PUBLIC" Id="Business_Example_Wor2" Name="Customer Service - Request for Partial Shipment">

<ProcessHeader DurationUnit="D">

<Created>13-03-2003</Created>

</ProcessHeader>

<RedefinableHeader PublicationStatus="UNDER_TEST"/>

<FormalParameters>

<FormalParameter Id="Customer_Name" Index="1" Mode="IN">

<DataType>

<BasicType Type="STRING"/>

</DataType>

<Description>The customer (or customer organization) name</Description>

</FormalParameter>

<FormalParameter Id="Product_Name" Index="2" Mode="IN">

<DataType>

<BasicType Type="STRING"/>

</DataType>

<Description>The product name</Description>

</FormalParameter>

<FormalParameter Id="Ordered_Quantity" Index="3" Mode="IN">

<DataType>

<BasicType Type="INTEGER"/>

</DataType>

<Description>The number of ordered items</Description>

</FormalParameter>

<FormalParameter Id="No_Of_Stocked_Items" Index="4" Mode="IN">

<DataType>

<BasicType Type="INTEGER"/>

</DataType>

<Description>The number of ordered items on stock</Description>

</FormalParameter>

<FormalParameter Id="Partial_Ship_Status" Index="5" Mode="OUT">

<DataType>

<DeclaredType Id="Business_Example_Typ2"/>

</DataType>

<Description>If customer aggreed on partial shipment, set the value of this variable to "OK", otherwise to anything else ("NOT_OK" for e.g.)</Description>

</FormalParameter>

</FormalParameters>

<Activities>

<Activity Id="Business_Example_Wor2_Act4" Name="notify sales">

<Description>Enter the customer response ("OK" if customer accepts partial shipment)</Description>

<Implementation>

<No/>

</Implementation>

<Performer>Participant_Repository_Par10</Performer>

<StartMode>

<Automatic/>

</StartMode>

<FinishMode>

<Automatic/>

</FinishMode>

<ExtendedAttributes>

<ExtendedAttribute Name="ParticipantID" Value="Participant_Repository_Par10"/>

<ExtendedAttribute Name="XOffset" Value="381"/>

<ExtendedAttribute Name="YOffset" Value="70"/>

<ExtendedAttribute Name="VariableToProcess_UPDATE" Value="Partial_Ship_Status"/>

</ExtendedAttributes>

</Activity>

<Activity Id="Business_Example_Wor2_Act2" Name="ask customer for partial shipment">

<Description>Asks customer if it is OK to partialy ship the existing number of wanted items</Description>

<Implementation>

<No/>

</Implementation>

<Performer>Participant_Repository_Par10</Performer>

<StartMode>

<Automatic/>

</StartMode>

<FinishMode>

<Automatic/>

</FinishMode>

<ExtendedAttributes>

<ExtendedAttribute Name="ParticipantID" Value="Participant_Repository_Par10"/>

<ExtendedAttribute Name="XOffset" Value="226"/>

<ExtendedAttribute Name="YOffset" Value="70"/>

<ExtendedAttribute Name="VariableToProcess_VIEW" Value="Customer_Name"/>

<ExtendedAttribute Name="VariableToProcess_VIEW" Value="Product_Name"/>

<ExtendedAttribute Name="VariableToProcess_VIEW" Value="Order_Quantity"/>

<ExtendedAttribute Name="VariableToProcess_VIEW" Value="No_Of_Stocked_Items"/>

</ExtendedAttributes>

</Activity>

</Activities>

<Transitions>

<Transition From="Business_Example_Wor2_Act2" Id="Business_Example_Wor2_Tra23" Name="Transition" To="Business_Example_Wor2_Act4">

<ExtendedAttributes>

<ExtendedAttribute Name="RoutingType" Value="NOROUTING"/>

</ExtendedAttributes>

</Transition>

</Transitions>

<ExtendedAttributes>

<ExtendedAttribute Name="StartOfWorkflow" Value="Participant_Repository_Par10;Business_Example_Wor2_Act2;128;70;NOROUTING"/>

<ExtendedAttribute Name="EndOfWorkflow" Value="Participant_Repository_Par10;Business_Example_Wor2_Act4;527;70;NOROUTING"/>

<ExtendedAttribute Name="ParticipantVisualOrder" Value="Participant_Repository_Par10;"/>

</ExtendedAttributes>

</WorkflowProcess>

</WorkflowProcess>

解释如下:

这个流程只有两个活动:

1、<Activity Id="Business_Example_Wor2_Act2" Name="ask customer for partial shipment">

询问用户时候需要分装运输

2、<Activity Id="Business_Example_Wor2_Act4" Name="notify sales">

告诉客户销售

两个活动的转移:

<Transition From="Business_Example_Wor2_Act2" Id="Business_Example_Wor2_Tra23" Name="Transition" To="Business_Example_Wor2_Act4">

上面的描述只是一个基本的XPDL的实现,在现实世界里所需要的信息是不充分的。

比如:

1、 当用户A登陆后,需要知道和用户A相关的那些活动已经启动,并提示用户A,操作这个活动。这样在实例化的流程中需要包含参与者的信息。

2、 上面的描述中只是包含了工作流本身的信息,很显然,工作流任务执行的具体最后要落实在业务过程上,那么在实例化后的工作流中应该包含业务的数据,最少应该包含能够找到这个业务的连接数据。

3、 工作流具体的状态业务状态在实例化的流程中应该保存起来。

从上面的对比中可以看出,工作流引擎对如何实例化工作信息和业务信息应该是不同的,因为这并不是WMFC规范中的内容。

待续

田春峰

accesine@163.com

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有