惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Threatpost
V
Vulnerabilities – Threatpost
TaoSecurity Blog
TaoSecurity Blog
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed
G
GRAHAM CLULEY
S
Securelist
P
Palo Alto Networks Blog
MongoDB | Blog
MongoDB | Blog
A
Arctic Wolf
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
WordPress大学
WordPress大学
Project Zero
Project Zero
T
Threat Research - Cisco Blogs
L
Lohrmann on Cybersecurity
C
Cyber Attacks, Cyber Crime and Cyber Security
F
Fortinet All Blogs
博客园 - 叶小钗
B
Blog RSS Feed
C
Cisco Blogs
Google DeepMind News
Google DeepMind News
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Apple Machine Learning Research
Apple Machine Learning Research
G
Google Developers Blog
K
Kaspersky official blog
D
Docker
Latest news
Latest news
Cisco Talos Blog
Cisco Talos Blog
T
Tor Project blog
Cyberwarzone
Cyberwarzone
Security Latest
Security Latest
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Spread Privacy
Spread Privacy
Microsoft Azure Blog
Microsoft Azure Blog
C
Check Point Blog
J
Java Code Geeks
Simon Willison's Weblog
Simon Willison's Weblog
T
Tenable Blog
Recent Announcements
Recent Announcements
T
Tailwind CSS Blog
H
Help Net Security
L
LINUX DO - 热门话题
T
The Exploit Database - CXSecurity.com
Jina AI
Jina AI
S
SegmentFault 最新的问题
MyScale Blog
MyScale Blog
NISL@THU
NISL@THU
美团技术团队
腾讯CDC

博客园 - 太白飞仙

.Net网络资源 CI创意的方法与技巧 可控人生核聚变 用c#备份和还原sql server 2000数据库 论文先睹:关于科学的生命哲学的思考 蚂蚁造山的思考 语言争霸VS魔兽争霸 :: IT世界VS魔兽世界 第九章 SQL Server的简单应用 [导入]类型MSN窗体行为的实现(.NET 2.0) - 太白飞仙 - 博客园 [导入]文章藏金阁 [导入]敏捷实验室的一次争论 [导入]Netron研究(四)----"移动和联通"之联通篇 [导入]Netron研究(二)----"容器"登场 [导入]Netron研究(一)----初识 [导入]Netron研究(三)----"移动和联通"之移动篇 [导入]Agile Framework的日志服务 [导入]Agile Framework工作流服务的设计思路 [导入]KISS原则 [导入]时刻提防过度设计
[导入]WWF工作流引擎的一个奇怪现象 - 太白飞仙 - 博客园
太白飞仙 · 2006-01-16 · via 博客园 - 太白飞仙

昨天在对做工作流服务时调试发现WWF的状态机工作流有一个奇怪现象:触发状态事件后不会马上改变状态机的状态,而是要等一段时间状态才改变过来。单元测试代码如下:

IWorkflowService ws = wm.GetWorkflowService("OrderWorkflow"); Guid id = ws.StartWorkflow(null); System.Threading.Thread.Sleep(500);//如果省略这句,单元测试会失败 Assert.AreEqual(ws.GetWorkflowCurrentState(id), "WaitingForOrderState"); ws.DoAction(id, "Create", "my order"); System.Threading.Thread.Sleep(500); Assert.AreEqual(ws.GetWorkflowCurrentState(id), "OrderOpenState"); IProcessStation ps = container[typeof(IProcessStation)] as IProcessStation; Assert.AreEqual(ps.OrderId, "my order");

间隔时间大概是200多毫秒(在实际测试中间隔200毫秒出错,间隔300成功)。我加入了工作流状态跟踪服务,改变状态的操作是异步进行的,不过延迟这么久也有点夸张了,不知道是设置问题还是测试版本的BUG,还是本来就是这样设计的。现在还无法想出这个延迟时间会不会对业务逻辑带来什么问题。
文章来源:http://www.agilelabs.cn/blogs/linkin/archive/2006/01/10/503.aspx