Workflow and ServiceDesk Community

 View Only

Workflow - Component - Developer Guide - Project Properties 

Nov 09, 2016 06:20 PM

In this Article I'm going to explain how to create a Project Property and add it to the Project when a Component is added into Workflow.

 

Inspiration from the following Active Directory Library

LogicBase.Components.ActiveDirectory.dll
namespace LogicBase.Components.ActiveDirectory
public class TaskListTaskSource

WorkflowProjectProperties.png

Get the Property

string propertyValue = CurrentProjectHolder.GetInstance().Project.ProjectSetupData.FindProperty("PROPERTYNAME").PropertyValue;
AbstractOrchestrationProject project = CurrentProjectHolder.GetInstance().Project;
string propertyValue = project.ProjectSetupData.FindProperty("PROPERTYNAME").PropertyValue;

 

Set the Property

if (DesignMode.IsInDesignMode && CurrentProjectHolder.GetInstance().Project != null)
{
    AbstractOrchestrationProject project = CurrentProjectHolder.GetInstance().Project;
    if (project.ProjectSetupData.FindProperty("SharepointHost") == null)
    {
        project.ProjectSetupData.AddProperty(new Property("SharepointHost", "http://localhost/"));
    }
}

 

If you have a password field make sure to set it with the third (3rd) argument

if (project.ProjectSetupData.FindProperty("SharepointPassword") == null)
{
    project.ProjectSetupData.AddProperty(new Property("SharepointPassword", "password", true));
}

You can see this from the following class.

namespace LogicBase.Core
public class Property

public Property(string name, string value, bool isPasswordProperty)

 

Protirus.png

Statistics
0 Favorited
1 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Related Entries and Links

No Related Resource entered.