parallel desktop,delayed并行问题求助

上传用户:worjrabhmz资料价格:5财富值&&『』文档下载 :『』&&『』学位专业:&关 键 词 :&&&&&&&&&&权力声明:若本站收录的文献无意侵犯了您的著作版权,请点击。摘要:(摘要内容经过系统自动伪原创处理以避免复制,下载原文正常,内容请直接查看目录。)跟着古代旌旗灯号处置技巧的赓续成长,所需处置的旌旗灯号品种愈来愈多,情势愈来愈庞杂,对体系速度的请求也赓续进步。例如在雷达,通讯等旌旗灯号处置范畴,平日对滤波器的速度请求较高;而在一些如语音旌旗灯号处置等范畴,请求滤波器应有较年夜的阶数。这都请求所采取的滤波器要有高的处置速度,而在自顺应处置时,还应有快的收敛速度和小的稳态误差。在这类情形下,若何进步固定权值滤波器的处置速度和寻觅合适于结构疾速收敛的自顺应滤波算法和自顺应滤波器构造是以后工程界所面对的一个主要成绩。本文重要对固定权值的FIR/IIR滤波器高速构造和并行自顺应滤波算法和自顺应滤波器高速完成构造停止了研讨。重要任务归纳综合以下:1、设计了基于并行完成的FIR滤波器脉动阵构造。该构造既具有脉动阵构造的高 度流水线特征,又具有必定的并行性。与惯例的FIR滤波器脉动阵构造比拟, 该构造的脉动频率与体系的输出输入频率雷同,而惯例脉动阵构造的输出输入 频率低于脉动频率。与通俗的滤波器并行构造比拟,该构造具有高度的流水线 特征,使体系速度获得晋升,取得了高的数据吞吐率,同时体系功耗也获得降 低。2、小波变换在古代旌旗灯号处置中获得普遍的运用。但今朝的研讨年夜多集中在实际研 究范畴,对若何结构高速小波滤波器构造的研讨却不多。本文联合Mallat疾速 算法的特色,给出了一种小波分化和综归并行滤波器脉动阵构造,该构造可同 时完成滤波和上2或下2采样处置。文中进一步采取输出数据重排技巧,可只 应用一对滤波器来完成多级滤波,从而简化了体系设计,下降了硬件本钱。3、将实用于MA模子的基于多项式分化的并行关系式推行到ARMA模子。设计 了IIR滤波器并行构造和并行IIR滤波器脉动阵构造。与已有的IIR滤波器结 构比拟,并行脉动阵构造既具有高度流水线特征,又具有必定的并行特征;系 统的脉动频率与输出输入频率雷同,数据吞吐率高。4、剖析了并行自顺应滤波的道理。剖析注解关于并行自顺应滤波,其各子滤波器 权值的最优解与惯例自顺应滤波的维纳解在情势上是完整雷同的,分歧的地方仅 在于数据自相干矩阵和输出旌旗灯号与希冀旌旗灯号的相互关矢量的选择分歧。在此 基本上,本文提出了一种基于梯度的并行LMS算法,并剖析了该并行LMS算 法的机能。与惯例算法比拟,在包管算法收敛的条件下,并行LMS算法步长11冒只电寻抖蚁年夜学俗*学位任不因子的可选择规模更年夜:稳态时,体系的掉调量与惯例算法相当;且并行算法具有必定的去相干性。依据并行滤波道理,树立了三种并行滤波完成办法。当输出旌旗灯号有必定的相干性时,本文给出的三种并行办法的收敛机能均优于惯例算法;当输出不相干时,第三种办法的收敛机能仍优于惯例算法,而前两种并行办法的收敛速度与惯例算法相当;当步长因子进一步增年夜,惯例算法已不克不及收敛时,并行算法仍能很好地收敛。别的并行自顺应滤波的数据吞吐率也比常规自顺应滤波高。5、为了便于获得并行自顺应滤波的VLSI硬件构造,我们分离提出了并行延时LMS(PDLMS)算法和并行流水线 LMS(PPIPLMS)算法,并具体剖析了两种算法的机能。评论辩论了算法步长因子的选择规模和体系到达稳态时的掉调量等机能参数。仿真试验分离比拟了 PDLMS算法与惯例DLMS算法,PPIPLMS算法与惯例PIPLMS算法。经由过程比拟发明,PDLMS算法和PPIPLMS算法具有更快的收敛速度,包管算法收敛的条件下,具有更年夜的步长因子选择规模,且数据吞吐率比惯例算法高。6、联合 PDLMS算法和 PPIPLMS算法,分离设计了基于这两种算法的自顺应滤波器并行脉动阵构造。文中给出的基于并行算法的脉动阵构造无输入滞后效应,与基于惯例DLMS算法和惯例PIPLMS算法的脉动阵构造比拟,具有在雷同数据吞吐率前提下,体系脉动频率低的长处;并且在基于并行算法的构造中,因为流水线感化而引入的延时量的年夜小也比惯例算法对应构造少一半。这些构造上的长处使得本文给出的构造更合适于滤波器长度较长,数据吞吐率高,请求体系收敛速度快,跟踪才能强的运用场所。Abstract:Along with the ceaseless development of modern signal processing techniques, the disposal of signal of an increasing variety, situation is becoming more and more complex, the request of system speed also rise ceaselessly. For example, in radar and communication signal, disposal category on weekdays to filter the
and in some such as speech signal processing and other fields, request filter should be more of the eve of the order. All requests are taken by the filter to have a high processing speed, and in the self adaptation disposal, but also due to fast convergence speed and small steady-state error. Under this kind of situation, how to improve the weights of the filter processing speed and looking for suitable in structure of rapid convergence of adaptive filtering algorithm and auto adapted filter structure is after the engineering sector faced a major achievement. In this paper, we study the high speed construction of the fixed weight FIR/IIR filter and the parallel adaptive filter algorithm and the high speed construction of the self adaptive filter. The main tasks are summarized as follows: 1. The structure of FIR filter systolic array based on parallel completion is designed. The structure has the characteristics of high degree of the structure of systolic array, and it has a certain degree of parallelism. Compared with the usual practice of the FIR filter, the structure of the pulsation frequency is similar to that of the system, and the output frequency of the input frequency is lower than that of the pulse frequency. Compared with the popular filter parallel structure, the structure has a high degree of pipeline characteristics, so that the system speed is promoted, and achieved a high data throughput, while the system power consumption is also low. 2, wavelet transform is widely used in the signal processing. However, at present, most of the research focuses on the actual research field, and the research on how to construct high speed wavelet filter is not much. In this paper, combined with the characteristics of Mallat fast algorithm, this paper presents a wavelet differentiation and the structure of the parallel filter systolic array, which can be completed in the same time filter and 2 or 2 sampling. In this paper, the output data rearrangement technique is adopted, which can only use a pair of filters to complete the multilevel filter, which simplifies the design of the system and decreases the cost of hardware. 3, will be applied to the MA model based on the polynomial differentiation of the parallel relationship to the ARMA model. Design the parallel structure of the IIR filter and the structure of the parallel IIR filter systolic array. Compared with the existing IIR filter structure, the parallel systolic array has both highly pipelined and parallel features, and the system has the same pulse frequency and the output input frequency, and the data throughput is high. 4, analysis of the principle of parallel self adaptation filter. Analysis and comment on parallel adaptive filter, the filter weights of the optimal solution and practice adaptive Wiener solution in the situation is complete the same and differences only in data autocorrelation matrix and the output signal and hope signal interaction vector selection differences. In this paper, a parallel LMS algorithm based on gradient is proposed, and the performance of the parallel LMS algorithm is analyzed. With the conventional algorithm compared under the conditions to ensure convergence of the algorithm, parallel step size LMS algorithm 11 take electric search ant shake of the eve of the popular science * degree either factor can be more of the eve of the scale selection: steady state, the system of down regulation and practice Al and parallel algorithm has certain to dry. According to the principle of parallel filter, three parallel filtering methods are set up. When the output signal has a certain coherence, this three parallel approach to the convergence function are better than the co when the output is incoherent, a third way of convergence performance is better than the conventional algorithm, while the former two parallel measures the rate of convergence and the practice algo when the step factor further enlargement, customary algorithm cannot converge, parallel algorithm can still converge very well. The data throughput rate of other parallel adaptive filtering is higher than that of the conventional self adaptation filter. 5, in order to obtain a parallel adaptive filter VLSI hardware structure, we isolated proposed parallel delayed LMS (PDLMS) algorithm is proposed and a parallel pipelined LMS (PPIPLMS) algorithm, and analyzes in detail the performance of two algorithms. The selection of the step size factor of the algorithm is discussed, and the parameters such as the size of the system to reach the steady state are discussed. Simulation experiments are compared with the PDLMS algorithm and the regular DLMS algorithm, PPIPLMS algorithm and PIPLMS algorithm. Through the process of analogy method, has faster convergence speed PDLMS algorithm and PPIPLMS algorithm, to ensure convergence of the algorithm under the condition of, with more of the eve of the step factor selection, scale, and data throughput rate is higher than the conventional algorithm. 6, combined with the PDLMS algorithm and PPIPLMS algorithm, the design of a parallel systolic array structure based on these two algorithms is designed. Presented in this paper based on the parallel algorithm of systolic array structure no input lag effect, and based on practice DLMS algorithm and practice PIPLMS algorithm of pulse array structure match, with strengths in the same data throughput under the premise, the low pulsation fre and in the construction of the parallel algorithm based on, the amount of delay caused by pipeline effect Nianye small than conventional algorithm constructed corresponding to less than half. These structural strengths make目录:中文摘要4-6英文摘要6第一章 绪论12-21&&&&1.1 并行处理和脉动阵结构设计的发展与现状12-14&&&&1.2 高速并行滤波算法和滤波器结构研究现状14-18&&&&1.3 本文主要工作18-21第二章 FIR滤波器并行脉动阵结构21-47&&&&2.1 引言21-22&&&&2.2 基于多项式分解并有FIR滤波器22-28&&&&&&&&2.2.1 数字多项式信号并行表示22&&&&&&&&2.2.2 FIR滤波器系统功耗22-23&&&&&&&&2.2.3 FIR滤波器并行结构23-25&&&&&&&&2.2.4 减少乘法单元个数的FIR滤波器并行结构25-28&&&&2.3 FIR滤波器并行脉动阵结构28-40&&&&&&&&2.3.1 常规的FIR滤波器脉动阵结构28-30&&&&&&&&2.3.2 FIR滤波器的并行脉动阵结构30-35&&&&&&&&2.3.3 并行脉动阵结构与常规脉动阵结构性能比较35-38&&&&&&&&2.3.4 脉动阵结构的数据吞吐率38&&&&&&&&2.3.5 应用举例38-40&&&&2.4 基于FIR滤波器并行脉动阵的一种小波分解滤波器并行结构40-45&&&&&&&&2.4.1 离散小波分解的快速算法40-43&&&&&&&&2.4.2 一种适合于小波塔式分解和重构的并行FIR滤波器脉动阵结构43-44&&&&&&&&2.4.3 实验仿真44-45&&&&2.5 本章小结45-47第三章 基于多项式分解并行IIR滤波器47-58&&&&3.1 引言47&&&&3.2 IIR滤波器并行实现47-50&&&&3.3 一种新的IIR滤波器并行脉动阵结构及其改进结构50-56&&&&&&&&3.3.1 IIR滤波器常规脉动阵结构51-52&&&&&&&&3.3.2 IIR滤波器并行脉动阵结构52-55&&&&&&&&3.3.3 IIR滤波器脉动阵结构性能分析55-56&&&&3.4 实验仿真56-57&&&&3.5 本章小结57-58第四章 FIR滤波并行自适应算法58-77&&&&4.1 引言58&&&&4.2 并行自适应滤波及其LMS算法58-64&&&&&&&&4.2.1 并行自适应滤波58-61&&&&&&&&4.2.2 基于梯度的并行LMS算法61-62&&&&&&&&4.2.3 算法步长因子的选择62-64&&&&4.3 算法性能分析64-67&&&&&&&&4.3.1 收敛时间64-65&&&&&&&&4.3.2 失调量65-67&&&&4.4 几种并行自适应LMS算法实现方法67-69&&&&4.5 实验仿真69-76&&&&4.6 本章小结76-77第五章 并行延时LMS(PDLMS)算法及并行流水线LMS(PPIPLMS)算法77-101&&&&5.1 引言77&&&&5.2 DLMS算法和PIPLMS算法77-82&&&&&&&&5.2.1 DLMS算法77-81&&&&&&&&5.2.2 PIPLMS算法81-82&&&&5.3 并行DLMS算法82-88&&&&&&&&5.3.1 算法原理82-83&&&&&&&&5.3.2 性能分析83-88&&&&5.4 并行PIPLMS算法88-92&&&&&&&&5.4.1 算法原理88-89&&&&&&&&5.4.2 性能分析89-92&&&&5.5 实验仿真92-100&&&&5.6 本章小结100-101第六章 自适应滤波器脉动阵结构101-115&&&&6.1 引言101-102&&&&6.2 基于PDLMS算法的自适应滤波器脉动阵结构102-109&&&&&&&&6.2.1 基于DLMS算法的脉动阵结构102-105&&&&&&&&6.2.2 基于PDLMS算法的脉动阵结构105-109&&&&6.3 基于PPIPLMS算法的自适应滤波器脉动阵结构109-114&&&&&&&&6.3.1 基于PIPLMS算法的脉动阵结构109-111&&&&&&&&6.3.2 基于PPIPLMS算法的脉动阵结构111-114&&&&6.4 本章小结114-115第七章 工作总结与展望115-118&&&&7.1 工作总结115-117&&&&7.2 展望117-118致谢118-120参考文献120-133博士学习阶段(合作)撰写与发表的主要论文133-134博士学习阶段参加的科研项目134分享到:相关文献|工作流模式的学习与总结 - SUNJUNLIN - 博客园
参考资料:
百度百科工作流
工作流(Work Flow)就是工作流程的计算模型,即将工作流程中的工作如何前后组织在一起的逻辑和规则在计算机中以恰当的模型进行表示并对其实施计算。工作流要解决的主要问题是:为实现某个业务目标,在多个参与者之间,利用计算机,按某种预定规则自动传递文档、信息或者任务。
简单地说,工作流就是一系列相互衔接、自动进行的业务活动或任务。我们可以将整个业务过程看作是一条河,其中流过的河水就是待审核的表单。
WF工作流包含两种类型的工作流:顺序工作流和状态机工作流。
顺序工作流提供了一系列有组织的步骤,一般情况下,步骤是逐一执行的。可能有的步骤需要等待某些事件的发生才可以继续执行,但通常情况下顺序工作流一般用于无需人工干预的操作。
状态机工作流提供了一系列的状态。工作流从初始状态开始,到终止状态结束。两个状态之间定义行为进行过渡。通常情况下,状态机工作流对事件作出反应,事件的发生将会使状态发生改变。
工作流的具体应用
1.关键业务流程:订单、报价处理、采购处理、合同审核、客户电话处理、供应链管理等
2.行政管理类:出差申请、加班申请、请假申请、用车申请、各种办公用品申请、购买申请、日报周报等凡是原来手工流转处理的行政表单。
3.人事管理类:员工培训安排、绩效考评、职位变动处理、员工档案信息管理等。
4.财务相关类:付款请求、应收款处理、日常报销处理、出差报销、预算和计划申请等。
5.客户服务类:客户信息管理、客户投诉、请求处理、售后服务管理等管理等。
6.特殊服务类:ISO系列对应流程、质量管理对应流程、产品数据信息管理、贸易公司报关处理、物流公司货物跟踪处理等各种通过表单逐步手工流转完成的任务均可应用工作流软件自动规范地实施。
工作流的审批模式
审批流程设置分为两种模式:传统模式和比例计算模式
  传统模式是指对审批流程的每个节点设定相应审批人,只有当该节点上的所有人员都通过审批请求后,才可以进入下一个节。
