需要在.NET中实现用于用户任务管理的工作流系统,其中可以将串行或并行任务分配给不同用户。需要参考可以使用的设计方法。提前谢谢
答案 0 :(得分:0)
我们使用以下方法:
示例模板表:
CREATE TABLE [dbo].[WorkFlowTemplate] (
[IDWorkFlowTemplate] INT NOT NULL, -- UniqueID
[IDDepart] INT NULL, -- Reference to user depart
[Name] VARCHAR (MAX) NULL, -- Name of template
[Data] VARCHAR (MAX) NULL, -- Body (xml data)
[deleted] DATETIME NULL,
[GUID] UNIQUEIDENTIFIER NULL,
[IsValid] BIT NULL, -- Flag no errors
[IsInvokable] BIT NULL, -- Flag this process must be invocable from other template
[ValidationErrors] VARCHAR (256) NULL, -- Info for errors in template
[IsExecuting] BIT NULL, -- Flag this template allow running
[Description] VARCHAR (MAX) NULL,
[GroupName] VARCHAR (256) NULL,
[Image] VARBINARY (MAX) NULL, -- Pictures for template
[AutoStart] BIT NULL -- Flag: running on start client
任务表:
CREATE TABLE [dbo].[WorkFlowInstance] (
[IDWorkFlowInstance] INT NOT NULL, -- UniqueId
[IDWorkFlowTemplate] INT NOT NULL, -- ref to template table
[Data] VARCHAR (MAX) NULL, -- Incoming parameters (xml)
[StartDate] DATETIME NULL, -- Start running datetime
[EndDate] DATETIME NULL, -- End running datetime
[Status] INT NULL, -- Status (0 = Created, 1 = Executing, 2 = Complited)
[CreateDate] DATETIME NULL, -- Created datetime
[deleted] DATETIME NULL,
[IDDepartFrom] INT NULL, -- Source depart
[IDDepartTo] INT NULL, -- Destination depart
[IDUserFrom] INT NULL, -- Source user
[IDUserTo] INT NULL, -- Destination user
[IDParentWorkFlowInstance] INT NULL, -- Parent task
[Comment] VARCHAR (MAX) NULL, -- Other comments...
[Color] INT NULL,
[Comment1] VARCHAR (256) NULL,
[Comment2] VARCHAR (256) NULL,