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

推荐订阅源

Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
SegmentFault 最新的问题
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Attack and Defense Labs
Attack and Defense Labs
F
Full Disclosure
Vercel News
Vercel News
N
News | PayPal Newsroom
The GitHub Blog
The GitHub Blog
H
Hacker News: Front Page
H
Heimdal Security Blog
P
Privacy International News Feed
博客园 - 司徒正美
Google DeepMind News
Google DeepMind News
N
Netflix TechBlog - Medium
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Cisco Blogs
L
Lohrmann on Cybersecurity
D
Docker
Recent Announcements
Recent Announcements
Security Archives - TechRepublic
Security Archives - TechRepublic
人人都是产品经理
人人都是产品经理
C
CXSECURITY Database RSS Feed - CXSecurity.com
P
Proofpoint News Feed
T
Tailwind CSS Blog
C
Check Point Blog
博客园 - 叶小钗
Google Online Security Blog
Google Online Security Blog
Martin Fowler
Martin Fowler
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
S
Secure Thoughts
博客园 - Franky
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
P
Palo Alto Networks Blog
Latest news
Latest news
量子位
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 三生石上(FineUI控件)
The Cloudflare Blog
Last Week in AI
Last Week in AI
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Cyberwarzone
Cyberwarzone
小众软件
小众软件
Cisco Talos Blog
Cisco Talos Blog
Hacker News: Ask HN
Hacker News: Ask HN
T
Threatpost
T
Tenable Blog
P
Privacy & Cybersecurity Law Blog
WordPress大学
WordPress大学

博客园 - A A

SharePoint 2013 App 未在此网站上启用应用程序的旁加载 SharePoint Error 查询命令 SharePoint 2013 基于主机头创建站点无法访问 SharePoint 2013 APP 之---很抱歉,应用程序已关闭。如果您知道运行服务器的人员,请告诉他们启用应用程序。 SharePoint服务器修改域和机器名 CAML 多表查询 SPQuery.Joins and ProjectedFields SharePoint 文档库打开HTML 直接浏览而不是打开下载对话框 SharePoint Write Logs User Profile Data Web Part 读取属性字段 ECMAScript Client OM(传说中的js客户端编程) - A A 自定义个性化 EditPeople控件 - A A 使用SharePoint Management PowerShell来完成对SharePoint的操作 Developer Dashboard 排忧解难!!! 使用SharePoint 人员选择控件 在 WEB APP开发 - A A SharePoint 在Default 下面添加服务端代码 - A A SharePoint 页面库 使用footer - A A 10分钟搞定 SharePoint 集成FCKEditor 标准项目文档 获取AD用户和OU属性字段名称
SharePoint 2010 你状态机了吗!
A A · 2011-01-22 · via 博客园 - A A

     由于要给客户做培训,关于sharepoint 2010 工作流的,打算在网上找个demo看看的,结果这方面的demo 还比较少,只能自己折腾了

哎,谁叫客户就是上帝嘛。 开始打算用顺序流的,发现网上这方面的资料比较多,而且顺序流不能体现实际的业务,看起来太“土”。。。。

状态机流程图

首先申请人---〉操作员审批----领导审批---结束

当然还有拒绝的动作,我就不在这里说明了,大家看图·

申请表单

审批表单

流程结束

设计这个流程的时候,发现和2007的版本一样,在基于VS这块,无论顺序还是状态流程,貌似变化不大@

开发sharepoint 2010 工作流 需要注意这个配置xml

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <Workflow
     Name="AA.Workflows.State - StateMachine"
     Description="My SharePoint Workflow"
     Id="630ffa3d-6da8-4e77-a77c-c602e49f956d"
     CodeBesideClass="AA.Workflows.State.StateMachine.StateMachine"
     CodeBesideAssembly="$assemblyname$"
     AssociationUrl="_layouts/AA.Workflows.State/StateMachine/WorkflowAssociationForm1.aspx"
     InstantiationUrl="_layouts/AA.Workflows.State/StateMachine/WorkflowInitiationForm1.aspx"
     TaskListContentTypeId="0x010801005e7969df923b4d7190ee6dcdae487a57">
   
    <Categories/>
    <MetaData>
      <AssociationCategories>List</AssociationCategories>
      <!-- Tags to specify InfoPath forms for the workflow; delete tags for forms that you do not have -->
      <!--<Association_FormURN>[URN FOR ASSOCIATION FORM]</Association_FormURN>
       <Instantiation_FormURN>[URN FOR INSTANTIATION FORM]</Instantiation_FormURN>
      <Task0_FormURN>[URN FOR TASK (type 0) FORM]</Task0_FormURN>
      <Task1_FormURN>[URN FOR TASK (type 1) FORM]</Task1_FormURN>-->
      <!-- Modification forms: create a unique guid for each modification form -->
      <!--<Modification_[UNIQUE GUID]_FormURN>[URN FOR MODIFICATION FORM]</Modification_[UNIQUE GUID]_FormURN>
      <Modification_[UNIQUE GUID]_Name>[NAME OF MODIFICATION TO BE DISPLAYED AS A LINK ON WORKFLOW STATUS PAGE</Modification_[UNIQUE GUID]_Name>
      -->
      <StatusPageUrl>_layouts/WrkStat.aspx</StatusPageUrl>
     
    </MetaData>
  
  </Workflow>
  <ContentType ID="0x010801005e7969df923b4d7190ee6dcdae487a57"
              Name="AA.Workflows.State - ContentType2"
              Group="Custom Content Types"
              Description="My Content Type"
              Version="0">
    <FieldRefs>
      <FieldRef ID="{F2C72B83-CA8A-45EE-9F72-3286F6E37E12}"  Name="TaskData" DisplayName ="Task Data"/>
    </FieldRefs>
    <XmlDocuments>
      <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">
        <FormUrls xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms/url">
          <Edit>_layouts/AA.Workflows.State/TaskApprove.aspx</Edit>
        </FormUrls>
      </XmlDocument>
    </XmlDocuments>
  </ContentType>
</Elements>

尤其是这个内容ID

后台aspx页面像Workflow传送value的时候可以通过

 Hashtable htData = new Hashtable();
                htData["TaskData"] = "true";

这个hashtable来做

SPWorkflowTask.AlterTask(this.taskItem, htData, true);

可以把value传送给工作流

在流程里面取值:

在审批动作里面直接这样取

   private void onTaskChanged1_Invoked(object sender, ExternalDataEventArgs e)
        {


            this.IsOperatorPenson = bool.Parse(this.afterProperties1.ExtendedProperties["TaskData"].ToString());
            this.leaderPenson = this.afterProperties1.ExtendedProperties["ApproveUser"].ToString();
            this.auditComments = this.afterProperties1.ExtendedProperties["Comments"].ToString();
        }

需要代码学习的,可以留下邮箱,我稍后也会把代码上传的

困。。。