首先看看架构图
概述:
从架构图上看,在最下面的是Host Process层, 从架构图上看到这一部分不是完整的,也就很显示看的出Host Process不是WFF中固有的一部分,这也是WFF的一个特点,他没一个固有的执行过程,而是用用Host Process来处理,而Host Process主要是利用在Windows 平台的应用程序来完成,如:console applications,WinForms applications,Web applications,Web servies applications,Sharepoint Server,and NT servies applications.基于这种原因,Host Process与WFF进行交互就是利用Hosting Layer层来完成,Hosting Layer为WFF提供了可拔插的接口给Host. 在Hosting Layer之上的就是Runtime层,Runtime是WFF的引擎核心,用来执行流程和管理流程的生命周期.workflow model layer 是为开发人员与WFF进行交互的层,workflow model layer包括了不同的流程模型,APIs,Activeites.
Hosting Layer
Hosting Layer在WFF与Host之间提供了以下接口:通信,持久,跟踪,定时器,线程与处理(Communication, Persistence, Tracking, Timer, Threading, and Transaction),
持久(Persistentce):对流程的一些状态保存一段时间,至到用户清除,
定时器(Timer):流程经常需要等特一个事件之后再继续,这个定时器就提供了这个延时.
跟踪(Tracking):流程的跟踪工具.
通信(Communication):从他们的host,流程发送或接收事件与信息,这些事件引发流程,并移动到流程的下一步.
Table 1.1. Prebuilt Host Layer Service Implementations
Host Layer
Service Implementation
Persistence
SQL Server state persistence
Timer
Both an in-memory and SQL Server–based timer
Threading
.NET thread pool
ASP.NET thread pool
Server Tracking Persistence and Event Log recording for termination
Communications
.NET components and web services
Runtime Layer:
Runtime Layer是WFF的核心,是不可缺少的.这个层包括以下服务:
实行,执行( Execution):执行活动时间表,支持公共行为:event handling, exception,tracking,and transactions.
跟踪(Tracking):建立跟踪事件.
状态管理(State Management):
日程表( Scheduler):按日程表执行activites.
规则(Rules) :
Workflow Model Layer:
WFF的应用开发,这一层:支持多种流程分类,活动,与APIs.
WFF支持两种模型,顺序工作流模型( Sequential workflow model)与状态机工作流模型(State machine workflow model).
顺充工作流模型(Sequential Workflow model):比较传统,带有明显的时序性,适用于大多数结构化的工作流应用
状态机工作流模型( State machine workflow model):非常灵活,属于事件驱动,带有事务特征,适合于非结构化面向人或角色相关的工作流场景