WWF的一些注意点[新手向]
发布日期:2022-02-13 21:45:56 浏览次数:24 分类:技术文章

本文共 2064 字,大约阅读时间需要 6 分钟。

Posted on 2006-09-07 12:06 阅读(209)     所属分类:

1.

sqlserver2k 必须安装sp4补丁  (2005未测试)
否则使用SqlWorkflowPersistenceService 和SqlWorkflowTrackingService时会报错

2.

web.config 添加配置
<WorkflowRuntime Name="WorkflowServiceContainer">
    <CommonParameters>
      <add name="ConnectionString" value="Initial Catalog=SharedStore;Data Source=localhost;Integrated Security=SSPI;"/>
    </CommonParameters>
    <Services>
      <add type="System.Workflow.Runtime.Hosting.ManualWorkflowSchedulerService, System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral,

PublicKeyToken=31bf3856ad364e35"/>

      <add type="System.Workflow.Activities.ExternalDataExchangeService, System.Workflow.Activities, Version=3.0.00000.0, Culture=neutral,

PublicKeyToken=31bf3856ad364e35"/>

      <add type="System.Workflow.Runtime.Hosting.SharedConnectionWorkflowCommitWorkBatchService, System.Workflow.Runtime, Version=3.0.00000.0,

Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

      <add type="System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService, System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral,

PublicKeyToken=31bf3856ad364e35" UnloadOnIdle="true"/>

      <add type="System.Workflow.Runtime.Tracking.SqlTrackingService, System.Workflow.Runtime, Version=3.0.00000.0, Culture=neutral,

PublicKeyToken=31bf3856ad364e35"/>

    </Services>
 </WorkflowRuntime>
即可以使用类似
SqlWorkflowPersistence persist = runtime.GetService<SqlWorkflowPersistence>();
的方法获取Service
要不然只能通过如此冗长的方式
SqlWorkflowPersistence persist = new SqlWorkflowPersistence (
connectionString,UnloadOnIdle,timeSpan,timeSpan);
添加
<add name="WorkflowHost" type="System.Workflow.Runtime.Hosting.WorkflowWebHostingModule, System.Workflow.Runtime, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
到 <httpModules></httpModules> 节

3.

当persistenceService 和trackingService使用在同一个数据库里时
必须添加SharedConnectionWorkflowCommitWorkBatchService

4.
新建工作流程Service时必须添加[ExternalDataExchange]Attribute
wwf与host通信时使用的class必须添加[Serializable],可供序列化
5.
asp.net环境下使用ManualWorkflowSchedulerService 默认单进程
使用scheduler.RunWorkflow(instanceId)驱动工作流程
一些资源
希望能够与大家多交流 学习  一个人学真的走了好多弯路  -_- 

转载地址:https://blog.csdn.net/glumtree/article/details/1810775 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:WorkflowRuntime与PersistenceService
下一篇:破解SWT-Designer

发表评论

最新留言

做的很好,不错不错
[***.243.131.199]2024年04月03日 15时40分45秒