Process Designer Control
- Last UpdatedJun 10, 2024
- 4 minute read
The Process Designer provides an interface to design the workflow processes. Workflows can be designed and deployed using the Process Designer.
To add Process Designer control using a panel
Before adding the Process Designer control in a panel, create an ASP.NET project in Visual Studio .NET 2012. You must add two .aspx pages for this control, one to embed the control and other to create the list definitions and call the Designer.aspx page.
-
Designerbase.aspx
-
Designer.aspx
-
Open the Designerbase.aspx.cs page.
-
Add the following code in the page load of this page.
string applicationName = " ApplicationName ";
string listName = "Workflow";
string workflowName = "WorkflowName"; // Use unpublished workflow Name
Skelta.Core.ApplicationObject application = new Skelta.Core.ApplicationObject(applicationName);
// Create User context as given in this topic http://sun.skelta.com/DeveloperGuide/CreatingUserContext.html
Skelta.Entity.UserContext usrcn = new Skelta.Entity.UserContext("47D5EA43-B471-492C-A2C3-41DC41C15EC8", application, "skeltalist", "", "", false);
Skelta.Repository.Web.List.ListPageParameters param = new Skelta.Repository.Web.List.ListPageParameters(); param.ListName = listName;
Skelta.Repository.List.ListDefinition list = Skelta.Repository.List.ListDefinition.GetList(application, listName);
param.ListId = list.Id;
Skelta.Repository.List.ListDataHandler ldh = new Skelta.Repository.List.ListDataHandler(applicationName, listName);
param.ListItemId = ldh.GetListItemId(workflowName);
param.ApplicationName = applicationName;
//specify the version information //param.VersionStamp = "1";
param.LoggedInUserId = usrcn.LoggedInUserId;
string encParam = param.GetSecuredUri();
//Give the page name where the Process Designer control is placed.
string url = "Designer.aspx"; // specify the page where ProcessDesigner is embedded
if (url.IndexOf("?") > 0)
url += "&" + encParam;
else
url += "?" + encParam; this.Context.Response.Redirect(url);
-
Open the Designer.aspx.cs page.
-
Ensure that you have initialized the User Context object, as per the steps given in Create User Context
-
In the underlying code, create a new instance of control and add the instance to the panel in the Page_Load, as shown in the sample code:
string applicationName = "Telematics Repository";
Skelta.Core.ApplicationObject application = new Skelta.Core.ApplicationObject (applicationName);
Skelta.Entity.UserContext usrcn = new Skelta.Entity.UserContext ("81734457-B3DB-4BC9-894A-C3149828C65C", application, "skeltalist", "", "", false);
Workflow.NET.Web.Designer.ProcessDesigner pd = new Workflow.NET.Web.Designer.ProcessDesigner();
pd.ApplicationName = usrcn.Repository.ApplicationName; //Provide Application or Repository name. This is mandatory.
pd.WorkflowName = "Test Workflow"; //Provide Workflow name. This is mandatory.
pd.UserIdString = usrcn.LoggedInUserId; //Provide user id string. This is mandatory.
pd.ID = "ProcessDesigner"; // This is mandatory.
pd.Height = Unit.Percentage (100);
Panel1.Controls.Add (pd);
Properties that can be set for Process Designer Control
-
ApplicationName: Provide the Application or Repository Name.
-
CanExportProcessDefinition: If the CanExportProcessDefinition property is set to false, then the "Export" option will not be displayed and you cannot export workflows.

-
CanImportProcessDefinition: If the CanImportProcessDefinition property is set to false, the Import and Import from Visio options will not be displayed and you cannot import workflows.
-
CanWriteInProduction: If the CanWriteInProduction property is set to false, you can design the workflow but will not be able to publish it.
-
WorkflowName: Provide the workflow name to design the workflow.
-
FileName: This property should not be used since it is an obsolete property; instead of the FileName property, you can use the Version property.
-
CanWriteInStaging: If the CanWriteInStaging property is set to false, you can only view the workflow.

To use Process Designer as an Embedded Control in Custom Applications
Consider a scenario where a user creates a custom application and uses the Process Designer control as an embedded control. In such a scenario, the user will have to follow the steps given below in order to publish/execute the workflow.
-
Repeat the steps given under the section To add Process Designer control using a panel.
-
Create another page in the Visual Studio and add the following code sample. Alternatively, if the page is already created through which the user can navigate to the Process Designer page, then the user has to use the code snippet given below in the event which calls the Process Designer page. For example, the event used here is 'Button_Click'.
protected void Button _Click(object sender, EventArgs e)
{
string applicationName = " ApplicationName ";
string listName = "Workflow";
string workflowName = "WorkflowName";
Skelta.Core.ApplicationObject application = new Skelta.Core.ApplicationObject(applicationName);
// Create User context as given in this topic http://sun.skelta.com/DeveloperGuide/CreatingUserContext.html
Skelta.Entity.UserContext usrcn = new Skelta.Entity.UserContext("47D5EA43-B471-492C-A2C3-41DC41C15EC8", application, "skeltalist", "", "", false);
Skelta.Repository.Web.List.ListPageParameters param = new Skelta.Repository.Web.List.ListPageParameters();
param.ListName = listName;
Skelta.Repository.List.ListDefinition list = Skelta.Repository.List.ListDefinition.GetList(application, listName);
param.ListId = list.Id;
Skelta.Repository.List.ListDataHandler ldh = new Skelta.Repository.List.ListDataHandler(applicationName, listName);
param.ListItemId = ldh.GetListItemId(workflowName);
param.ApplicationName = applicationName;
//specify the version information
//param.VersionStamp = "1";
param.LoggedInUserId = usrcn.LoggedInUserId;
string encParam = param.GetSecuredUri();
//Give the page name where the Process Designer control is placed.
string url = "PDesigner.aspx"; // specify the page where ProcessDesigner is embedded
if (url.IndexOf("?") > 0)
url += "&" + encParam;
else
url += "?" + encParam;
this.Context.Response.Redirect(url);
}
-
On click of the button, the Process Designer page will appear. The user will be able to perform all the actions related to the workflow.