比例计算模式:对于每个审批流程,在建立时先要为其设定一个介于0-100%之间的通过比例,惟有最终的审批结果等于或大于该比例,该审批才可被认为通过。
工作流的分类
Basic Control Flow Patterns
1. 2. 3. 4. 5. (简单合并)
Sequence、AND-split(Parallel Split)、AND-join(Synchronization)、XOR-Split(Exclusive Choice)、XOR-join(Simple Merge)。
1.顺序(Sequence)
A task in a process in enabled after the completion of a preceding task in the same process.工作流中的各个活动在同一个进程中按顺序依次执行。例子:在"发送货物"之后"发送单据"。
1. 理论模型
  这个理论模型十分简单,只是一个工作单元完成了,紧接着无条件执行下一个工作单元。每一个工作流系统都直接实现了这种模式,这个模式是工作流能运行的一个重要基石。
   这个模式清楚明白,但是应用却最为广泛。比较有趣的是许多不同形式的分支,在业务的实践中都可以退化成为顺序模式。如果一个工作单元 A 以后能产生 B、C 并发,则可退化成A、B、C顺序执行;合并的情况亦然。
  不过很显然,分支模式退化成顺序模式,是一种实际操作效率较低的做法。在我遇到过的主要有两种情况会这样做:首先可能是流程设计者的水平不足,其思考走直线不会转弯;其次也有工作流系统无法实现复杂分支的情况,或者实现的代价很高。
