In this Article I'm going to explain how to setup your environment for creating a WebPart.
Articles
- List
- Setup (this)
- Simple
- Deploy
- Inspecting other WebParts
- Controls
- Styling a WebPart
- WF/PM Connection String
- Connecting to SQL to retrieve data
You will need Visual Studio, download a version if you haven't already.
A Workflow Server to get the necessary DLLs.
Go to this server.
Go to your Workflow install location.
[Install Drive]:\Program Files\Symantec\Workflow\
Search for
LogicBase.Ensemble.dll
LogicBase.Ensemble.Framework.dll
[Install Drive]:\Program Files\Symantec\Workflow\ProcessManager\bin
Make a copy of these DLLs and add them to your Dev environment.
We also need to get the necessary DLLs from the GAC (Global Assembly Cache)
C:\Windows\Microsoft.NET\assembly\GAC_MSIL\
This may not show a list of DLLs as the viewer is configured using a RegKey.
* Warning modifying the Registry can be dangerous, make sure you know what you're doing before you edit these. Take a copy first as a backup. |
---|
- Launch RegEdit.
- Navigate to HKLM\Software\Microsoft\Fusion
- Add a DWORD called DisableCacheViewer and set the value to 1.
Now search for 2 Libraries:
- LogicBase.Core.dll
- LogicBase.Framework.dll
In future Articles we will also be using
- Symantec.SymQ.dll
Now we have the libs, we can create the VS project.
Start by creating a new Class Library.
Protirus.ProcessManager.WebParts
In the Project Folder add a new Folder called 'External Dependencies' (In Explorer)
Add the Symantec libs
- LogicBase.Ensemble.dll
- LogicBase.Ensemble.Framework.dll
- LogicBase.Core.dll
- LogicBase.Framework.dll
- Symantec.SymQ.dll
NOTE: Make sure these are the correct versions from the correct WF box i.e. 7.5 / 7.6 / 8.0 / 8.1. |
---|
Now in the VS Project
Right Click -> Add -> New Solution Folder ('External Dependencies')
Add Existing Item -> Browse to the DLL(s) and add.
References -> Right Click -> Add Reference
Expand Browse then right click Browse button.
Go to this Folder and add the DLL.
Update the Properties, double click to open the window.
Click on Assembly Information,
Add the Description and Company info.
It's also a good idea to update the version to match the WF version i.e. 7.6. You can then use minor versions to keep a record of your updates.
Check the Target Framework for .NET in Properties.
.NET Framework 4.5.1
Now back to the .cs file that was created ( Class1.cs).
Rename this to the name of your WebPart
ProtirusWebPart.cs
Add the using for the new namespaces
using LogicBase.Core;
using LogicBase.Framework;
Add the following References:
- System.Net.Http
- System.Web
- System.Web.Extensions
Finally we need to implement the following:
...
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
public class ProtirusWebPart : WebPart
{
}
You could create an ASP .NET Server Control project but depending on the VS version this Project may not be available.
We now have the barebone of a Project setup and ready to implment, next up the Simple Article.