|
Export the K2.net Process |
Once the process is completed, including the required process Data Fields and XML Fields, it must be exported to the K2.net 2003 Server. |
For this process to work with the K2.net Collaboration Tools as a Custom Action, the "Anonymous" user must be given "Start" and "View" permissions. These permissions are set using the K2.net 2003 Service Manager. |
|
Configure the User Control |
| Note: A sample User Control has been provided to assist the developer to create a sample or demonstration Custom Action. This is included in the zip file found at the bottom of this KB Article |
|
The sample code contains a complete Visual Studio.NET 2003 sample project. This also includes the dependencies (assemblies relating to the K2.net Collaboration Tools) required when creating Custom Actions. To install and open the project, do the following: |
|
1) | Unzip the compressed file |
2) | Copy the project "SourceCode.CustomActions" to the following location: "c:Inetpubwwwroot"< td> |
3) | Open Visual Studio.NET 2003 |
4) | Click "Open Project" and browse to the directory "c:InetpubwwwrootSourceCode.CustomActions" |
5) | Open the project file "SourceCode.CustomActions.csproj" |
|
This project can then be compiled. If this compilation is successful (indicating all dependencies are present), required changes can then be made (although it is recommended that changes only be made by someone who has already successfully deployed a Custom Action - such as the sample supplied). |
|
Bringing It All Together |
|
Once you have created/exported your K2.net process and the User Control has been created/compiled, the final step is to integrate the User Control and the process with the SharePoint Workflow Services part of the K2.net Collaboration Tools. |
|
| Note: The SharePoint Workflow Services folder in the K2.net Collaboration Tools should be found at the following location: <Program Files>Common FilesMicrosoft Sharedweb server extensions60TEMPLATELAYOUTSK2V3SharePoint Workflow Services |
|
|
To add the required files for the User Control, do the following: |
1) | Copy the custom action user control (the *.ascx file, e.g. K2StartProcess.ascx) into the "Actions" folder of the SharePoint Workflow Services folder |
2) | Copy the compiled assembly (the project *.dll file, found in the project's "Bin" folder, e.g. SourceCode.CustomActions.dll) into the "Bin" folder of the SharePoint Workflow Services folder. |
If you are using the Custom Action in the sample code, you will also need to copy the "K2MNG.dll" and "K2CSC.dll" file to this location. |
To configure the newly added controls, do the following |
Add the following lines of XML to the "Panels.ascx" User Control (with the other "Register" tags, near the top), found in the SharePoint Workflow Services folder, to register the new User Control: |
|
<%@ Register TagPrefix="uc1" TagName="K2StartProcess" src="Actions/K2StartProcess.ascx" %> |
|
Add the following line of code to the bottom of the same file, which adds the user control in a panel on the panel's user control: |
|
<asp:Panel id="pnlK2StartProcess" runat="server" Visible="False"> <uc1:K2StartProcess id="K2StartProcess1" runat="server"></uc1:K2StartProcess> </asp:Panel> |
|
Add the following node to the WorkflowActions.xml file in the "Resources" folder of the SharePoint Workflow Services folder. |
|
<Action AllowMultiple="true"> <Name>K2StartProcess</Name> <Description>K2StartProcessDescription</Description> <IPCProcess>CustomActionsK2StartProcess</IPCProcess> <Panel>pnlK2StartProcess</Panel> </Action> |