而这样做带来的结果就是客户不得不改变自己原有的业务流程,而这种退化性的变更通常是让这个业务流程跑得更慢。但是开发方却很轻易的避开了一些高难度的实现,以及系统实施遇到挫折的时候,可以让责任轻易的转嫁到客户流程再造的失败上面。
在同一流程中,一个任务在另一任务完成后才能被激活。
顺序路由,串行路由。
·任务"发送账单"在任务"发送货物"之后才能执行。
在检索到客户端文件后才能计算保险索赔。
任务"累计航行里程"在任务"预订航班" 后才能执行。
顺序模式用于对工作流程中连贯的步骤建模,所有的工作流管理系统都支持该模式。
There is one context condition associated with this pattern: an instance of the Sequence pattern cannot be started again until it has completed execution of the preceding thread of control (i.e. all places such as p1 in the Sequence must be safe).
这个模式要注意的相关条件:一个顺序模式实例直到之前的控制线程完全结束了,才能再次启动。
The verify-account task executes after the credit card details have been captured.
The codacil-signature task follows the contract-signature task.
A receipt is printed after the train ticket is issued.
验证身份的任务必须在得到所以身体证信息之后才能执行。
codacil-signature 在contract-signature之后执行;
火车票收到后打印收据;
2. 平行拆分(Parallel Split)
The divergence of a branch into two or more parallel branches each of which execute concurrently. 工作流中从一个线程中的一个点拆分为在多个线程中平行执行的多个活动。例子:活动"付款"激活了"发送货物"以及"通知顾客"的执行。
值得注意的是这个定义来说一般B与C之间是并发的,实现上一般是两个不同的线程/进程。据我所知,许多自开发工作流引擎的公司,至今仍然不存在这一种AND的并发分支概念,而且这样的情况还不少。有兴趣的读者可以去了解一下,绝大部分电子政务的许多审批流程都是基于顺序和条件选择的,"并联审批"这一种说法极少用到。
在流程中,需将单进程的某控制点分成可并行执行的多进程控制,于是允许任务同时执行或以任何顺序执行。
与分支,并行路由, 分叉。
任务"付款"的执行,使得任务"装船"和"通知客户"同时执行能够。
注册"保险索赔"后,两个并行子流程被触发:一个是"校核顾客符合的条款",另一是评估实际损害。
所有的工作流引擎都可能支持并行任务。可区分两种基本的方法:显性与分叉和隐性与分叉。支持显性与分叉结构的工作流引擎(诸如:Visual Workflo)可定义一激活即使能的有多个流出转移的路由选择节点。支持隐性与分叉的工作流引擎(如MQSeries/Workflow) 不提供特殊的路由选择结构――每个任务可有多于一个的流出转移,且每个转移都有相关条件。为达到并行执行的目的,流程设计者须保证流出转移的多个相关条件为真(典型的方法是将条件置为空)。
3. 同步(Synchronization)
The convergence of two or more branches into a single subsequent branch such that the thread of control is passed to the subsequent branch when all input branches have been enabled工作流中的多个活动在一个点上汇合成一个线程。
The despatch-goods task runs immediately after both the check-invoice and produce-invoice tasks are completed.例子:活动"归档"在"发票"和"收款"全部完成后被激活。
存在三种情况,但是必然是同时触发的:
A先到,B后到,一起触发;
B先到,A后到,一起触发;
AB同时到,一起触发;
这一模型也较为简单,其中合并方式是等待所有的分支都完成了,在进行下一步的任务。 注意,在并发的语义下,可以明显的看到合并后的工作单元和合并前的工作单元,是一个"同步"的关系,因此这一模式的名字,应该是采用了计算机方面的惯用语。这点后面一些模式的名字可能还会看到这种惯用语,譬如 Thread、Instance 等等。
流程中,多个并行子流程/任务在某点汇聚成一个单进程,从而同步多个进程。
与结合,结合,同步。
任务"存档"在"送票"和"收费"两个任务完成后才能使能。
"保险索赔"在"核定条款"和"估算实际损伤"后才能计算。
本模式极易为所有支持并行运行的工作流引擎所支持。值得注意的是,对于某些实现,"与连接"的错误应用可能易于造成死锁。
所有可用的工作流引擎支持本模式。典型的是具有可用的同步结构。在某些罕见的情形下,通过对一个多入口的任务定义特殊的开始条件实现同步。
当具有显性的同步结构时,典型的特征是同步器应具有多于一个入口,却只有一个出口。例如,若任务C之前有一以任务A和任务B为输入的同步器,如果已有任务A的实例,当它执行完毕时,同步器将不作处理,而是等待任务B的实例的终止。 另一方法是,在等待任务B时,简单地明了任务A的"额外"实例的数目,然后用相应的任务B的实例匹配它们。
4. 排他选择(Exclusive Choice)
The divergence of a branch into two or more branches such that when the incoming branch is enabled, the thread of control is immediately passed to precisely one of the outgoing branches based on a mechanism that can select one of the outgoing branches.
工作流中的一个点,基于决定或者工作流中的数据,流向若干个分支中的一个。
需要注意的是这个"排他"性,只能选择其中一个分支,另外一个分支将不会走下去。一般来说,这个模式的实现一般为在运行时的条件选择,就是条件判断的代码放到XOR 这个结点,然后去根据这些代码去判断下一步的走向。
异或分叉, 条件路径, 开关, 决议。
任务"计算赔偿金"后继是两个任务"支付赔偿金"和"联系顾客"中的任一个。
1.类似于"并行分叉",有两种基本策略――某些工作流引擎提供显性的结构以实现"排他选择"模式 (譬如Staffware, Visual WorkFlow), 但是在其它工作流引擎 (MQSeries/Workflow, Verve)中,流程设计者不得不选择转移条件仿效"排他选择"。
5. 简单合并(Simple Merge)
The convergence of two or more branches into a single subsequent branch such that each enablement of an incoming branch results in the thread of control being passed to the subsequent branch.
A或B完成后,C被激活,不用考虑同步的问题。
XOR-join,这一模式就是只有一个分支接受,遵循先到先得的原则。只要 A 或 B 任何一个完成,那么 C 就执行。这里遗留了一个问题,如果前面是AND分支,那么剩下后执行的那个结点怎么办呢?这里涉及到了流程设计的实际应用问题,后面讲到其它 join 模式的时候,会更详细的讨论这一个问题。
The Simple Merge pattern provides a means of merging two or more distinct branches without synchronizing them. As such, this presents the opportunity to simplify a process model by removing the need to explicitly replicate a sequence of tasks that is common to two or more branches. Instead, these branches can be joined with a simple merge construct and the common set of tasks need only to be depicted once in the process model.
简单合并模式提供一种方法合并两个或者多个不同的分支,而不用进行同步。
After the case-payment or provide-credit tasks, initiate the product-receipt task.
在case-payment 或者provide-credit之后,开始product-receipt任务。
在流程中某点,需将两个或更多可选分支聚合而不同步;换言之,"合并"在任一入口连接触发时被触发。
异或连接,,异步连接,合并。
任务"存档索赔"在任务"支付赔偿金"和"联系顾客"任一之后使能。
其他工作流模式,这些模式属于比较高级的应用,一般很少用到:
Advanced Branching and Synchronization Patterns
何以将这些模式叫"高级"呢?因为从这些模式开始,在技术水平上就把各种工作流产品拉开了距离。因为技术上实现的复杂性,所以许多工作流产品/标准都不一定能直接支持,甚至有些产品无法描述这些流程模式。如果一些研究过早期工作流模式的朋友,可能会发现没有了 Synchronizing Merge 这种模式,因为现在已经被拆分为三个模式:Structured Synchronizing Merge、Acyclic Synchronizing Merge 和 General Synchronizing Merge。
6. 7. 8. 9. 28. 29. 30. 31. 32. 33. 37. 38. 41. 42.
6.Multi-Choice
简单的理解:这种流程主要是体现多选择性,灵活性,从or出来可以是单个的B,C为空;也可以是单
个的C,B为空;还可以是B,C都有;有三种情况。
这个模式的初衷是可以让使用者任意选择后趋的路径,若选择了两个或以上的后续路径,则是产生并发运行的分支。细心的可能会发现,这个模式是 XOR-split、AND-split 更为泛化的一个模式(所谓的"泛化",是概括、继承的意思)。
排它模式采取的是只有一个可选项被选定并执行,亦即它对应于排它或。有时,要用到从给定的一组选项中选定多项(而非一项)的结构,于是,引入(非排它)多重选择。
在工作流过程的某点,依据判定或工作流控制数据,选择一个或多个分支。
条件路径,选择, 或分叉。
执行任务evaluate_damage之后任务contact_fire_department或contact_insurance_company被执行,至少其中之一被执行,但是,也可能两者都被执行。
很多工作流管理斜体中,转移上可以定义条件。这些系统中可直接实现OR-分叉,但是有几种工作流管理系统不能在转移上设置条件,仅提供纯粹的AND-split和XOR-split建模元素 (例如Staffware).。
正如所述,对于可在转移上设置条件的工作流管理系统 (诸如Verve, MQSeries/Workflow, Forte Conductor)实现多重选择是直截了当的,流程设计者只需简单地设定每一转移的条件即可。值得注意的是多重选择是并行分叉和排它选择的泛化。
多重选择的实现需要将并行分叉和排它选择二者结合起来。每一可能的分支由一前置的异或分叉基于控制数据决定,或者激活该分支,或者跳过它。所有异或分叉由一与分叉激活,该与分叉也可用于设置异或分支所用的控制数据。
另一与上述方案类似的方案是颠倒与分叉和异或分叉的结构顺序。每组可激活的并行分支,加入一与分叉。所有与分叉由一前置的异或分叉激活适当的与分叉。注意并非所有的分支组合可行的。所以本方案将导致简单的工作流定义。
7.Structured Synchronizing Merge
 首先这个分支的合并,需要了解上下文的关系。前面若是只产生了 A 分支,那么来到这里只需要 A 分支就可以触发后躯,B 分支亦然。若是 A、B 分支是并发的,那么注意标题中"Synchronizing"的字眼,这个合并必须等待 A、B 分支都完成了才能触发后躯 C。这个模式要看前面多重选择出来的分支是单个还是多个,如多个必须得进行同步,B和A同时满足,这个合并必须等待 A、B 分支都完成了才能触发后躯 C。
  顺便提到这一个"Structured"的字眼,在后续的工作流模式里面会常看到。遇到这个字眼多少意味着带有点条件判断的味道。就这个模式本身不能独立的决定合并方式,需要根据上下文的信息来适应不同的情况变化(如:这一个模式需要知道前面的 OR-Split 结点如何分支才能决定合并方式)。
