一步一步SharePoint 2007之四十三:实现自定义Workflow(2)——设置配置文件
生活随笔
收集整理的這篇文章主要介紹了
一步一步SharePoint 2007之四十三:实现自定义Workflow(2)——设置配置文件
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
下面將記錄每一步的操作過程。
1、首先采用Reflector等工具找到上一篇文章編譯后的DLL的Assembly信息。
2、找到并打開C:\Inetpub\wwwroot\wss\VirtualDirectories\9001\web.config文件,在System.Workflow.ComponentModel.WorkflowCompiler節點下的authorizedTypes中,加入一個新的authorizedType,如下:
????1???? ? <authorizedType Assembly="Eallies.Workflow.Demo, Version=1.0.0.0, Culture=neutral, PublicKeyToken=2b73eeea223c0615" Namespace="Eallies.Workflow.Demo" TypeName="*" Authorized="True" />
3、然后再找到并打開C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\1033\Workflow\WSS.ACTIONS文件,這里的1033表示英文,在您的機器上也可能是2052等。
4、找到這個文件的Actions節,并在最后一個Action后添加一個新的Action。如下。
請注意,這里ClassName為“命名空間+類名”的形式,%1對應于后面的Id="1",Parameter的Name為我們在Workflow中定義的屬性名。
????1???? <Action Name="Write a File" ????2???? ? ClassName="Eallies.Workflow.Demo.WriteFile" ????3???? ? Assembly="Eallies.Workflow.Demo, Version=1.0.0.0, Culture=neutral, PublicKeyToken=2b73eeea223c0615" ????4???? ? Category="Eallies" ????5???? ? AppliesTo="all"> ????6???? ? <RuleDesigner Sentence="Write %1 to the file"> ????7???? ??? <FieldBind Field="Text" Text="this text" DesignerType="TextArea" Id="1"/> ????8???? ? </RuleDesigner> ????9???? ? <Parameters> ???10???? ??? <Parameter Name="Text" Type="System.String, mscorlib" Direction="In" /> ???11???? ? </Parameters> ???12???? </Action>
5、改完保存后,我們需要重啟一下IIS。
至此,第二部分的設置配置文件的工作就完成了。
下一篇文章我將記錄如何實現自定義Workflow的第三部分——在Designer中創建一個Workflow的過程。歡迎大家繼續關注:)多謝!
1、首先采用Reflector等工具找到上一篇文章編譯后的DLL的Assembly信息。
2、找到并打開C:\Inetpub\wwwroot\wss\VirtualDirectories\9001\web.config文件,在System.Workflow.ComponentModel.WorkflowCompiler節點下的authorizedTypes中,加入一個新的authorizedType,如下:
????1???? ? <authorizedType Assembly="Eallies.Workflow.Demo, Version=1.0.0.0, Culture=neutral, PublicKeyToken=2b73eeea223c0615" Namespace="Eallies.Workflow.Demo" TypeName="*" Authorized="True" />
3、然后再找到并打開C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\1033\Workflow\WSS.ACTIONS文件,這里的1033表示英文,在您的機器上也可能是2052等。
4、找到這個文件的Actions節,并在最后一個Action后添加一個新的Action。如下。
請注意,這里ClassName為“命名空間+類名”的形式,%1對應于后面的Id="1",Parameter的Name為我們在Workflow中定義的屬性名。
????1???? <Action Name="Write a File" ????2???? ? ClassName="Eallies.Workflow.Demo.WriteFile" ????3???? ? Assembly="Eallies.Workflow.Demo, Version=1.0.0.0, Culture=neutral, PublicKeyToken=2b73eeea223c0615" ????4???? ? Category="Eallies" ????5???? ? AppliesTo="all"> ????6???? ? <RuleDesigner Sentence="Write %1 to the file"> ????7???? ??? <FieldBind Field="Text" Text="this text" DesignerType="TextArea" Id="1"/> ????8???? ? </RuleDesigner> ????9???? ? <Parameters> ???10???? ??? <Parameter Name="Text" Type="System.String, mscorlib" Direction="In" /> ???11???? ? </Parameters> ???12???? </Action>
5、改完保存后,我們需要重啟一下IIS。
至此,第二部分的設置配置文件的工作就完成了。
下一篇文章我將記錄如何實現自定義Workflow的第三部分——在Designer中創建一個Workflow的過程。歡迎大家繼續關注:)多謝!
轉載于:https://blog.51cto.com/eallies/78789
總結
以上是生活随笔為你收集整理的一步一步SharePoint 2007之四十三:实现自定义Workflow(2)——设置配置文件的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 如何接收串口数据_UART IDLE 中
- 下一篇: automation服务不能创建对象