none
Can FIM 2010 detect duplicate user? RRS feed

  • Question

  • Hi all :D

    I had created a function in FIM portal so the account name will take first letter in firstname + full lastname:

    Name:   Jati
    Last Name:  Pangarso
    Display Name:  Jati Pangarso
    Account Name:  JPangarso
    EmployeeID:  001

    And if I want to Add another user with the same information:

    Name:   Jati
    Last Name:  Pangarso
    Display Name:  Jati Pangarso
    EmployeeID:  002

    it should take first letter in firstname + full lastname + EmployeeID for the Account Name (so it will become JPangarso002)

    Can FIM 2010 R2 do that algorithm? So the duplicate account name will not exist

    Best Regards,

    Jati P.



    Thursday, September 13, 2012 8:31 AM

Answers

All replies

  • Hi,

    Yes. you can write activity to verify that duplication don't accept.


    Muhammad Irfan

    Thursday, September 13, 2012 9:34 AM
  • Expanding on Irfan Irfan's reply:

    You would need to create a custom authorization SequenceActivity with the following activities:

    CurrentRequestActivity to read the Request.

    CodeActivity to populate a EmunerateResourceActivity's XPathFilter property. (Example: "/Person[AccountName='JPangarso']")

    Execute the EnumerateResourceActivity.

    CodeActivity to test the TotalResultsCount property. Throw an exception if the EnumerateResourceActivity > 0 to fail the Authorization.


    You can add a loop and execute the EnumerateResourceActivity. A CodeActivity could increment a numeric suffix until the AccoutnName is unique.
    • Edited by mgercevich Thursday, September 13, 2012 2:10 PM
    Thursday, September 13, 2012 2:07 PM
  • Hi all,

    thanks a lot for the quick answer guys,

    so the only way is to create custom AuthZ SequenceActivity right? no other way (codeless)?

    is there any step by step configuration for this custom SequenceActivity?

    honestly I dont have any knowledge about that (i'm a fim newbie :p)

    Best regards,

    Jati P.

    Tuesday, September 18, 2012 1:32 PM
  • Jati,

    Even though I have not used it, there is a unique name generator you could investigate on the Tool4FIM website.

    Regards.

    Wednesday, September 19, 2012 11:24 PM
  • Here are the basics of the SequenceActivity you would need to accomplish the task:

    The code for the Designer would be:

    using System;
    using System.ComponentModel;
    using System.ComponentModel.Design;
    using System.Collections;
    using System.Drawing;
    using System.Reflection;
    using System.Workflow.ComponentModel.Compiler;
    using System.Workflow.ComponentModel.Serialization;
    using System.Workflow.ComponentModel;
    using System.Workflow.ComponentModel.Design;
    using System.Workflow.Runtime;
    using System.Workflow.Activities;
    using System.Workflow.Activities.Rules;
    
    namespace UniqueAccountLibrary
    {
        public partial class UniqueAccountNameActivity
        {
            #region Activity Designer generated code
    
            /// <summary> 
            /// Required method for Designer support - do not modify 
            /// the contents of this method with the code editor.
            /// </summary>
            [System.Diagnostics.DebuggerNonUserCode]
            private void InitializeComponent()
            {
                this.CanModifyActivities = true;
                System.Workflow.Activities.CodeCondition codecondition1 = new System.Workflow.Activities.CodeCondition();
                System.Workflow.Activities.CodeCondition codecondition2 = new System.Workflow.Activities.CodeCondition();
                System.Workflow.ComponentModel.ActivityBind activitybind1 = new System.Workflow.ComponentModel.ActivityBind();
                System.Workflow.ComponentModel.ActivityBind activitybind2 = new System.Workflow.ComponentModel.ActivityBind();
                System.Workflow.ComponentModel.ActivityBind activitybind3 = new System.Workflow.ComponentModel.ActivityBind();
                System.Workflow.ComponentModel.ActivityBind activitybind4 = new System.Workflow.ComponentModel.ActivityBind();
                System.Workflow.ComponentModel.ActivityBind activitybind5 = new System.Workflow.ComponentModel.ActivityBind();
                System.Workflow.ComponentModel.ActivityBind activitybind6 = new System.Workflow.ComponentModel.ActivityBind();
                System.Workflow.Activities.CodeCondition codecondition3 = new System.Workflow.Activities.CodeCondition();
                System.Workflow.ComponentModel.ActivityBind activitybind7 = new System.Workflow.ComponentModel.ActivityBind();
                this.UseAccountID = new System.Workflow.Activities.CodeActivity();
                this.UseAccountName = new System.Workflow.Activities.CodeActivity();
                this.AccountNameExists = new System.Workflow.Activities.IfElseBranchActivity();
                this.AccountNameFree = new System.Workflow.Activities.IfElseBranchActivity();
                this.UpdateAccount = new Microsoft.ResourceManagement.Workflow.Activities.UpdateResourceActivity();
                this.AccountNameUsage = new System.Workflow.Activities.IfElseActivity();
                this.EnumAccountName = new Microsoft.ResourceManagement.Workflow.Activities.EnumerateResourcesActivity();
                this.RequestValidFalse = new System.Workflow.Activities.IfElseBranchActivity();
                this.RequestValidTrue = new System.Workflow.Activities.IfElseBranchActivity();
                this.ValidateRequest = new System.Workflow.Activities.IfElseActivity();
                this.PrepareAccountName = new System.Workflow.Activities.CodeActivity();
                this.ReadRequest = new Microsoft.ResourceManagement.Workflow.Activities.CurrentRequestActivity();
                // 
                // UseAccountID
                // 
                this.UseAccountID.Name = "UseAccountID";
                this.UseAccountID.ExecuteCode += new System.EventHandler(this.UseAccountID_ExecuteCode);
                // 
                // UseAccountName
                // 
                this.UseAccountName.Name = "UseAccountName";
                this.UseAccountName.ExecuteCode += new System.EventHandler(this.UseAccountName_ExecuteCode);
                // 
                // AccountNameExists
                // 
                this.AccountNameExists.Activities.Add(this.UseAccountID);
                codecondition1.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.AccountNameInUseCondition);
                this.AccountNameExists.Condition = codecondition1;
                this.AccountNameExists.Name = "AccountNameExists";
                // 
                // AccountNameFree
                // 
                this.AccountNameFree.Activities.Add(this.UseAccountName);
                codecondition2.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.AccountNameNotInUseCondition);
                this.AccountNameFree.Condition = codecondition2;
                this.AccountNameFree.Name = "AccountNameFree";
                // 
                // UpdateAccount
                // 
                activitybind1.Name = "UniqueAccountNameActivity";
                activitybind1.Path = "UpdateAccount_ActorId";
                this.UpdateAccount.ApplyAuthorizationPolicy = false;
                this.UpdateAccount.Name = "UpdateAccount";
                activitybind2.Name = "UniqueAccountNameActivity";
                activitybind2.Path = "UpdateAccount_ResourceId";
                activitybind3.Name = "UniqueAccountNameActivity";
                activitybind3.Path = "UpdateAccount_UpdateParameters";
                this.UpdateAccount.SetBinding(Microsoft.ResourceManagement.Workflow.Activities.UpdateResourceActivity.ActorIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind1)));
                this.UpdateAccount.SetBinding(Microsoft.ResourceManagement.Workflow.Activities.UpdateResourceActivity.ResourceIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind2)));
                this.UpdateAccount.SetBinding(Microsoft.ResourceManagement.Workflow.Activities.UpdateResourceActivity.UpdateParametersProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind3)));
                // 
                // AccountNameUsage
                // 
                this.AccountNameUsage.Activities.Add(this.AccountNameFree);
                this.AccountNameUsage.Activities.Add(this.AccountNameExists);
                this.AccountNameUsage.Name = "AccountNameUsage";
                // 
                // EnumAccountName
                // 
                activitybind4.Name = "UniqueAccountNameActivity";
                activitybind4.Path = "EnumAccountName_ActorId";
                this.EnumAccountName.Description = "Check if AccountName is used";
                this.EnumAccountName.Name = "EnumAccountName";
                this.EnumAccountName.PageSize = 100;
                this.EnumAccountName.Selection = null;
                this.EnumAccountName.SortingAttributes = null;
                activitybind5.Name = "UniqueAccountNameActivity";
                activitybind5.Path = "EnumAccountName_TotalResultsCount";
                activitybind6.Name = "UniqueAccountNameActivity";
                activitybind6.Path = "EnumAccountName_XPathFilter";
                this.EnumAccountName.SetBinding(Microsoft.ResourceManagement.Workflow.Activities.EnumerateResourcesActivity.TotalResultsCountProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind5)));
                this.EnumAccountName.SetBinding(Microsoft.ResourceManagement.Workflow.Activities.EnumerateResourcesActivity.XPathFilterProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind6)));
                this.EnumAccountName.SetBinding(Microsoft.ResourceManagement.Workflow.Activities.EnumerateResourcesActivity.ActorIdProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind4)));
                // 
                // RequestValidFalse
                // 
                this.RequestValidFalse.Name = "RequestValidFalse";
                // 
                // RequestValidTrue
                // 
                this.RequestValidTrue.Activities.Add(this.EnumAccountName);
                this.RequestValidTrue.Activities.Add(this.AccountNameUsage);
                this.RequestValidTrue.Activities.Add(this.UpdateAccount);
                codecondition3.Condition += new System.EventHandler<System.Workflow.Activities.ConditionalEventArgs>(this.ValidateRequestCondition);
                this.RequestValidTrue.Condition = codecondition3;
                this.RequestValidTrue.Name = "RequestValidTrue";
                // 
                // ValidateRequest
                // 
                this.ValidateRequest.Activities.Add(this.RequestValidTrue);
                this.ValidateRequest.Activities.Add(this.RequestValidFalse);
                this.ValidateRequest.Name = "ValidateRequest";
                // 
                // PrepareAccountName
                // 
                this.PrepareAccountName.Name = "PrepareAccountName";
                this.PrepareAccountName.ExecuteCode += new System.EventHandler(this.PrepareAccountName_ExecuteCode);
                // 
                // ReadRequest
                // 
                activitybind7.Name = "UniqueAccountNameActivity";
                activitybind7.Path = "ReadRequest_CurrentRequest";
                this.ReadRequest.Name = "ReadRequest";
                this.ReadRequest.SetBinding(Microsoft.ResourceManagement.Workflow.Activities.CurrentRequestActivity.CurrentRequestProperty, ((System.Workflow.ComponentModel.ActivityBind)(activitybind7)));
                // 
                // UniqueAccountNameActivity
                // 
                this.Activities.Add(this.ReadRequest);
                this.Activities.Add(this.PrepareAccountName);
                this.Activities.Add(this.ValidateRequest);
                this.Name = "UniqueAccountNameActivity";
                this.CanModifyActivities = false;
    
            }
    
            #endregion
    
            private CodeActivity UseAccountID;
            private CodeActivity UseAccountName;
            private Microsoft.ResourceManagement.Workflow.Activities.UpdateResourceActivity UpdateAccount;
            private IfElseBranchActivity AccountNameExists;
            private IfElseBranchActivity AccountNameFree;
            private IfElseActivity AccountNameUsage;
            private Microsoft.ResourceManagement.Workflow.Activities.EnumerateResourcesActivity EnumAccountName;
            private IfElseBranchActivity RequestValidFalse;
            private IfElseBranchActivity RequestValidTrue;
            private IfElseActivity ValidateRequest;
            private CodeActivity PrepareAccountName;
            private Microsoft.ResourceManagement.Workflow.Activities.CurrentRequestActivity ReadRequest;
        }
    }
    

    The class code would be something like this:

    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.Collections.ObjectModel;
    using System.ComponentModel;
    using System.ComponentModel.Design;
    using System.Linq;
    using System.Text;
    using System.Workflow.Activities;
    using System.Workflow.Activities.Rules;
    using System.Workflow.ComponentModel;
    using System.Workflow.ComponentModel.Compiler;
    using System.Workflow.ComponentModel.Design;
    using System.Workflow.ComponentModel.Serialization;
    using System.Workflow.Runtime;
    using Microsoft.ResourceManagement.WebServices.WSResourceManagement;
    using Microsoft.ResourceManagement.Workflow.Activities;
    
    namespace UniqueAccountLibrary
    {
        public partial class UniqueAccountNameActivity : SequenceActivity
        {
            #region Constructors
            public UniqueAccountNameActivity()
            {
                InitializeComponent();
                this.FirstName = String.Empty;
                this.LastName = String.Empty;
                this.EmployeeID = String.Empty;
            }
            #endregion
    
            #region Public Workflow Properties
    
            public static DependencyProperty ReadRequest_CurrentRequestProperty = DependencyProperty.Register("ReadRequest_CurrentRequest", typeof(Microsoft.ResourceManagement.WebServices.WSResourceManagement.RequestType), typeof(UniqueAccountLibrary.UniqueAccountNameActivity));
            /// <summary>
            ///  Stores information about the current request
            /// </summary>
            [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
            [BrowsableAttribute(true)]
            [CategoryAttribute("Misc")]
            public RequestType ReadRequest_CurrentRequest
            {
                get
                {
                    return ((RequestType)(base.GetValue(UniqueAccountLibrary.UniqueAccountNameActivity.ReadRequest_CurrentRequestProperty)));
                }
                set
                {
                    base.SetValue(UniqueAccountLibrary.UniqueAccountNameActivity.ReadRequest_CurrentRequestProperty, value);
                }
            }
    
            public static DependencyProperty EnumAccountName_ActorIdProperty = DependencyProperty.Register("EnumAccountName_ActorId", typeof(System.Guid), typeof(UniqueAccountLibrary.UniqueAccountNameActivity));
            [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
            [BrowsableAttribute(true)]
            [CategoryAttribute("Misc")]
            public Guid EnumAccountName_ActorId
            {
                get
                {
                    return ((System.Guid)(base.GetValue(UniqueAccountLibrary.UniqueAccountNameActivity.EnumAccountName_ActorIdProperty)));
                }
                set
                {
                    base.SetValue(UniqueAccountLibrary.UniqueAccountNameActivity.EnumAccountName_ActorIdProperty, value);
                }
            }
            public static DependencyProperty EnumAccountName_TotalResultsCountProperty = DependencyProperty.Register("EnumAccountName_TotalResultsCount", typeof(System.Int32), typeof(UniqueAccountLibrary.UniqueAccountNameActivity));
            [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
            [BrowsableAttribute(true)]
            [CategoryAttribute("Misc")]
            public Int32 EnumAccountName_TotalResultsCount
            {
                get
                {
                    return ((int)(base.GetValue(UniqueAccountLibrary.UniqueAccountNameActivity.EnumAccountName_TotalResultsCountProperty)));
                }
                set
                {
                    base.SetValue(UniqueAccountLibrary.UniqueAccountNameActivity.EnumAccountName_TotalResultsCountProperty, value);
                }
            }
            public static DependencyProperty EnumAccountName_XPathFilterProperty = DependencyProperty.Register("EnumAccountName_XPathFilter", typeof(System.String), typeof(UniqueAccountLibrary.UniqueAccountNameActivity));
            [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
            [BrowsableAttribute(true)]
            [CategoryAttribute("Misc")]
            public String EnumAccountName_XPathFilter
            {
                get
                {
                    return ((string)(base.GetValue(UniqueAccountLibrary.UniqueAccountNameActivity.EnumAccountName_XPathFilterProperty)));
                }
                set
                {
                    base.SetValue(UniqueAccountLibrary.UniqueAccountNameActivity.EnumAccountName_XPathFilterProperty, value);
                }
            }
    
            public static DependencyProperty UpdateAccount_ActorIdProperty = DependencyProperty.Register("UpdateAccount_ActorId", typeof(System.Guid), typeof(UniqueAccountLibrary.UniqueAccountNameActivity));
            [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
            [BrowsableAttribute(true)]
            [CategoryAttribute("Misc")]
            public Guid UpdateAccount_ActorId
            {
                get
                {
                    return ((System.Guid)(base.GetValue(UniqueAccountLibrary.UniqueAccountNameActivity.UpdateAccount_ActorIdProperty)));
                }
                set
                {
                    base.SetValue(UniqueAccountLibrary.UniqueAccountNameActivity.UpdateAccount_ActorIdProperty, value);
                }
            }
            public static DependencyProperty UpdateAccount_ResourceIdProperty = DependencyProperty.Register("UpdateAccount_ResourceId", typeof(System.Guid), typeof(UniqueAccountLibrary.UniqueAccountNameActivity));
            [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
            [BrowsableAttribute(true)]
            [CategoryAttribute("Misc")]
            public Guid UpdateAccount_ResourceId
            {
                get
                {
                    return ((System.Guid)(base.GetValue(UniqueAccountLibrary.UniqueAccountNameActivity.UpdateAccount_ResourceIdProperty)));
                }
                set
                {
                    base.SetValue(UniqueAccountLibrary.UniqueAccountNameActivity.UpdateAccount_ResourceIdProperty, value);
                }
            }
            public static DependencyProperty UpdateAccount_UpdateParametersProperty = DependencyProperty.Register("UpdateAccount_UpdateParameters", typeof(Microsoft.ResourceManagement.WebServices.WSResourceManagement.UpdateRequestParameter[]), typeof(UniqueAccountLibrary.UniqueAccountNameActivity));
            [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
            [BrowsableAttribute(true)]
            [CategoryAttribute("Parameters")]
            public UpdateRequestParameter[] UpdateAccount_UpdateParameters
            {
                get
                {
                    return ((Microsoft.ResourceManagement.WebServices.WSResourceManagement.UpdateRequestParameter[])(base.GetValue(UniqueAccountLibrary.UniqueAccountNameActivity.UpdateAccount_UpdateParametersProperty)));
                }
                set
                {
                    base.SetValue(UniqueAccountLibrary.UniqueAccountNameActivity.UpdateAccount_UpdateParametersProperty, value);
                }
            }
    
            public static DependencyProperty FirstNameProperty = DependencyProperty.Register("FirstName", typeof(String), typeof(UniqueAccountLibrary.UniqueAccountNameActivity));
            [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
            [BrowsableAttribute(false)]
            [CategoryAttribute("Property")]
            public String FirstName
            {
                get
                {
                    return ((String)(base.GetValue(UniqueAccountLibrary.UniqueAccountNameActivity.FirstNameProperty)));
                }
                set
                {
                    base.SetValue(UniqueAccountLibrary.UniqueAccountNameActivity.FirstNameProperty, value);
                }
            }
            public static DependencyProperty LastNameProperty = DependencyProperty.Register("LastName", typeof(String), typeof(UniqueAccountLibrary.UniqueAccountNameActivity));
            [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
            [BrowsableAttribute(false)]
            [CategoryAttribute("Property")]
            public String LastName
            {
                get
                {
                    return ((String)(base.GetValue(UniqueAccountLibrary.UniqueAccountNameActivity.LastNameProperty)));
                }
                set
                {
                    base.SetValue(UniqueAccountLibrary.UniqueAccountNameActivity.LastNameProperty, value);
                }
            }
            public static DependencyProperty EmployeeIDProperty = DependencyProperty.Register("EmployeeID", typeof(String), typeof(UniqueAccountLibrary.UniqueAccountNameActivity));
            [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
            [BrowsableAttribute(false)]
            [CategoryAttribute("Property")]
            public String EmployeeID
            {
                get
                {
                    return ((String)(base.GetValue(UniqueAccountLibrary.UniqueAccountNameActivity.EmployeeIDProperty)));
                }
                set
                {
                    base.SetValue(UniqueAccountLibrary.UniqueAccountNameActivity.EmployeeIDProperty, value);
                }
            }
            [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
            [BrowsableAttribute(false)]
            [CategoryAttribute("Property")]
            public String AccountName
            {
                get
                {
                    if (IsValidRequest)
                    {
                        return this.FirstName[0].ToString() + this.LastName;
                    }
                    return String.Empty;
                }
            }
            [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
            [BrowsableAttribute(false)]
            [CategoryAttribute("Property")]
            public String AccountNameWithID
            {
                get
                {
                    if (IsValidRequest)
                    {
                        return this.FirstName[0].ToString() + this.LastName + this.EmployeeID;
                    }
                    return String.Empty;
                }
            }
            [DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Visible)]
            [BrowsableAttribute(false)]
            [CategoryAttribute("Property")]
            public Boolean IsValidRequest
            {
                get
                {
                    if (!String.IsNullOrEmpty(this.FirstName) &&
                        !String.IsNullOrEmpty(this.LastName) &&
                        !String.IsNullOrEmpty(this.EmployeeID))
                    {
                        return true;
                    }
                    return false;
                }
            }
            #endregion
    
            #region Execution Logic
            private void PrepareAccountName_ExecuteCode(object sender, EventArgs e)
            {
                try
                {
                    //Get Current Request
                    RequestType currentRequest = this.ReadRequest_CurrentRequest;
                    //Populate Account Properties from Request
                    ReadOnlyCollection<CreateRequestParameter> requestParameters = currentRequest.ParseParameters<CreateRequestParameter>();
                    foreach (CreateRequestParameter requestParameter in requestParameters)
                    {
                        switch (requestParameter.PropertyName)
                        {
                            case "FirstName":
                                this.FirstName = requestParameter.Value.ToString().Trim();
                                break;
                            case "LastName":
                                this.LastName = requestParameter.Value.ToString().Trim();
                                break;
                            case "EmployeeID":
                                this.EmployeeID = requestParameter.Value.ToString().Trim();
                                break;
                        }
                        if (IsValidRequest)
                        {
                            this.EnumAccountName_ActorId = new System.Guid("e05d1f1b-3d5e-4014-baa6-94dee7d68c89");
                            this.EnumAccountName_XPathFilter = String.Format("/Person[AccountName='{0}']", this.AccountName);
                            this.UpdateAccount_ActorId = new System.Guid("e05d1f1b-3d5e-4014-baa6-94dee7d68c89");
                            this.UpdateAccount_ResourceId = new System.Guid(currentRequest.Target.Value);
                        }
                    }
                }
                catch (Exception ex)
                {
                    //Ignore this request for processing
                }
            }
            private void UseAccountName_ExecuteCode(object sender, EventArgs e)
            {
                List<UpdateRequestParameter> updateParameters = new List<UpdateRequestParameter>();
                updateParameters.Add(new UpdateRequestParameter("AccountName", UpdateMode.Modify, this.AccountName));
                this.UpdateAccount_UpdateParameters = updateParameters.ToArray();
            }
            private void UseAccountID_ExecuteCode(object sender, EventArgs e)
            {
                List<UpdateRequestParameter> updateParameters = new List<UpdateRequestParameter>();
                updateParameters.Add(new UpdateRequestParameter("AccountName", UpdateMode.Modify, this.AccountNameWithID));
                this.UpdateAccount_UpdateParameters = updateParameters.ToArray();
            }
            #endregion
    
            #region Conditional Logic
            protected void ValidateRequestCondition(object sender, ConditionalEventArgs e)
            {
                e.Result = IsValidRequest;
            }
            protected void AccountNameInUseCondition(object sender, ConditionalEventArgs e)
            {
                e.Result = !this.EnumAccountName_TotalResultsCount.Equals(0);
            }
            protected void AccountNameNotInUseCondition(object sender, ConditionalEventArgs e)
            {
                e.Result = this.EnumAccountName_TotalResultsCount.Equals(0);
            }
            #endregion
    
        }
    }
    

    Granted, this does not check for the existence of the AccountName with ID appended, I am assuming that EmployeeID are already unique. You would also need to create a basic parameter-less UI for adding this activity to a workflow (ActivitySettingsPart). There is a fairly decent walkthrough available here.

    Hope this helps,

    • Proposed as answer by mgercevich Thursday, September 20, 2012 5:17 PM
    Thursday, September 20, 2012 2:58 PM