现代的工作流产品很容易处理多路选择模式。不幸的是,对应于合并(Or-Join)结构的实现却极度困难。OR-join应具有同步并发流及合并可选流的功能。困难在于决定何时同步,何时合并。同步可选流导致可能的死锁,合并并发流可能导致不期望的任务多重执行。
流程中某点多条路径聚合成一个线程,若多于一条路径触发,则活动线程需同步;若仅有一条路径触发,则可选分支应再收敛,无需同步。
拓展多重选择模式中的例子,任务contact_fire_department 及contact_insurance_company 任一或二者都完成后(取决于它们是否都不执行),任务submit report 需完成 (仅一次)。
本模式的主要困难在于决定何时同步,何时合并。同步可选流导致可能的死锁,合并并发流可能导致不期望的紧接标准OR-join结构的任务的多重执行。
已知有两种工作流引擎MQSeries/Workflow 和InConcert中直接实现了这个模式。正如前面提及的,若一同步合并后接一OR-split,该 OR-split可触发多于一条流出转移,不必等到运行时方知同步是否应该发生。
在其它工作流引擎中未直接实现本模式。通常的作发是避免明显地使用可能触发多条流出转移的OR-split,而代之以一个AND-splits和XOR-splits的联合。该方法可轻易地使用AND-splits和XOR-splits结构同步相应分支。
多重合并主要有以下几种情况:
B先完成,触发D1,C后完成,触发D2,触发D完毕,结束;
C先完成,触发D1,B后完成,触发D2, 触发D完毕,结束;
BC同时到达,同时触发D,触发D完毕,结束;(说明:实际中却不存在同时完成的情况,计算机处理总有先后次序。)
注意,当 A、B 分支到达这个合并结点的时候,并不是合并,而是继续相同的后续分支。如 A 先完成,那么就触发 C1(这里要区别一下,第一次触发这个 C 我们称之为 C1),然后 B 完成后,再触发C2(第二次触发的 C 叫 C2)。所以实际上是触发了两次 C。按照理论模型来讲,及时 A、B 同时完成,仍然触发两个 C,但实际中却不存在同时完成的情况,计算机处理总有先后次序。
多路合并是指在流程中某点,两条或更多分支无同步再收敛。若多于一个分支被激活,可能同时被激活,任务后的合并对于每条流入的激活分支都响应一次(亦即,在上图中,D将被实例化两次)。
有时两个或更多并行的分支共享一个终点。此类情况的翻版是(可能复杂的)流程中每一分支可用一个多路合并。一个简单的例子是两个并行运行的任务audit_application及process_application ,二者都后接任务close_case.。
大多数工作流引擎 (诸如Staffware, HP Changengine, I-Flow)若一个任务的第一个实例仍在运行时,将不产生第二个实例。Verve Worflow 和Forte Conductor例外。
如果多路合并不是循环(loop)的一部分, 作为一个任务不能创建多于一个实例的语言的通用设计模式是在工作流模型中复制该任务。如果多路合并是循环(loop)的一部分, 典型的情况是多路合并其后所接的任务的数目在设计(建模)时未知。关于这个问题的典型方案,见有关多实例模式。
这个模式处理的方式主要有三种:
A、B 分支同时执行的情况,如AND-split 使得 A、B 并发,同时到达Discriminator
B先到达Discriminator,C后到达,则C不执行
C先到达Discriminator,B后到达,则B不执行
这种模式只处理 A、B 分支同时执行的情况,最直接的上文是采用 AND-split 使得 A、B 并发执行。这里 A、B 执行,若 A 先完成,则触发后躯结点 C,然后 B 完成以后,则到了这个 Discriminator 后就忽略其执行结果。反之亦然。
路径鉴别器是指在流程的某点,激活后续任务之前等待许多流入分支的完成。从它开始之时起,等待所有剩余分支的完成并"忽略"它们。一旦所有的流入分支都被触发,它使自己复位,以便可被再次触发
一篇论文需被送给外部审阅者。如果两个评价皆为正,则论文被接受;如果第一个评价为负,应提示作者,不必等待第二个评价。
为缩短查询响应时间, 一个复杂的查询通过internet被送往两个数据库。第一个给出结果后流程将继续流转,第二个结果将被忽略。
一些工作流引擎(如Staffware, HP ChangeEngine, I-Flow),若任务的第一个实例仍在运行,则生成该任务的第二个实例。然而,这不能提供一个路由鉴别解决方案,因为只要该任务的第一个实例完成,第二个实例将被创建。
Verve中有一个特殊的结构实现路由鉴别语义。
支持定制触发器的产品可实现路由鉴别功能(详见M中选N)
所有其它的工作流引擎很难或无法实现路由鉴别功能。通用的设计模式是采用取消任务模式。只要路由鉴别后接任务的第一个实例被创建, 仍未完成的流入分支的任务可被取消,如此第二个实例将不会被创建。模式见下图。本方案的问题是若任务B和C同时完成, 任务D 可能仍将执行两次。此外, 路由鉴别的原有语义是允许B 和C 都完成。本方案任务B 或C 将被取消。
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/simonezhlx/archive//1584275.aspx
28. 阻塞鉴别
The convergence of two or more branches into a single subsequent branch following one or more corresponding divergences earlier in the process model. The thread of control is passed to the subsequent branch when the first active incoming branch has been enabled. The Blocking Discriminator construct resets when all active incoming branches have been enabled once for the same process instance. Subsequent enablements of incoming branches are blocked until the Blocking Discriminator has reset.
在完成一个任务之前必须等到前面的一个完成,这时会发生一定的阻塞。
一旦确认代表团抵达或安全检查任务完成,该任务可以开始检查证件。虽然这两个任务可以同时执行在实践中,在确认代表团抵达任务总是完成任务前的安全检查。如果前一个实例的任务尚未完成,另一个检查凭据任务实例不能启动。同样,如果在支票上的实例有凭据的任务尚未完成,确认代表团抵达和安全检查任务的后续实例无法启动。
29 (Cancelling Discriminator)取消式鉴别
The convergence of two or more branches into a single subsequent branch following one or more corresponding divergences earlier in the process model. The thread of control is passed to the subsequent branch when the first active incoming branch has been enabled. Triggering the Cancelling Discriminator also cancels the execution of all of the other incoming branches and resets the construct.
抽样任务完成后,部分样品被送到三个不同的实验室检验。一旦这些实验室首次完成了采样分析,另外两个任务实例被取消和审查工作开始。
30.Structured Partial Join 结构化的部分参与
The convergence of two or more branches (say m) into a single subsequent branch following a corresponding divergence earlier in the process model such that the thread of control is passed to the subsequent branch when n of the incoming branches have been enabled where n is less than m. Subsequent enablements of incoming branches do not result in the thread of control being passed on. The join construct resets when all active incoming branches have been enabled. The join occurs in a structured context, i.e. there must be a single Parallel Split construct earlier in the process model with which the join is associated and it must merge all of the branches emanating from the Parallel Split. These branches must either flow from the Parallel Split to the join without any splits or joins or be structured in form (i.e. balanced splits and joins).
一旦前面的三项支出审批的两项任务已完成,触发发行支票的任务。在允许发行支票任务再次触发之前,等待直到剩下的任务完成。
31 (Blocking Partial Join)
The convergence of two or more branches (say m) into a single subsequent branch following one or more corresponding divergences earlier in the process model. The thread of control is passed to the subsequent branch when n of the incoming branches has been enabled (where 2 = n & m). The join construct resets when all active incoming branches have been enabled once for the same process instance. Subsequent enablements of incoming branches are blocked until the join has reset.
与上面不同的是,当BCD到达join之后,会在之前的and join做一个阻塞,直到这个join被重设之后再次进来分支。
When the first member of the visiting delegation arrives, the check credentials task can commence. It concludes when either the ambassador or the president arrived. Owing to staff constraints, only one instance of the check credentials task can be undertaken at any time. Should members of another delegation arrive, the checking of their credentials is delayed until the first check credentials task has completed.
当访问代表团队的第一个成员到达时,查证开始。在这里我们假设时任总统到达,所以人手不够,只有一个查证实例运行。如果有另一个代表团队访问,检查他们的证会被推迟,直到第一个查证结束。
32 (Cancelling Partial Join)
The convergence of two or more branches (say m) into a single subsequent branch following one or more corresponding divergences earlier in the process model. The thread of control is passed to the subsequent branch when n of the incoming branches have been enabled where n is less than m. Triggering the join also cancels the execution of all of the other incoming branches and resets the construct.
当n个进入的分支开户,且n&m;
触发结点的同时取消执行其他进入的分支,并重设结构;
Once the picture is received, it is sent to three art dealers for the examination. Once two of the prepare condition report tasks have been completed, the remaining prepare condition report task is cancelled and the plan restoration task commences.
一旦收到相片,就会发送给艺术经销商检查,只要其中两个准备条件报告完成,剩下的准备条件报告就会取消,还有计划恢复任务就会启动。
33 (Generalized AND-Join)
广义的与联
The convergence of two or more branches into a single subsequent branch such that the thread of control is passed to the subsequent branch when all input branches have been enabled. Additional triggers received on one or more branches between firings of the join,persist and are retained for future firings. Over time, each of the incoming branches should deliver the same number of triggers to the AND-join construct (although obviously, the timing of these triggers may vary).
从A流进一个或者多个分支,在一个或多个被触发的结点之间,保持现有的triggers并保留用于将来的触发,随着时间推移,每一个分支都会传递同样数目的触发者到这个与联接。
当所有的GET董事签名的任务已经完成,运行完整的合同任务。积累引擎,底盘和车身部件从各生产线。当每个已收到,使用每个组件之一,组装车。
37 (Local Synchronizing Merge)本地化同步合并
The convergence of two or more branches which diverged earlier in the process into a single subsequent branch such that the thread of control is passed to the subsequent branch when each active incoming branch has been enabled. Determination of how many branches require synchronization is made on the basis on information locally available to the merge construct. This may be communicated directly to the merge by the preceding diverging construct or alternatively it can be determined on the basis of local data such as the threads of control arriving at the merge.
这个模式,主要注意:
The Local Synchronizing Merge provides a deterministic semantics for the synchronizing merge which does not rely on the process model being structured (as is required for the Structured Synchronizing Merge) but also does not require the use of non-local semantics in evaluating when the merge can fire.
本地同步合并提供一个可决定的语义给同步合并,相对结构化同步合并来说,不需要依赖进程结构模型,在合并被激活时,进行评价的过程中也不需要非本地化语义。
There are two context conditions associated with the use of this pattern: (1) once the Local Synchronizing Merge has been activated and has not yet been reset, it is not possible for another signal to be received on the activated branch or for multiple signals to be received on any incoming branch, i.e. all input places to the Local Synchronizing Merge (place p4 and p5) are safe and (2) the Local Synchronizing Merge construct must be able to determine how many incoming branches require synchronisation based on local knowledge available to it during execution
一旦本地化合并激活并且没有被重新启动,在被激活的分支中它不可能接收另一个信号,在进入的多个信号不可以被接收,所有输入的地方是安全的,在执行过程中,基于本地化的知识,本地合并结构必须可以决定需要同步多少进入分支。
你需要决定要进行同步的分支到底是哪个,是A,B,C?
Determination of how many branches require synchronization is made on the basis on information locally available to the merge construct
你还可以在后面推迟选择你要同步并流,还是不同步。
38 (General Synchronizing Merge)一般同步合并
The convergence of two or more branches which diverged earlier in the process into a single subsequent branch such that the thread of control is passed to the subsequent branch when either (1) each active incoming branch has been enabled or (2) it is not possible that any branch that has not yet been enabled will be enabled at any future time.
每一个活动的流进的分支都被激活,任何一个分支中还没激活的不可能在将来被激活。
provides an example of the General Synchronizing Merge pattern. It shares a similar fundamental structure to the examples presented in Figures
for the other forms of OR-join however the conditional feedback path from p4 to p1 involving F (which effectively embeds a "loop" within the process where cond3 evaluates to true) means that it is not possible to model it either in a structured way or to to use local information available to E to determine when the OR-join should be enabled.
下图提供一个例子给一般同步合并,分享一个相似其他的基础架构表现或联接,但是这个条件反馈路径:从p4到p1涉及到F(有效的嵌入一个循环),它意味着不可能模式化它,不管是从结构化方法,还是使用本地化有效信息到达E,来决定什么时候或联接应该被开户。
This pattern provides a general approach to the evaluation of the General Synchronizing Merge (or OR-join) in process. It is able to be used in non-structured and highly concurrent processes including process models that include arbitrary looping structures.
这个模式提供一个一般的方法来评价流程中一般同步合并(或者或联接),在包含任意循环的结构中非结构化和高并发的流程都可以用到。
41 (Thread Merge)线程合并
At a given point in a process, a nominated number of execution threads in a single branch of the same process instance should be merged together into a single thread of execution.
在一个流程给定的点中,指定数量的线程必须被合并才能继续执行。
There is one context consideration for this pattern: the number of threads needing to be merged (i.e. numinsts) must be known at design-time.
注意:要合并的线程数量必须在设计时就确定好。
Note that numinsts indicates the number of threads to be merged.
Numinsts指示要合并的线程数量。
Instances of the register-vehicle task run independently of each other and of other tasks in the Process Enquiry process. They are created as needed. When ten of them have completed, the process-registration-batch task should execute once to finalise the vehicle registration system records update.
在流程查检过程中,车辆注册实例独立于其他任务的完成,他们的创建是很多必要的,当其中10个完成时,批量注册流程会执行来确保记录升级。
42(Thread Split)
这种模式提供了一种在给定的触发流程实例沿着分支多个执行线程的方法。这是对线程合并格局,沿同一分支合并多个执行线程的对应。除非在与线程合并模式一起使用,线程将独立运行到结束。
At the completion of the confirm paper receival task, initiate three instances of the subsequent independent peer review task
Multiple Instance Patterns
12. 13. 14. 15. 34. 35. 36.
12 (Multiple Instances without Synchronization)
Within a given process instance, multiple instances of a task can be created. These instances are independent of each other and run concurrently. There is no requirement to synchronize them upon completion. Each of the instances of the multiple instance task that are created must execute within the context of the process instance from which they were started (i.e. they must share the same case identifier and have access to the same data elements) and each of them must execute independently from and without reference to the task that started them.
在一个给定的流程实例中,一个任务可以创建多实例。每个实例都相对的独立运行,也没有关必要在完成时同步。其中的各个实例必须执行
A list of traffic infringements is received by the Transport Department. For each infringement on the list an Issue-Infringment-Notice task is created. These tasks run to completion in parallel and do not trigger any subsequent tasks. They do not need to be synchronized at completion.
运输部门接收到了交通违例清单,对清单上的每个违例,启动了事务违例记录任务。这些任务并行的运行到结束,并且不会触发任何子任务。他们不需要实现同步。
Multiple Instances with a Priori Design-Time Knowledge
Within a given process instance, multiple instances of a task can be created. The required number of instances is known at design time. These instances are independent of each other and run concurrently. It is necessary to synchronize the task instances at completion before any subsequent tasks can be triggered.
给定一个进程实例,一个任务多实例被创建。在设计的时候就知道实例的数目。这些实例不互相依赖且独立运行。在任一子任务被触发前,这些实例任务在完成时需要被同步。
举例:年度报告必须在六个高层负责人签名之后才能发布。
Motivation
This pattern provides the basis for concurrent execution of a nominated task a predefined number of times. It also ensures that that all task instances are complete before subsequent tasks are initiatied.
该模式提供依据:指定一个并行执行的预定义的次数。同时也确定在子任务被激发起前所有任务实例结束。
任务实例的个数在设计时应该声明,并且是一个固定值。
流程中的某个任务可能乐于创建多个实例,其数目在设计模型时已知。
某种情形下,一个任务被激活多次,其指定任务在给定情况下实例的个数在设计时已知。
危险材料的申请单要求三次不同的审批。
若实例的个数在设计时已知,一个简单的处理方法是在模型中复制该任务,并结合使用并行执行模式
Pattern 14 (Multiple Instances with a priori Run-Time Knowledge)
Within a given process instance, multiple instances of a task can be created. The required number of instances may depend on a number of runtime factors, including state data, resource availability and inter-process communications, but is known before the task instances must be created. Once initiated, these instances are independent of each other and run concurrently. It is necessary to synchronize the instances at completion
before any subsequent tasks can be triggered.
在一个给定的进程实例,多个任务实例被创建。这些实例需要的数目可能依靠运行时的因子,包括状态数据,资源有效性和交叉进程交互,但是这些在任务实例被创建前必须知道。一旦开始,这些实例是独立于任意一个其他的实例并且并行运行。而且在其他分支的任务触发前,这些实例必须同步结束。
就是任务实例运行到一个阶段的时候,需要用户提供一定的知识,帮助实例向下执行。 具有交互式的特点。
When diagnosing an engine fault, multiple instances of the check-sensor task can run concurrently depending on the number of error messages received. Only when all messages have been processed, can the identify-fau
当诊断发动机故障时,多实例任务检测传感器任务并行执行,它依赖于接收的错误信息。只有当所有的信息完成接收后,才能开户定义故障的任务。
运行到一个阶段的时候,需要知道提供的信息,得以向下执行。
一个任务的实例个数是动态的,亦即在设计时未知,而在运行期间所有实例需被执行前的某点可获知其数目。可以将本模式看作一初始化该任务的For循环。
在某种情况下,任务可被激活多次,给定任务的实例数在指定情形下是一变量,取决于情况特征或资源的可用性, 但在运行期的某些阶段才已知, 即该任务的实例不得不被创建之前。
在将科学论文提交杂志审阅的流程中,任务review_paper被实例化几次取决于论文的内容、受托人的可用性, 以及作者的信任度。
对于多本书的订购过程, 任务check_availability 每本书都执行一次。
当预定旅行时, 任务book_flight 执行多次,若该旅程包含多个航程。
当申请审批包含多项,且每项需不同的人审批。
只有少数工作流管理系统提供指定情况下一个任务的多次激活。大多数系统不得不采取同一任务确定数目的并行实例,或者采用叠代(或重复)结构――其中任务串形处理。
可用任何适用的方案。
若存在可能的最大实例数, 则AND-split 和XOR-split 可用于获取期望的路径。一XOR-split用于选择实例的数目,并触发几个AND-splits之一。每一可能的实例数对应一个带有基数的AND-split。本方法的缺点是使得模型变得庞大且复杂,另为可能的最大实例数所限。
某些工作流引擎提供一特殊结构用于实例化一任务的给定数量的实例。例如MQSeries/Workflow 中的Bundle 。
正如很多情况下,期望的路由行为极易支持――使其更串形化。简单地利用叠代(重复)串形地激活任务的实例。假设任务A 后接任务B 的n个实例且后接任务 C,首先执行A,然后执行B 的第一个实例,每一B 的实例后接一XOR-split来确定需要另一B 的实例或者 C 为下一需执行的任务步。 本方法相当简单。可是,B的n 个实例是非并行执行的但以确定的次序,在很多情形下是无法接受的。请思考论文审阅的例子,显然,第二个审阅者不得不等待第一个审阅者完成审阅后才能审阅是无法让人接受的,等等。
Within a given process instance, multiple instances of a task can be created. The required number of instances may depend on a number of runtime factors, including state data, resource availability and inter-process communications and is not known until the final instance has completed. Once initiated, these instances are independent of each other and run concurrently. At any time, whilst instances are running, it is possible for additional instances to be initiated. It is neccesary to synchronize the instances at completion before any subsequent tasks can be triggered.
和上面有所不同的是,在运行时,并不需要给定的知识,而是可以任意添加实例。就是总会有意外的实例想要加入时,比较方便。特别是应对额外的任务实例。
The despatch of an oil rig from factory to site involves numerous transport shipment tasks. These occur concurrently and although sufficient tasks are started to cover initial estimates of the required transport volumes, it is always possible for additional tasks to be initiated if there is a shortfall in transportation requirements. Once the whole oil rig has been transported, and all transport shipment tasks are completed, the next task (assemble rig) can commence.
石油装备的发货从出厂到目的地涉及到众多的运输装货任务,这些都是同时进行的,虽然需要的运输量在一开始就估计好足够的任务,但在运输的过程中,如果有需要的差额要补充时,总是可能有额外的任务新增,一旦整个石油装备被运输完毕,所以的装货任务结束,下一个任务可以开始。
实例的数目是动态的,亦即实例数设计时不知,在运行期间,所有这些实例需要被激活前的任何阶段都无法知道。可将本模式看作是任务实例化的WHILE循环。
某种情况下任务可激活多次,然实例数设计时不知,在运行期间,所有这些实例不得不被创建之前的任何阶段都无法预知。
100台计算机的订单,然供货商数目未知。每一供货商交付的计算机数量未知,因之,交付的综述事先未知。每次交货后,通过比较已截止目前已交付的总数和需求数量来确定是否还有下次交易。
大多数工作流引擎不允许同一任务多于一个实例同时激活。
本模式的最简单实现是利用循环和并行分叉结构,只要工作流引擎直接支持多实例。在Forte 和Verve中是可行的。
某些工作流支持额外的结构使得设计器可创建子流程(subprocess 或subflow ),从主流程中分离且并行执行。例如, Visual WorkFlo 支持Release 结构、I-Flow 支持Chained Process Node.。
若工作流支持特殊的结构――孵化子流程, 那么可通过调用子流程――作为流程中任务的一部分。
同样运行时已知实例数的多实例模式,期望的路径行为通过使其有序执行极易支持
Pattern 34 (Static Partial Join for Multiple Instances)
Within a given process instance, multiple concurrent instances of a task (say m) can be created. The required number of instances is known when the first task instance commences. Once n of the task instances have completed (where n is less than m), the next task in the process is triggered. Subsequent completions of the remaining m-n instances are inconsequential, however all instances must have completed in order for the join construct to reset and be subsequently re-enabled.
在一个给定的进程实例里面,多个并行的任务实例(M个)被创建,当第一个任务实例开始的时候要知道需要实例数目。一旦N个任务实例已经完成(注意N小于M),在进程中下一个任务被触发,
举例:Examine 10 samples from the production line for defects. Continue with the next task when 7 of these examinations have been completed.
在检测中从生产线中测试10个样品,当7个这些检查完成后继续下一个任务。
注意:在运行控件流前,必须选择M,N,假设M=3,N=2,当运行到B,只要有两个C触发,小球进入D。
Pattern 35 (Cancelling Partial Join for Multiple Instances)
Within a given process instance, multiple concurrent instances of a task (say m) can be created. The required number of instances is known when the first task instance commences. Once n of the task instances have completed (where n is less than m), the next task in the process is triggered and the remaining m-n instances are cancelled.
和上面有点不同,在运行第一个任务实例时,需要知道有多少个实例,一旦任务完成,接下来的进程被触发,剩下的m-n实例被取消。
Run 500 instances of the Protein Test task with distinct samples. Once 400 of these have completed, cancel the remaining instances and initiate the next task.
Pattern 36 (Dynamic Partial Join for Multiple Instances)
Within a given process instance, multiple concurrent instances of a task can be created. The required number of instances may depend on a number of runtime factors, including state data, resource availability and inter-process communications and is not known until the final instance has completed. At any time, whilst instances are running, it is possible for additional instances to be initiated providing the ability to do so had not been disabled. A completion condition is specified which is evaluated each time an instance of the task completes. Once the completion condition evaluates to true, the next task in the process is triggered. Subsequent completions of the remaining task instances are inconsequential and no new instances can be created.
给定一个进程实例,多个并发的任务实例被创建。需要的进程数目依赖于运行时因子,包括状态数据,资源有效性和进程之间的通信,并且它是直到最后一个任务完成的时候才知道进程的数目。因为这是动态的,不确定的。在任意时间里面,只要实例在运行,就有可能新增额外的实例(如果没有设置成disabled).这个任务的实例指定一个完成的条件,每次都会被评估。一旦这个完成条件为真的时候,下一任务就会触发。随后剩下的任务实例不重要,并且不会产生新的实例。
The despatch of an oil rig from factory to site involves numerous transport shipment tasks. These occur concurrently and although sufficient tasks are started to cover initial estimates of the required transport volumes, it is always possible for additional tasks to be initiated if there is a shortfall in transportation requirements. Once 90% of the transport shipment tasks are complete, the next task (invoice transport costs) can commence. The remaining transport shipment tasks continue until the whole rig has been transported.
这个例子和17. 18. 39. 40.
Pattern 16 (Deferred Choice)
A point in a process where one of several branches is chosen based on interaction with the operating environment. Prior to the decision, all branches represent possible future courses of execution. The decision is made by initiating the first task in one of the branches i.e. there is no explicit choice but rather a race between different branches. After the decision is made, execution alternatives in branches other than the one selected are withdrawn.
在一个进程中有一点是:几个分支中其中一个是基于操作环境的交互。在决定之前,所有的分支代表将来可能执行的路线。在其中一个分支中通过发起第一个任务做出这个决定,没有明确的选择。在做出决定之后,其他备选方案被撤销。
At the commencement of the Resolve complaint process, there is a choice between the Initial customer contact task and the Escalate to manager task. The Initial customer contact is initiated when it is started by a customer services team member. The Escalate to manager task commences 48 hours after the process instance commences. Once one of these tasks is initiated, the other is withdrawn.
在解决投诉的进程,在客户联系和提交到经理两个任务中有一个选择。一旦选择其中一个,另一个被撤销。
流程某点几个分支中之一被选中,相对于XOR-split的是, 选择不是显性的 (例如基于数据或判定) 但有几个可选路径;然而,相对于AND-split, 仅有一个可选路径被执行。这意味着环境激活可选分支之一,其余分支忽略。请注意,重要的是该选择延期到可选分支之一确实启动之时, 亦即选择的时刻仅可能迟。
外部选择, 隐性选择(implicit choice.)
接收产品时有两条途径将产品运往部门,选择是基于相应资源的可用性,因之,选择延期到一个资源可用。
考虑任务send_questionnaire, 后接任务time_out 和process_questionnaire,任务time_out 要求一个时间触发器, 任务process_questionnaire 只在回复从接收方返回时执行(所以其执行需要一外部触发器)。明显地,在任务process_questionnaire 和time_out 作选择时应越迟越好。若这样的选择被建模成一个显性的XOR-split , 可能在回复表单到达是被拒收, 亦或若无回复返回时锁定流程。
很多工作流管理系统支持 XOR-split, 但不支持隐性 XOR-split。由于两个选择都是期望的, 缺乏隐性 OR-split 是一个实在的问题。
假设所用的工作流语言支持AND-split 和Cancel Activity 模式,隐性XOR-split可借助一AND-split激活所有可选分支实现。只要可选分支之一的处理开始,所有其它可选分支被取消。请考虑上图中在任务B 和C
之间的隐性选择,任务A之后, 激活任务 B 和C,只要B 被选中或执行,任务C 被取消(无它法)。请注意,该方法常常不可行,因为B 和 C 可被同时选中或执行。
解决此问题的另一方法是由一显性XOR-split代替隐性XOR-split,亦即增加一额外任务。所有触发器激活的可选分支被重定位到一新加的任务。假设任务可以在触发器之间区分, 则它可激活适当的分支。请注意,此方法将部分路由移入应用或任务(应用中的任务)层。
Pattern 17 (Interleaved Parallel Routing)交错并发路由模式
A set of tasks has a partial ordering defining the requirements with respect to the order in which they must be executed. Each task in the set must be executed once and they can by completed in any order that accords with the partial order. However, as an additional requirement, no two tasks can be executed at the same time (i.e. no two tasks can be active for the same process instance at the same time).
一组任务有一些预先定义的执行顺序,每个任务在这个组中必须执行一次,完成的次序取决于特定的次序。作为一个额外需求,没有两个任务在同一时间被执行。
When despatching an order, the pick goods, pack goods and prepare invoice tasks must be completed. The pick
goods task must be done before the pack goods task. The prepare invoice task can occur at any time. Only one of these tasks can be done at any time for a given order.
当执行一个订单的时候,挑选货物,包装货物,准备发票这些任务必须完成。包装货物前必须完成挑选货物。准备发票可以任何时候做。在给定的次序中,在这些任务中只有一个任务准备发票可以在任何时间内去完成的。
AND-split 和AND-join模式典型地用于定义并发路由。大多数工作流管理系统支持真正的并行, 亦即两个任务同时被执行。若这些任务共享数据或资源,真正的并行是不可能的或者导致紊乱,诸如丢失更新的数据或死锁。
一组任务的以任意顺序执行:组中的每一任务被执行, 执行顺序运行时决定, 没有两个任务在同一时刻执行 (亦即同一流程实例同一时刻没有两个任务活动。
无序串形。
海军要求每个工作申请必须进行两项测试: physical_test 和mental_test。这些测试可以任意顺序进行,但不能同时进行。
每年年终时,银行对每一帐户执行两项任务: add_interest 和charge_credit_card_costs。这些任务可以任意顺序执行,但是由于都要更新帐户数据,它们不能同时执行。
由于多数工作流管理系统支持并行执行――利用诸如AND-split 和AND-join这样的结构, 不可能定义交叉并行路由。
固定执行顺序,亦即将并行执行代之以串形执行。由于任务可以任意顺序执行,采用预定义执行顺序的方法是可以接受的。但是, 固定执行顺序, 就降低了柔性,且所有潜在的资源不能被利。
利用XOR-split 和Sequence的混合, 亦即确定几个可选次序,执行前通过一 XOR-split选择一个次序;缺点是开始执行前次序是确定的。然而, 工作流模型由于列举所有可能的次序而可能变得非常复杂和庞大。
通过利用延期XOR-Split (而非XOR-split),次序在执行前不必固定,亦即隐性OR-split 允许机动次序的选择。不幸的是, 模型中经常会包含一个空心粉条状的结构。
F对于基于Petri网的工作流模型, 任务的交叉须得强制加入一个位置――作为所有潜在并行任务输入及输出的地方。AND-split增加一个令牌到该处, AND-join从该处去除索价令牌。易见如此的位置实现了所要求的"互斥现象"。
里程碑(Milestone)
这个模式允许测试一个流程是否到达某一阶段。到达某些阶段时,就取消一些以前允许运行的任务。
任务节点的可用性取决于特定的状态条件,也就是说任务只有在某一里程碑已经达到并且还没有过期的时候才可被激活。假设有3个任务A,B,C,任务A只有在任务B已经被执行,并且C还没有被执行的情况下才被激活,亦即A在B执行前是不可被激活的,在C执行后A又是不可被激活的。
测试临界点,最终期限,状态条件
假设一个处理控告的流程,第一步,控诉材料被登记注册(register任务),然后平行的一个调查表发送给原告(send_questionnaire任务),同时控告材料需要进行评估(evaluate任务)。如果在2周内,原告送回了调查表,任务process_questionnaire 执行完成。如果在2周内,原告没有送回调查表,调查表的调查结果被放弃(任务time_out) 根据对控告材料的评估结果,决定是否受理。实际的控诉受理(process_complaint任务)必须等调查表被处理完成或者已经超时,才可以进行。对控告的处理结果需要通过check_processing任务的检查。最后归档任务(archive)被执行。
在一旅行社,航班机票、汽车租赁、旅馆等在发票还没有打印出来的时就可以预定。
一个顾客可以直到规定的交付日期前2天退掉其购买的商品。
一个顾客可以乘机6个月后向航空公司索赔。
这个问题与在延期选择模式中提到的问题很相似。在许多的任务之间这里有一个竞争,一些任务的执行会导致别的不能执行。注意,在控告登记例子中,任务 process_complaint 可被执行任意多次,也就是可能不执行process_complaint, 也可能执行多次。
假设有3个任务 A、B和 C,任务 A 在任务C执行前和任务B执行后可以执行任意多次。这样的里程碑可以用延期选择模式实现。任务B开始执行之后,可以设置一含有两个并行任务的延期选择:B、C,若B被执行完后,同样的延迟选项被激活。如果C执行完了,B被延迟选项设置成不起作用。注意,这种方法只有在B的执行不受别的并行线程控制的条件下才可以工作。例如,这种结构在控告登记例子里就不可以用,因为process_complaint 只有在一个积极的评估或者一个消极的检查之后才可以直接执行。亦即,process_complaint 的执行受两个并行的线程制约。
另一方法是使用数据透视法,例如,引入一Boolean 流程变量m。再次假设3个任务A, B和C ,任务 A 在任务B和C之间才可以被执行。起始,m 被设置成 false。在B执行完后,m 设置成true, 同样的任务 C 将 m 设置成 false。任务 A 由一个周期m值的循环来执行:如果 m 是 true, 则 A 是激活;如果m 是 false, 则过一个指定的周期后再检查条件。注意这是一个激活等待(busy wait)方法。可使用更多成熟的本方法的变种(或派生),如使用数据库的触发器等。但是,其缺点是,部分流程的真正处理被隐藏到任务和应用中。此外,混合使用并行模式和选择模式会导致各种各样的并发问题。
Pattern 39 (Critical Section)
Two or more connected subgraphs of a process model are identified as "critical sections". At runtime for a given process instance, only tasks in one of these "critical sections" can be active at any given time. Once execution of the tasks in one "critical section" commences, it must complete before another "critical section" can commence.
在一个流程里面,两个或者更多的联系子图被定义为临界部分。在运行时,在任何给定的时间里面只有一个任务可以被激活,一旦其中的一个临界部分开始执行,另一个临界部分必须等待它结束才能开始。
Both the take-deposit and insurance-payment tasks in the holiday booking process require the exclusive use of the credit-card-processing machine. Consequently only one of them can execute at any given time.
在暑假预订流程Take-deposit and insurance-payment 任务需要单独使用credit-card- processing机器。因此在给定的时间内,只有一个可以执行。
Pattern 40 (Interleaved Routing)
Each member of a set of tasks must be executed once. They can be executed in any order but no two tasks can be executed at the same time (i.e. no two tasks can be active for the same process instance at the same time). Once all of the tasks have completed, the next task in the process can be initiated.
一组任务里面的成员必须执行一次。它们可以任意顺序执行,但在同一时间内不能有相同的两个执行(没有两个任务可以在同一个流程实例在同一时间内被激活)一旦所有的任务被完成,在流程中的下一个任务启动。
The check-oil, test-feeder, examine-main-unit and review-warranty tasks all need to be undertaken as part of the machine-service process. Only one of them can be undertaken at a time, however they can be executed in any order.
machine-service流程的Check-oil,test-feeder,examine-main-unit,review-warranty任务都需要去做。在同一时间内,只能执行其中一个。但是他们可以不同顺序执行。
Cancellation and Force Completion Patterns
19. 20. 25. 26. 27.
Pattern 19 (Cancel Task)
An enabled task is withdrawn prior to it commencing execution. If the task has started, it is disabled and, where possible, the currently running instance is halted and removed.
在开始执行之前会有一个取消任务被激活,如果这个任务已经开始,disabled 都会中止和移除当前运行实例。
The purchaser can cancel their building inspection task at any time before it commences.
买方可以在开始之前的任意时间取消楼宇检查任务。
The Cancel Task pattern provides the ability to withdraw a task which has been enabled or is already executing. This ensures that it will not commence or complete execution
Pattern 20 (Cancel Case)
A complete process instance is removed. This includes currently executing tasks, those which may execute at some future time and all sub-processes. The process instance is recorded as having completed unsuccessfully.
一个完整的实例被移除。其中包括执行中的任务,可能还有将来要执行的和所有子流程。这个流程实例被记录不成功完成。
During an insurance claim process, it is discovered that the policy has expired and, as a consequence, all tasks associated with the particular process in。
在保险索赔过程中,发现了这个政策已经过期,其结果是,所有相关工作的具体过程实例被取消了
一个案例,亦即流程实例, 被完全取消。
撤销流程。
·在雇佣新员工的过程中,一个申请者撤销其申请。
·在最终判决之前客户撤销保险索赔。
工作流管理系统常常不支持取消整个流程。
1.取消任务模式可以被流定义中的每一任务重复。流程中没有一触发每一任务撤销的任务。请注意,这个方法不是最好的,因为"正常的控制流"和仅由去除流程实例引入的各种各样的关系纠缠在一起。
2.类似于取消任务模式,多数工作流管理系统支持利用一API取消流程――简单地从数据库中去除相应的记录(或项目)。
Pattern 25 (Cancel Region)
Description
The ability to disable a set of tasks in a process instance. If any of the tasks are already executing (or are currently enabled), then they are withdrawn. The tasks need not be a connected subset of the overall process model.
在一个流程实例中,有能力关闭一组任务,如果有任何任务已经执行或者当前激活,取消他们。这个任务不会关联到整个流程模型的子集。也就是说不会影响到其他子集的执行。
Stop any tasks in the Prosecution process which access the evidence database from running.
在所获得的证据起诉运行过程中,停止任何任务
Pattern 26 (Cancel Multiple Instance Task)
Within a given process instance, multiple instances of a task can be created. The required number of instances is known at design time. These instances are independent of each other and run concurrently. At any time, the multiple instance task can be cancelled and any instances which have not completed are withdrawn. Task instances that have already completed are unaffected.
在给定的一个流程实例中,多实例任务被创建。在设计的时候就知道需要实例的数目。这些实例相互独立并发。在任意时间,多重实例任务和任务实例没有完成的可以撤销。任务实例已经完成的没有影响。
Run 500 instances of the Protein Test task with distinct samples. If it has not completed one hour after commencement, cancel it.
对蛋白质测试任务不同的样品进行500个实例测试,如果一小时内没有完成,取消它。
Pattern 27 (Complete Multiple Instance Task)
Within a given process instance, multiple instances of a task can be created. The required number of instances is known at design time. These instances are independent of each other and run concurrently. It is necessary to synchronize the instances at completion before any subsequent tasks can be triggered. During the course of execution, it is possible that the task needs to be forcibly completed such that any remaining instances are withdrawn and the thread of control is passed to subsequent tasks.
给定一个流程实例,创建一个任务多实例,在设计的时候就知道实例的数目。实例是并发独立的。在其他分支被触发之前,实例在完成时必须被同步。在执行的过程中,这个任务可能需要被强制完成,如剩下的任务被撤销或者传递控制给其他任务。
Run 500 instances of the Protein Test task with distinct samples. One hour after commencement, withdraw all remaining instances and initiate the next task.
对蛋白质测试任务不同的样品进行500个实例测试,在一个小时之后撤销剩下的实例并且启动下一个任务。
Iteration Patterns
The following patterns deal with capturing repetitive behaviour in a workflow.
10. 21. 22.
Pattern 10 (Arbitrary Cycles) 任意循环模式
The ability to represent cycles in a process model that have more than one entry or exit point. It must be possible for individual entry and exit points to be associated with distinct branches.
在一个多于一个入口点和出口点的流程模板,它能够代表循环。它可以为单独的入口和出口提供连接到不同的分支。
Pattern 21 (Structured Loop) 结构循环模式
The ability to execute a task or sub-process repeatedly. The loop has either a pre-test or post-test condition associated with it that is either evaluated at the beginning or end of the loop to determine whether it should continue. The looping structure has a single entry and exit point.
有能力重复执行一个任务或者一个子流程,这个循环有一个预测试或者后测试条件,在开始评估或者在结束评估决定是否继续。这个循环结构有一个单独的入口和出口点。
While the machine still has fuel remaining, continue with the production process.
当机器还有燃料时,继续生产。
Only schedule flights if there is no storm task.
Continue processing photographs from the film until all of them have been printed.
Repeat the select player task until the entire team has been selected.
Pattern 22 (Recursion) 递归模式
The ability of a task to invoke itself during its execution or an ancestor in terms of the overall decomposition structure with which it is associated.
当它执行的时候或者就其整个分解的结构而言,这一个任务可以调用它自身。
一个一一些单位
An instance of the resolve-defect task is initiated for each mechanical problem that is identified in the production plant. During the execution of the resolve-defect task, if a mechanical fault is identified during investigations that is not related to the current defect, another instance of the resolve-defect is started. These subprocess can also initiate further resolve-defect tasks should they be necessary. The parent resolve-defect task cannot complete until all child resolve-defect tasks that it initiated have been satisfactorily completed.
在一个生产的工厂里面,resole-defect任务的一个实例被启动检查机器问题。在执行这个任务的过程中,如果一个机器故障在检测中不是因为当前的检测,另一个实例开始。这些子流程也可以激活更多更好的子任务。但父任务直到子任务结束了,才圆满完成。
For some types of task, simpler and more succinct solutions can be provided through the use of recursion rather than iteration.[原文]
对于某些类型的任务,更简单和更简洁的解决方案可以通过使用递归而不是迭代。43.
Pattern 11 (Implicit Termination) 隐式终止
Description
A given process (or sub-process) instance should terminate when there are no remaining work items that are able to be done either now or at any time in the future and the process instance is not in deadlock. There is an objective means of determining that the process instance has successully completed.
当没有剩余工作项目可以做,给定的流程或者子流程实例应该终止。有一个客观方式决定实例已经成功完成了。
Pattern 43 (Explicit Termination)显式终止
A given process (or sub-process) instance should terminate when it reaches a nominated state. Typically this is denoted by a specific

我要回帖

更多关于 并行博弈 parallel 的文章

 

随机推荐