XML Schema for User Entity and User Entity Data Source Provider
- Last UpdatedJun 10, 2024
- 7 minute read
User Entity XML Schema for Definition XML
The XML Schema for user entity consists of collection of properties which defines the user. The properties defined for user entity is a clubbed collection of properties defined for the entity user data source providers.
Example
For example, let us consider the user data store to be SQL. The SQL server contains a database with table named as Users. Refer to the image below for the table columns specified which contain information regarding the user.
Table Name: Users

The "UserId" column in the table contains the unique identifier value for the user. The "Name" and "Email" column contains the name & email information for the user. Let us see how the properties need to be defined in the definition XML for user entity & user entity data source for the above columns.
The User Entity Data Source Provider definition XML in SKEntityDataSourceProvider table will be as shown below:
<dataproviders>
<provider name="authenticationuserprovider" type="Skelta List">
<properties>
<property name="UserId" purpose="identifier" type="guid" />
<property name="Name" purpose="name" type="string"/>
<property name="Email" purpose="email" type="string" />
<property name="Role" type="string"/>
</properties>
</provider>
</dataproviders>
The XML nodes are case sensitive and should be added "as is". Please find below the description for the node and its attributes:
The provider node contains information about the type of data source provider used.
|
Attribute Name |
Description |
|---|---|
|
name |
Defines the name of the data source provider type. This filed should match the name column value provided in SKAddInProvider table while configuring the entity data source provider. The names used for default provides shipped are given below. Active Directory: activedirectory SQL Server: sqlprovider ASP.NET Membership: membershipprovider AVEVA Work Tasks List : authenticationuserprovider |
|
type |
Defines the type of the provider. The value for this column can be any value which is descriptive. The default values used for the out of box providers are listed below. The default provider values should not be changed if used. Active Directory: activedirectory SQL Server: sql server ASP.NET Membership: aspnet membership AVEVA Work Tasks List: Skelta List |
|
providerprefix |
Value provided in this attribute will be prefixed to the unique identifier value when persisted in SKVirtualActor table. This value is referred only for data base operation like update or select on SKVirtualActor table and does not reflect in the UI when unique identifier value is referenced. AVEVA Work Tasks active directory provider uses this field to append domain name with the unique identifier value for AD [samAccountName is used as unique column in AD]. If this attribute is used it is assumed that the entity data source provider unique identifier column type is string. For the above sample this should not be used as the unique identifier type is Guid. |
|
authenticationsource |
Determines if the provider can be used as authentication source for logging in to EC. If set as false this provider does not get displayed for Log In option for EC. |
This property node contains information related to the user. The property node is case sensitive. Each property represents a column/ field of the data source provider which contains the user information. For example, if the data source is SQL the property will represent table column and if it's AD the property column represents the active directory fields.
|
Attribute Name |
Description |
|---|---|
|
name |
Column/ Field of the data source provider which defines a property of the user. In the above example name attribute value contains the column name of the table which contains user information. UserId, Name, Email & Role are the columns defined in table "Users". Note: The name attribute value should contain only alphabets without spaces or special characters. |
|
type |
Defines the column type of the data base column / field. In the above example the UserId column is defined as guid type so the attribute type for property UserId is set as "guid". |
|
purpose |
Purpose defines the type of information available for a property (column/field). It's mandatory to configure purpose attribute for the properties. The must set purpose attributes are identifier: Mandatory fields required for user entity data source provider. This setting identifies the
column from which the unique identifier value needs to be fetched. This setting is
very critical for the data source provider configuration. The column value configured
as identifier gets persisted in UserIDString or UserID or UserGUID column of SKVirtualActor
table, based on the type. email: This setting identifies the column from which the email of user will be fetched. Gets persisted in Email column of SKVirtualActor table. groupid: This setting identifies the column from which the groupid of user will be fetched. Does not get persisted in SKVirtualActor table. groupname: This setting identifies the column from which the groupname of user will be fetched. Does not get persisted in SKVirtualActor table. manager: This setting identifies the column from which the name of manger will be fetched. Does not get persisted in SKVirtualActor table. password: Used to set the column which contains password value while using forms provider. Can be used only with forms provider. |
|
persist |
Boolean flag which can be set as true/false to decide if the column value needs to be persisted in SKVirtualActor table. The default entries in SKVirtualActor table are for purpose identifier, name and email. |
|
persistcolumn |
SKVirtualActor table contains generic columns like nvarchar1, datetime1 etc which can be used to persist custom information in the table. This attribute can be used to set the column to which the value needs to be persisted for a user. Only the generic columns should be used to persist custom info. |
|
entitymappedproperty |
Attribute used to map the user entity data source provider property to an entity property. An example will be provided below on how to map a property in user entity data source provider to entity provider. |
|
displayname |
Does not have any specific functionality and can be ignored. Was maintained for back ward compatibility in XML Schema and will be removed in future release. |
|
suppressdn |
This attribute is used only with active directory. Based on this setting the value fully qualified name returned by AD is trimmed to return exact required value. Normally used with Role and Manager property in Active Directory provider. |
Note: The property field set as purpose=" identifier" should be passed as the real user id prefixed with the provider instance name & "::". For the above example the real user id for Michelle will be "<Provider Instance Name>:: e9d21049-e3cf-4f4d-9d51-036d0145c547". A sample is provided after the description section for better clarity.
The entity definition XML in SKEntity table will be as below:
<entity type="user">
<properties>
<property name="UserId" displayname="Id" purpose="identifier" type="string" />
<property name="UserName" displayname="Display Name" purpose="name" type="string"/>
<property name="UserEmail" displayname="Email" purpose="email" type="string"/>
<property name="Role" displayname="Designation" type="string"/>
</properties>
</entity>%%$#@@!!!*&
This property node contains information related to the user entity data source provider. The properties defined in entity should match the columns defined for the user entity data source provider. In the above example 2 properties (UserName, UserEmail) does not exactly match the properties defined in the sample for user entity data source provider, this will be explained after the attribute description.
The special characters (%%$#@@!!!*&) shown at the end of entity definition XML is the separation string to include multiple providers mapping XML along with entity definition XML.
|
Attribute Name |
Description |
|---|---|
|
name |
Name of the column used to build filter condition for building query to filter out required users. |
|
type |
Type defines the value type, you can see that the type defined in user entity data source provider was "int" but in entity it is set as string. This is because the unique identifier at entity level will always have the user entity data source provider instance name prefixed, which makes it a string always. |
|
purpose |
Purpose defines the type of information available for a property. Based on the purpose set for a property the resource object provides specific info as below. //Gets the resource object based on the real user id. Workflow.NET.Resource resourceProperties = new Skelta.HWS.Actor(new ApplicationObject("RepositoryName"), "skeltalist::9F67E912-5E5B-42C5-97A0-53462374A3B3").Resource; //Return the property value with purpose set as identifier resourceProperties.Properties.Identifier; //Return the property value with purpose set as name resourceProperties.Properties.Name; //Return the property value with purpose set as email resourceProperties.Properties.Email; //Return the property value with purpose set as groupid resourceProperties.Properties.GroupID; //Return the property value with purpose set as groupname resourceProperties.Properties.GroupName; //Return the property value with purpose set as manager resourceProperties.Properties.Manager; In the example you can see the real user id getting prefixed to the instance. In the sample the user entity data source provider is AVEVA Work Tasks List and the instance name is set as "skeltalist". The unique identifier type is guid for users in AVEVA Work Tasks List. |
|
displayname |
The display name of the property which will be displayed to users while building filter condition to query users. An example of filter UI is the "To" property available for Human Activities. |
In the above definition, XML 2 properties (UserName, UserEmail) does not match with the user entity data source provider columns listed. Since the names do not match the attribute "entitymappedproperty" for user entity data source provider can be used to do the mapping. This property gets used when configuring multiple providers for the same repository. The definition XML will be as below with "entitymappedproperty":
User Entity Data Source Provider definition XML:
<dataproviders>
<provider name="authenticationuserprovider" type="Skelta List">
<properties>
<property name="UserId" purpose="identifier" type="guid" />
<property name="Name" purpose="name" type="string" entitymappedproperty ="UserName" />
<property name="Email" purpose="email" type="string" entitymappedproperty = "UserEmail" />
<property name="Role" type="string"/>
</properties>
</provider>
</dataproviders>
Entity Provider definition XML:
<entity type="user">
<properties>
<property name="UserId" displayname="Id" purpose="identifier" type="string" />
<property name="UserName" displayname="Display Name" purpose="name" type="string"/>
<property name="UserEmail" displayname="Email" purpose="email" type="string"/>
<property name="Role" displayname="Designation" type="string"/>
</properties>
</entity>%%$#@@!!!*&
Find below definition XML for a few default User Entity Data Source Providers
Active Directory
<dataproviders>
<provider name="activedirectory" type="activedirectory">
<properties>
<property name="name" type="string" entitymappedproperty="UserName"/>
<property name="sAMAccountName" persistcolumn="UserIDString" type="string" purpose="identifier" entitymappedproperty="UserId"/>
<property name="displayName" type="string" purpose="name" persistcolumn="Name" entitymappedproperty="UserDisplayName"/>
<property name="mail" type="string" purpose="email" entitymappedproperty="UserEmail"/>
<property name="title" type="string" entitymappedproperty="UserDesignation"/>
<property name="department" type="string" entitymappedproperty="UserDepartment"/>
<property name="manager" type="string" suppressdn="false" purpose="manager" entitymappedproperty="UserManager"/>
<property name="memberof" type="string" purpose="groupname" suppressdn="true" entitymappedproperty="UserRole"/>
<property name="distinguishedname" type="string" entitymappedproperty="UserDistinguishedName"/>
</properties>
<Preferences>
<SearchScope>SubTree</SearchScope>
<ReferralChasing>External</ReferralChasing>
<TimeOut>60</TimeOut>
<SizeLimit>0</SizeLimit>
<AuthenticationUser></AuthenticationUser>
<AuthenticationPassword ></AuthenticationPassword>
</Preferences>
<LDAPServer>LDAP://</LDAPServer>
<LDAPSearchBase>DC=SK,DC=Skelta,DC=net</LDAPSearchBase>
<LDAPBaseFilter>(objectCategory=Person)</LDAPBaseFilter>
<DomainName>NG\</DomainName>
</provider>
</dataproviders>
AVEVA Work Tasks List
<dataproviders>
<provider name="authenticationuserprovider" type="Skelta List">
<properties>
<property name="Title" type="string" purpose="name" entitymappedproperty="UserDisplayName, UserName"/>
<property name="Id" type="guid" purpose="identifier" entitymappedproperty="UserId"/>
<property name="Role" type="string" entitymappedproperty="UserRole"/>
<property name="Password" type="string" purpose="password"/>
<property name="Description" type="string" />
<property name="Email" type="string" purpose="email" entitymappedproperty="UserEmail"/>
<property name="Department" type="string" entitymappedproperty="UserDepartment"/>
<property name="Manager" type="string" entitymappedproperty="UserManager"/>
</properties>
</provider>
</dataproviders>
Forms
<dataproviders>
<provider name="sqlprovider" type="sql server">
<properties>
<property name="UserId" purpose="identifier" type="string" />
<property name="Name" purpose="name" type="string"/>
<property name="Email" purpose="email" type="string"/>
<property name="Role" type="string"/>
<property name="Password" purpose="password" type="string"/>
</properties>
<datasource>server=localhost;database=SkeltaUsers;User Id=sa;pwd=XXX;</datasource>
<SourceTable>SqlUsers</SourceTable>
<loginproperty>Name</loginproperty>
</provider>
</dataproviders>