﻿<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
  <!-- EF Runtime content -->
  <edmx:Runtime>
    <!-- SSDL content -->
    <edmx:StorageModels>
    <Schema Namespace="Model.Store" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
        <EntityType Name="Users">
          <Key>
            <PropertyRef Name="UserID" />
          </Key>
          <Property Name="UserID" Type="bigint" Nullable="false" StoreGeneratedPattern="Identity" />
          <Property Name="UserStatusID" Type="smallint" Nullable="false" />
          <Property Name="EntityID" Type="int" />
          <Property Name="ItemID" Type="varchar" MaxLength="20" />
          <Property Name="LastName" Type="varchar" MaxLength="50" />
          <Property Name="FirstName" Type="varchar" MaxLength="50" />
          <Property Name="FullName" Type="varchar" MaxLength="101" StoreGeneratedPattern="Computed" Nullable="false" />
          <Property Name="KnownAs" Type="varchar" MaxLength="101" />
          <Property Name="Email" Type="varchar" MaxLength="255" Nullable="false" />
          <Property Name="NTAccount" Type="varchar" MaxLength="255" />
          <Property Name="Cell" Type="varchar" MaxLength="10" />
          <Property Name="IsPasswordExpired" Type="bit" />
          <Property Name="PasswordDate" Type="datetime" />
          <Property Name="PasswordHash" Type="varchar" MaxLength="255" />
          <Property Name="PasswordSalt" Type="varchar" MaxLength="20" />
          <Property Name="PasswordChallenge" Type="varchar" MaxLength="20" />
          <Property Name="PasswordQuestion" Type="varchar" MaxLength="255" />
          <Property Name="PasswordAnswerHash" Type="varchar" MaxLength="255" />
          <Property Name="PasswordAnswerSalt" Type="varchar" MaxLength="20" />
          <Property Name="PasswordAnswerChallenge" Type="varchar" MaxLength="20" />
          <Property Name="FingerprintTemplate" Type="varbinary(max)" />
          <Property Name="CreatedByID" Type="bigint" Nullable="false" />
          <Property Name="CreatedDate" Type="datetime" Nullable="false" />
          <Property Name="UpdatedByID" Type="bigint" Nullable="false" />
          <Property Name="UpdatedDate" Type="datetime" Nullable="false" />
          <Property Name="FingerprintRequestToken" Type="varchar" MaxLength="255" />
          <Property Name="FingerprintRequestExpiryDate" Type="datetime" />
          <Property Name="UserProfileDocID" Type="bigint" />
          <Property Name="OfficeLocationID" Type="bigint" />
        </EntityType>
        <EntityType Name="WorkflowBuddies">
          <Key>
            <PropertyRef Name="WorkflowBuddyID" />
          </Key>
          <Property Name="WorkflowBuddyID" Type="bigint" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="WorkflowID" Type="bigint" Nullable="false" />
          <Property Name="UserID" Type="bigint" Nullable="false" />
          <Property Name="BuddyUserID" Type="bigint" Nullable="false" />
        </EntityType>
        <EntityType Name="Entities">
          <Key>
            <PropertyRef Name="EntityID" />
          </Key>
          <Property Name="EntityID" Type="int" Nullable="false" />
          <Property Name="EntityName" Type="varchar" MaxLength="50" Nullable="false" />
          <Property Name="EntityTableName" Type="varchar" MaxLength="50" Nullable="false" />
          <Property Name="EntityDataTableName" Type="varchar" MaxLength="50" />
          <Property Name="EntityKey" Type="varchar" MaxLength="50" Nullable="false" />
          <Property Name="EntityViewName" Type="varchar" MaxLength="50" Nullable="false" />
          <Property Name="FolderPrefix" Type="varchar" MaxLength="3" />
          <Property Name="IsCancelled" Type="bit" Nullable="false" />
          <Property Name="SMSFieldKey" Type="varchar" MaxLength="50" />
          <Property Name="EmailFieldKey" Type="varchar" MaxLength="50" />
        </EntityType>
        <EntityType Name="WorkflowInstanceDocuments">
          <Key>
            <PropertyRef Name="WorkflowInstanceDocumentID" />
          </Key>
          <Property Name="WorkflowInstanceDocumentID" Type="bigint" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="WorkflowInstanceID" Type="bigint" Nullable="false" />
          <Property Name="DocumentTypeID" Type="smallint" Nullable="false" />
          <Property Name="DocumentID" Type="bigint" />
          <Property Name="IsMandatory" Type="bit" Nullable="false" />
          <Property Name="IsCancelled" Type="bit" Nullable="false" />
          <Property Name="IsExpiryDateRequired" Type="bit" />
          <Property Name="ExpiryDate" Type="datetime" />
          <Property Name="Title" Type="varchar" MaxLength="255" />
        </EntityType>
        <EntityType Name="WorkflowInstanceParticipants">
          <Key>
            <PropertyRef Name="WorkflowInstanceParticipantID" />
          </Key>
          <Property Name="WorkflowInstanceParticipantID" Type="bigint" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="WorkflowInstanceID" Type="bigint" Nullable="false" />
          <Property Name="WorkflowTemplateParticipantID" Type="bigint" Nullable="false" />
          <Property Name="UserID" Type="bigint" />
        </EntityType>
        <EntityType Name="WorkflowInstances">
          <Key>
            <PropertyRef Name="WorkflowInstanceID" />
          </Key>
          <Property Name="WorkflowInstanceID" Type="bigint" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="WorkflowInstanceStatusID" Type="smallint" />
          <Property Name="WorkflowTemplateID" Type="bigint" Nullable="false" />
          <Property Name="WorkflowTemplateStepID" Type="bigint" Nullable="false" />
          <Property Name="WorkflowInstanceStateID" Type="smallint" StoreGeneratedPattern="Computed" />
          <Property Name="EntityID" Type="int" Nullable="false" />
          <Property Name="ItemID" Type="bigint" Nullable="false" />
          <Property Name="ReferenceNumber" Type="varchar" MaxLength="12" Nullable="false" />
          <Property Name="StartDate" Type="datetime" Nullable="false" />
          <Property Name="WarningDate" Type="datetime" />
          <Property Name="DueDate" Type="datetime" />
          <Property Name="EndDate" Type="datetime" />
          <Property Name="RequiredSteps" Type="varchar" MaxLength="100" />
          <Property Name="CreatedByID" Type="bigint" Nullable="false" />
          <Property Name="CreatedDate" Type="datetime" Nullable="false" />
          <Property Name="UpdatedByID" Type="bigint" Nullable="false" />
          <Property Name="UpdatedDate" Type="datetime" Nullable="false" />
          <Property Name="WorkflowInstanceAge" Type="int" Nullable="false" />
          <Property Name="Description" Type="varchar" MaxLength="255" />
          <Property Name="OfficeLocationID" Type="bigint" Nullable="false" />
        </EntityType>
        <EntityType Name="WorkflowInstanceStatus">
          <Key>
            <PropertyRef Name="WorkflowInstanceStatusID" />
          </Key>
          <Property Name="WorkflowInstanceStatusID" Type="smallint" Nullable="false" />
          <Property Name="Description" Type="varchar" MaxLength="50" Nullable="false" />
        </EntityType>
        <EntityType Name="WorkflowInstanceStatusHistory">
          <Key>
            <PropertyRef Name="WorkflowInstanceStatusHistoryID" />
          </Key>
          <Property Name="WorkflowInstanceStatusHistoryID" Type="bigint" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="WorkflowInstanceID" Type="bigint" Nullable="false" />
          <Property Name="WorkflowInstanceStatusID" Type="smallint" Nullable="false" />
          <Property Name="UserID" Type="bigint" Nullable="false" />
          <Property Name="Date" Type="datetime" Nullable="false" />
        </EntityType>
        <EntityType Name="WorkflowInstanceStepHistory">
          <Key>
            <PropertyRef Name="WorkflowInstanceStepHistoryID" />
          </Key>
          <Property Name="WorkflowInstanceStepHistoryID" Type="bigint" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="WorkflowInstanceID" Type="bigint" Nullable="false" />
          <Property Name="WorkflowTemplateStepID" Type="smallint" Nullable="false" />
          <Property Name="UserID" Type="bigint" Nullable="false" />
          <Property Name="Date" Type="datetime" Nullable="false" />
        </EntityType>
        <EntityType Name="WorkflowInstanceTasks">
          <Key>
            <PropertyRef Name="WorkflowInstanceTaskID" />
          </Key>
          <Property Name="WorkflowInstanceTaskID" Type="bigint" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="WorkflowInstanceID" Type="bigint" Nullable="false" />
          <Property Name="WorkflowInstanceTaskStatusID" Type="smallint" Nullable="false" />
          <Property Name="WorkflowTemplateStepID" Type="bigint" Nullable="false" />
          <Property Name="DateCompleted" Type="datetime" />
          <Property Name="AssignedToID" Type="bigint" Nullable="false" />
          <Property Name="CompletedByID" Type="bigint" />
          <Property Name="Description" Type="varchar" MaxLength="255" Nullable="false" />
          <Property Name="Comments" Type="varchar" MaxLength="1000" />
          <Property Name="CreatedByID" Type="bigint" Nullable="false" />
          <Property Name="CreatedDate" Type="datetime" Nullable="false" />
          <Property Name="UpdatedByID" Type="bigint" Nullable="false" />
          <Property Name="UpdatedDate" Type="datetime" Nullable="false" />
          <Property Name="EscalatedFromID" Type="bigint" />
        </EntityType>
        <EntityType Name="WorkflowInstanceTaskStatus">
          <Key>
            <PropertyRef Name="WorkflowInstanceTaskStatusID" />
          </Key>
          <Property Name="WorkflowInstanceTaskStatusID" Type="smallint" Nullable="false" />
          <Property Name="Description" Type="varchar" MaxLength="50" Nullable="false" />
          <Property Name="IsCancelled" Type="bit" Nullable="false" />
        </EntityType>
        <EntityType Name="WorkflowInstanceTaskStatusHistory">
          <Key>
            <PropertyRef Name="WorkflowInstanceTaskStatusHistoryID" />
          </Key>
          <Property Name="WorkflowInstanceTaskStatusHistoryID" Type="bigint" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="WorkflowInstanceTaskID" Type="bigint" Nullable="false" />
          <Property Name="WorkflowInstanceTaskStatusID" Type="smallint" Nullable="false" />
          <Property Name="UserID" Type="bigint" Nullable="false" />
          <Property Name="Date" Type="datetime" Nullable="false" />
        </EntityType>
        <EntityType Name="Workflows">
          <Key>
            <PropertyRef Name="WorkflowID" />
          </Key>
          <Property Name="WorkflowID" Type="bigint" Nullable="false" />
          <Property Name="DashboardControllerName" Type="varchar" MaxLength="50" />
          <Property Name="WorkflowControllerName" Type="varchar" MaxLength="50" Nullable="false" />
          <Property Name="WorkflowFriendlyName" Type="varchar" MaxLength="50" Nullable="false" />
          <Property Name="WorkflowDescription" Type="varchar" MaxLength="255" />
          <Property Name="EntityID" Type="int" Nullable="false" />
          <Property Name="CreatedByID" Type="bigint" Nullable="false" />
          <Property Name="CreatedDate" Type="datetime" Nullable="false" />
          <Property Name="UpdatedByID" Type="bigint" Nullable="false" />
          <Property Name="UpdatedDate" Type="datetime" Nullable="false" />
          <Property Name="WorkflowCategoryID" Type="smallint" Nullable="false" />
          <Property Name="AdministratorRoles" Type="varchar" MaxLength="100" Nullable="false" />
          <Property Name="InitiatorRoles" Type="varchar" MaxLength="100" Nullable="false" />
          <Property Name="HelpUrl" Type="varchar" MaxLength="1000" />
          <Property Name="ViewerRoles" Type="varchar" MaxLength="100" />
        </EntityType>
        <EntityType Name="WorkflowTemplateDefaults">
          <Key>
            <PropertyRef Name="WorkflowTemplateDefaultID" />
          </Key>
          <Property Name="WorkflowTemplateDefaultID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="WorkflowTemplateID" Type="bigint" Nullable="false" />
          <Property Name="Description" Type="varchar" MaxLength="100" Nullable="false" />
          <Property Name="Value" Type="varchar" MaxLength="2000" Nullable="false" />
        </EntityType>
        <EntityType Name="WorkflowTemplateDocuments">
          <Key>
            <PropertyRef Name="WorkflowTemplateDocumentID" />
          </Key>
          <Property Name="WorkflowTemplateDocumentID" Type="bigint" Nullable="false" />
          <Property Name="WorkflowTemplateID" Type="bigint" Nullable="false" />
          <Property Name="DocumentTypeID" Type="smallint" Nullable="false" />
          <Property Name="IsRequiredSql" Type="varchar(max)" Nullable="false" />
          <Property Name="IsAvailableForUploadSql" Type="varchar(max)" Nullable="false" />
          <Property Name="OrderBy" Type="smallint" Nullable="false" />
          <Property Name="IsCancelled" Type="bit" Nullable="false" />
        </EntityType>
        <EntityType Name="WorkflowTemplateParticipantRoles">
          <Key>
            <PropertyRef Name="WorkflowTemplateParticipantID" />
            <PropertyRef Name="RoleID" />
          </Key>
          <Property Name="WorkflowTemplateParticipantID" Type="bigint" Nullable="false" />
          <Property Name="RoleID" Type="smallint" Nullable="false" />
        </EntityType>
        <EntityType Name="WorkflowTemplateParticipants">
          <Key>
            <PropertyRef Name="WorkflowTemplateParticipantID" />
          </Key>
          <Property Name="WorkflowTemplateParticipantID" Type="bigint" Nullable="false" />
          <Property Name="WorkflowTemplateID" Type="bigint" Nullable="false" />
          <Property Name="FieldName" Type="varchar" MaxLength="50" Nullable="false" />
          <Property Name="DisplayName" Type="varchar" MaxLength="50" />
          <Property Name="DefaultUserID" Type="bigint" />
          <Property Name="IsVisible" Type="bit" Nullable="false" />
          <Property Name="OrderBy" Type="smallint" Nullable="false" />
          <Property Name="DocumentPermissionLevel" Type="varchar" MaxLength="50" />
        </EntityType>
        <EntityType Name="WorkflowTemplates">
          <Key>
            <PropertyRef Name="WorkflowTemplateID" />
          </Key>
          <Property Name="WorkflowTemplateID" Type="bigint" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="WorkflowID" Type="bigint" Nullable="false" />
          <Property Name="WorkflowTemplateStatusID" Type="smallint" Nullable="false" />
          <Property Name="DocumentStoreLocationID" Type="bigint" Nullable="false" />
          <Property Name="Version" Type="smallint" Nullable="false" />
          <Property Name="RouteLayout" Type="varchar(max)" />
          <Property Name="CustomWorkflowTaskEmailRequired" Type="bit" Nullable="false" />
          <Property Name="CustomWorkflowTaskEmailScriptID" Type="bigint" />
          <Property Name="MessageTemplateID_NewTask" Type="bigint" />
          <Property Name="MessageTemplateID_CancelledTask" Type="bigint" />
          <Property Name="MessageTemplateID_ReAssignedTask" Type="bigint" />
          <Property Name="CreatedByID" Type="bigint" Nullable="false" />
          <Property Name="CreatedDate" Type="datetime" Nullable="false" />
          <Property Name="UpdatedByID" Type="bigint" Nullable="false" />
          <Property Name="UpdatedDate" Type="datetime" Nullable="false" />
          <Property Name="DescriptionTemplate" Type="varchar" MaxLength="255" />
          <Property Name="ParticipantUpdateProcedure" Type="varchar" MaxLength="255" />
          <Property Name="NextStepCheckProcedure" Type="varchar" MaxLength="255" />
          <Property Name="PostSaveProcedure" Type="varchar" MaxLength="255" />
          <Property Name="MoveToVerifiedProcedure" Type="varchar" MaxLength="255" />
        </EntityType>
        <EntityType Name="WorkflowTemplateStatus">
          <Key>
            <PropertyRef Name="WorkflowTemplateStatusID" />
          </Key>
          <Property Name="WorkflowTemplateStatusID" Type="smallint" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="Description" Type="varchar" MaxLength="50" Nullable="false" />
          <Property Name="IsCancelled" Type="bit" Nullable="false" />
        </EntityType>
        <EntityType Name="WorkflowTemplateStatusHistory">
          <Key>
            <PropertyRef Name="WorkflowTemplateStatusHistoryID" />
          </Key>
          <Property Name="WorkflowTemplateStatusHistoryID" Type="bigint" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="WorkflowTemplateID" Type="bigint" Nullable="false" />
          <Property Name="WorkflowTemplateStatusID" Type="smallint" Nullable="false" />
          <Property Name="UserID" Type="bigint" Nullable="false" />
          <Property Name="Date" Type="datetime" Nullable="false" />
        </EntityType>
        <EntityType Name="WorkflowTemplateStepAssignees">
          <Key>
            <PropertyRef Name="WorkflowTemplateStepAssigneeID" />
          </Key>
          <Property Name="WorkflowTemplateStepAssigneeID" Type="bigint" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="WorkflowTemplateStepID" Type="bigint" Nullable="false" />
          <Property Name="WorkflowTemplateParticipantID" Type="bigint" Nullable="false" />
          <Property Name="IsMandatory" Type="bit" Nullable="false" />
        </EntityType>
        <EntityType Name="WorkflowTemplateSteps">
          <Key>
            <PropertyRef Name="WorkflowTemplateStepID" />
          </Key>
          <Property Name="WorkflowTemplateStepID" Type="bigint" Nullable="false" />
          <Property Name="WorkflowTemplateID" Type="bigint" Nullable="false" />
          <Property Name="WorkflowTemplateStepTypeID" Type="smallint" Nullable="false" />
          <Property Name="Branch" Type="float" Nullable="false" />
          <Property Name="Step" Type="float" Nullable="false" />
          <Property Name="StepParent" Type="float" Nullable="false" />
          <Property Name="StepNext" Type="float" Nullable="false" />
          <Property Name="StepTitle" Type="varchar" MaxLength="255" Nullable="false" />
          <Property Name="StepDescription" Type="varchar" MaxLength="255" />
          <Property Name="StepDurationWarning" Type="int" Nullable="false" />
          <Property Name="StepDurationOvertime" Type="int" Nullable="false" />
          <Property Name="IsDefaultStep" Type="bit" Nullable="false" />
          <Property Name="WorkflowTaskHandlerID" Type="bigint" />
          <Property Name="IsRequiredScript" Type="varchar" MaxLength="1000" />
          <Property Name="IsEmailRequired" Type="bit" Nullable="false" />
          <Property Name="StepNextPossibles" Type="varchar" MaxLength="100" />
          <Property Name="StepApplicationRoles" Type="varchar" MaxLength="1000" />
          <Property Name="StepReassignRoles" Type="varchar" MaxLength="1000" />
          <Property Name="IsRequiredXml" Type="xml" />
          <Property Name="CanAutoExpire" Type="bit" Nullable="false" />
        </EntityType>
        <EntityType Name="WorkflowTemplateStepTypes">
          <Key>
            <PropertyRef Name="WorkflowTemplateStepTypeID" />
          </Key>
          <Property Name="WorkflowTemplateStepTypeID" Type="smallint" Nullable="false" />
          <Property Name="Description" Type="varchar" MaxLength="50" Nullable="false" />
          <Property Name="IsCancelled" Type="bit" Nullable="false" />
        </EntityType>
        <EntityType Name="WorkflowTemplateTriggerActions">
          <Key>
            <PropertyRef Name="WorkflowTemplateTriggerActionID" />
          </Key>
          <Property Name="WorkflowTemplateTriggerActionID" Type="smallint" Nullable="false" />
          <Property Name="Description" Type="varchar" MaxLength="50" Nullable="false" />
          <Property Name="IsCancelled" Type="bit" Nullable="false" />
        </EntityType>
        <EntityType Name="WorkflowTemplateTriggers">
          <Key>
            <PropertyRef Name="WorkflowTemplateTriggerID" />
          </Key>
          <Property Name="WorkflowTemplateTriggerID" Type="bigint" StoreGeneratedPattern="Identity" Nullable="false" />
          <Property Name="WorkflowTemplateID" Type="bigint" Nullable="false" />
          <Property Name="WorkflowTemplateStepID" Type="bigint" />
          <Property Name="WorkflowTemplateTriggerTypeID" Type="smallint" Nullable="false" />
          <Property Name="WorkflowTemplateTriggerActionID" Type="smallint" Nullable="false" />
          <Property Name="Title" Type="varchar" MaxLength="1000" Nullable="false" />
          <Property Name="WorkflowTemplateScriptID" Type="int" />
          <Property Name="MessageTemplateID" Type="int" />
          <Property Name="IsRequiredXml" Type="xml" />
          <Property Name="IsRequiredScript" Type="varchar" MaxLength="1000" />
          <Property Name="IsRequiredStatusIds" Type="varchar" MaxLength="40" />
        </EntityType>
        <EntityType Name="WorkflowTemplateTriggerTypes">
          <Key>
            <PropertyRef Name="WorkflowTemplateTriggerTypeID" />
          </Key>
          <Property Name="WorkflowTemplateTriggerTypeID" Type="smallint" Nullable="false" />
          <Property Name="Description" Type="varchar" MaxLength="50" Nullable="false" />
          <Property Name="IsCancelled" Type="bit" Nullable="false" />
        </EntityType>
        <!--Errors Found During Generation:
warning 6002: The table/view 'EPWP.Wf.Vw_WorkflowInstanceDocuments' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
        <EntityType Name="Vw_WorkflowInstanceDocuments">
          <Key>
            <PropertyRef Name="WorkflowInstanceDocumentID" />
            <PropertyRef Name="WorkflowInstanceID" />
            <PropertyRef Name="DocumentTypeID" />
            <PropertyRef Name="IsMandatory" />
            <PropertyRef Name="IsCancelled" />
            <PropertyRef Name="DocumentDescription" />
            <PropertyRef Name="IsDocumentTitleEditable" />
          </Key>
          <Property Name="WorkflowInstanceDocumentID" Type="bigint" Nullable="false" />
          <Property Name="WorkflowInstanceID" Type="bigint" Nullable="false" />
          <Property Name="DocumentTypeID" Type="smallint" Nullable="false" />
          <Property Name="DocumentID" Type="bigint" />
          <Property Name="IsMandatory" Type="bit" Nullable="false" />
          <Property Name="IsCancelled" Type="bit" Nullable="false" />
          <Property Name="IsExpiryDateRequired" Type="bit" />
          <Property Name="ExpiryDate" Type="datetime" />
          <Property Name="Title" Type="varchar" MaxLength="255" />
          <Property Name="DocumentDescription" Type="varchar" MaxLength="255" Nullable="false" />
          <Property Name="IsDocumentTitleEditable" Type="bit" Nullable="false" />
          <Property Name="DocumentVerificationStatusID" Type="smallint" />
        </EntityType>
        <!--Errors Found During Generation:
warning 6002: The table/view 'EPWP.Wf.Vw_WorkflowInstances' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
        <EntityType Name="Vw_WorkflowInstances">
          <Key>
            <PropertyRef Name="WorkflowInstanceID" />
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
          </Key>
          <Property Name="WorkflowInstanceID" Type="bigint" Nullable="false" StoreGeneratedPattern="Identity" />
          <Property Name="WorkflowInstanceDescription" Type="varchar" MaxLength="255" />
          <Property Name="WorkflowStartDate" Type="datetime" Nullable="false" />
          <Property Name="WorkflowEndDate" Type="datetime" />
          <Property Name="CreatedByID" Type="bigint" Nullable="false" />
          <Property Name="CreatedDate" Type="datetime" Nullable="false" />
          <Property Name="WorkflowInstanceStatusID" Type="smallint" Nullable="false" />
          <Property Name="WorkflowInstanceStatus" Type="varchar" MaxLength="50" Nullable="false" />
          <Property Name="WorkflowTemplateID" Type="bigint" Nullable="false" />
          <Property Name="WorkflowTemplateStepID" Type="bigint" Nullable="false" />
          <Property Name="EntityID" Type="int" Nullable="false" />
          <Property Name="ItemID" Type="bigint" Nullable="false" />
          <Property Name="ReferenceNumber" Type="varchar" MaxLength="12" Nullable="false" />
          <Property Name="Description" Type="varchar" MaxLength="255" />
          <Property Name="WorkflowID" Type="bigint" Nullable="false" />
          <Property Name="DashboardControllerName" Type="varchar" MaxLength="50" />
          <Property Name="WorkflowControllerName" Type="varchar" MaxLength="50" Nullable="false" />
          <Property Name="Reference" Type="varchar" MaxLength="12" Nullable="false" />
          <Property Name="WarningDate" Type="datetime" />
          <Property Name="DueDate" Type="datetime" />
          <Property Name="WorkflowFriendlyName" Type="varchar" MaxLength="50" Nullable="false" />
          <Property Name="UpdatedByID" Type="bigint" Nullable="false" />
          <Property Name="UpdatedDate" Type="datetime" Nullable="false" />
          <Property Name="ASsignedTo" Type="varchar" MaxLength="1" Nullable="false" />
          <Property Name="CreatedByName" Type="varchar" MaxLength="101" />
          <Property Name="WorkflowInstanceStateID" Type="smallint" Nullable="false" />
          <Property Name="WorkflowInstanceState" Type="varchar" MaxLength="50" Nullable="false" />
          <Property Name="WorkflowInstanceAge" Type="int" Nullable="false" />
          <Property Name="StepNumber" Type="float" Nullable="false" />
          <Property Name="StepTitle" Type="varchar" MaxLength="255" Nullable="false" />
        </EntityType>
        <!--Errors Found During Generation:
warning 6002: The table/view 'EPWP.Wf.Vw_WorkflowInstanceTasks' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
        <EntityType Name="Vw_WorkflowInstanceTasks">
          <Key>
            <PropertyRef Name="WorkflowInstanceTaskID" />
            <PropertyRef Name="WorkflowInstanceID" />
            <PropertyRef Name="WorkflowInstanceTaskStatusID" />
            <PropertyRef Name="WorkflowTemplateStepID" />
            <PropertyRef Name="DateCreated" />
            <PropertyRef Name="AssignedToID" />
            <PropertyRef Name="TaskStatusDescription" />
            <PropertyRef Name="WorkflowTemplateStepNumber" />
            <PropertyRef Name="WorkflowTemplateStepTitle" />
            <PropertyRef Name="WorkflowTemplateStepDurationOvertime" />
            <PropertyRef Name="WorkflowTemplateStepTypeID" />
            <PropertyRef Name="WorkflowTemplateStepTypeDescription" />
            <PropertyRef Name="WorkflowInstanceEntityID" />
            <PropertyRef Name="WorkflowInstanceItemID" />
            <PropertyRef Name="WorkflowInstanceReference" />
            <PropertyRef Name="WorkflowInstanceCreatedDate" />
            <PropertyRef Name="WorkflowInstanceCreatedByID" />
            <PropertyRef Name="WorkflowID" />
            <PropertyRef Name="WorkflowFriendlyName" />
            <PropertyRef Name="WorkflowControllerName" />
          </Key>
          <Property Name="WorkflowInstanceTaskID" Type="bigint" Nullable="false" />
          <Property Name="WorkflowInstanceID" Type="bigint" Nullable="false" />
          <Property Name="WorkflowInstanceTaskStatusID" Type="smallint" Nullable="false" />
          <Property Name="WorkflowTemplateStepID" Type="bigint" Nullable="false" />
          <Property Name="DateCreated" Type="datetime" Nullable="false" />
          <Property Name="DateCompleted" Type="datetime" />
          <Property Name="AssignedToID" Type="bigint" Nullable="false" />
          <Property Name="CompletedByID" Type="bigint" />
          <Property Name="Description" Type="varchar" MaxLength="512" />
          <Property Name="Comments" Type="varchar" MaxLength="1000" />
          <Property Name="TaskStatusDescription" Type="varchar" MaxLength="50" Nullable="false" />
          <Property Name="WorkflowTemplateStepNumber" Type="float" Nullable="false" />
          <Property Name="WorkflowTemplateStepTitle" Type="varchar" MaxLength="255" Nullable="false" />
          <Property Name="WorkflowTemplateStepDurationOvertime" Type="int" Nullable="false" />
          <Property Name="WorkflowTemplateStepTypeID" Type="smallint" Nullable="false" />
          <Property Name="WorkflowTemplateStepTypeDescription" Type="varchar" MaxLength="50" Nullable="false" />
          <Property Name="AssignedToName" Type="varchar" MaxLength="101" />
          <Property Name="CompletedByName" Type="varchar" MaxLength="101" />
          <Property Name="WorkflowInstanceEntityID" Type="int" Nullable="false" />
          <Property Name="WorkflowInstanceItemID" Type="bigint" Nullable="false" />
          <Property Name="WorkflowInstanceReference" Type="varchar" MaxLength="12" Nullable="false" />
          <Property Name="WorkflowInstanceCreatedDate" Type="datetime" Nullable="false" />
          <Property Name="WorkflowInstanceCreatedByID" Type="bigint" Nullable="false" />
          <Property Name="WorkflowInstanceCreatedByName" Type="varchar" MaxLength="101" />
          <Property Name="WorkflowID" Type="bigint" Nullable="false" />
          <Property Name="WorkflowFriendlyName" Type="varchar" MaxLength="50" Nullable="false" />
          <Property Name="WorkflowControllerName" Type="varchar" MaxLength="50" Nullable="false" />
          <Property Name="TaskDuration" Type="varchar" MaxLength="100" />
          <Property Name="EscalatedFromID" Type="bigint" />
        </EntityType>
        <!--Errors Found During Generation:
warning 6002: The table/view 'EPWP.Wf.Vw_WorkflowTemplates' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
        <EntityType Name="Vw_WorkflowTemplates">
          <Key>
            <PropertyRef Name="WorkflowID" />
            <PropertyRef Name="WorkflowFriendlyName" />
            <PropertyRef Name="WorkflowControllerName" />
            <PropertyRef Name="EntityName" />
            <PropertyRef Name="WorkflowTemplateID" />
            <PropertyRef Name="WorkflowTemplateStatusID" />
            <PropertyRef Name="Version" />
          </Key>
          <Property Name="WorkflowID" Type="bigint" Nullable="false" />
          <Property Name="WorkflowFriendlyName" Type="varchar" MaxLength="50" Nullable="false" />
          <Property Name="WorkflowDescription" Type="varchar" MaxLength="255" />
          <Property Name="WorkflowControllerName" Type="varchar" MaxLength="50" Nullable="false" />
          <Property Name="EntityName" Type="varchar" MaxLength="50" Nullable="false" />
          <Property Name="WorkflowTemplateID" Type="bigint" Nullable="false" />
          <Property Name="WorkflowTemplateStatusID" Type="smallint" Nullable="false" />
          <Property Name="Version" Type="smallint" Nullable="false" />
          <Property Name="TotalRequestsInPogress" Type="int" />
        </EntityType>
        <Association Name="FK_Users_AssignedTo">
          <End Role="Users" Type="Self.Users" Multiplicity="1" />
          <End Role="WorkflowInstanceTasks" Type="Self.WorkflowInstanceTasks" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Users">
              <PropertyRef Name="UserID" />
            </Principal>
            <Dependent Role="WorkflowInstanceTasks">
              <PropertyRef Name="AssignedToID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_Users_CompletedBy">
          <End Role="Users" Type="Self.Users" Multiplicity="0..1" />
          <End Role="WorkflowInstanceTasks" Type="Self.WorkflowInstanceTasks" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Users">
              <PropertyRef Name="UserID" />
            </Principal>
            <Dependent Role="WorkflowInstanceTasks">
              <PropertyRef Name="CompletedByID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_Users_Entities">
          <End Role="Entities" Type="Self.Entities" Multiplicity="0..1" />
          <End Role="Users" Type="Self.Users" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Entities">
              <PropertyRef Name="EntityID" />
            </Principal>
            <Dependent Role="Users">
              <PropertyRef Name="EntityID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowBuddies_Workflows">
          <End Role="Workflows" Type="Self.Workflows" Multiplicity="1" />
          <End Role="WorkflowBuddies" Type="Self.WorkflowBuddies" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Workflows">
              <PropertyRef Name="WorkflowID" />
            </Principal>
            <Dependent Role="WorkflowBuddies">
              <PropertyRef Name="WorkflowID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowInstanceDocuments_WorkflowInstances">
          <End Role="WorkflowInstances" Type="Self.WorkflowInstances" Multiplicity="1" />
          <End Role="WorkflowInstanceDocuments" Type="Self.WorkflowInstanceDocuments" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowInstances">
              <PropertyRef Name="WorkflowInstanceID" />
            </Principal>
            <Dependent Role="WorkflowInstanceDocuments">
              <PropertyRef Name="WorkflowInstanceID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowInstanceParticipants_WorkflowTemplateParticipants">
          <End Role="WorkflowTemplateParticipants" Type="Self.WorkflowTemplateParticipants" Multiplicity="1" />
          <End Role="WorkflowInstanceParticipants" Type="Self.WorkflowInstanceParticipants" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplateParticipants">
              <PropertyRef Name="WorkflowTemplateParticipantID" />
            </Principal>
            <Dependent Role="WorkflowInstanceParticipants">
              <PropertyRef Name="WorkflowTemplateParticipantID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowInstances_WorkflowInstanceParticipants">
          <End Role="WorkflowInstances" Type="Self.WorkflowInstances" Multiplicity="1" />
          <End Role="WorkflowInstanceParticipants" Type="Self.WorkflowInstanceParticipants" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowInstances">
              <PropertyRef Name="WorkflowInstanceID" />
            </Principal>
            <Dependent Role="WorkflowInstanceParticipants">
              <PropertyRef Name="WorkflowInstanceID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowInstances_WorkflowInstanceStatus">
          <End Role="WorkflowInstanceStatus" Type="Self.WorkflowInstanceStatus" Multiplicity="0..1" />
          <End Role="WorkflowInstances" Type="Self.WorkflowInstances" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowInstanceStatus">
              <PropertyRef Name="WorkflowInstanceStatusID" />
            </Principal>
            <Dependent Role="WorkflowInstances">
              <PropertyRef Name="WorkflowInstanceStatusID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowInstances_WorkflowTemplates">
          <End Role="WorkflowTemplates" Type="Self.WorkflowTemplates" Multiplicity="1" />
          <End Role="WorkflowInstances" Type="Self.WorkflowInstances" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplates">
              <PropertyRef Name="WorkflowTemplateID" />
            </Principal>
            <Dependent Role="WorkflowInstances">
              <PropertyRef Name="WorkflowTemplateID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowInstances_WorkflowTemplateSteps">
          <End Role="WorkflowTemplateSteps" Type="Self.WorkflowTemplateSteps" Multiplicity="1" />
          <End Role="WorkflowInstances" Type="Self.WorkflowInstances" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplateSteps">
              <PropertyRef Name="WorkflowTemplateStepID" />
            </Principal>
            <Dependent Role="WorkflowInstances">
              <PropertyRef Name="WorkflowTemplateStepID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowInstanceStatusHistory_WorkflowInstances">
          <End Role="WorkflowInstances" Type="Self.WorkflowInstances" Multiplicity="1" />
          <End Role="WorkflowInstanceStatusHistory" Type="Self.WorkflowInstanceStatusHistory" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowInstances">
              <PropertyRef Name="WorkflowInstanceID" />
            </Principal>
            <Dependent Role="WorkflowInstanceStatusHistory">
              <PropertyRef Name="WorkflowInstanceID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowInstanceStepHistory_WorkflowInstances">
          <End Role="WorkflowInstances" Type="Self.WorkflowInstances" Multiplicity="1" />
          <End Role="WorkflowInstanceStepHistory" Type="Self.WorkflowInstanceStepHistory" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowInstances">
              <PropertyRef Name="WorkflowInstanceID" />
            </Principal>
            <Dependent Role="WorkflowInstanceStepHistory">
              <PropertyRef Name="WorkflowInstanceID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowInstanceTasks_Users1">
          <End Role="Users" Type="Self.Users" Multiplicity="0..1" />
          <End Role="WorkflowInstanceTasks" Type="Self.WorkflowInstanceTasks" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Users">
              <PropertyRef Name="UserID" />
            </Principal>
            <Dependent Role="WorkflowInstanceTasks">
              <PropertyRef Name="EscalatedFromID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowInstanceTasks_WorkflowInstances">
          <End Role="WorkflowInstances" Type="Self.WorkflowInstances" Multiplicity="1" />
          <End Role="WorkflowInstanceTasks" Type="Self.WorkflowInstanceTasks" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowInstances">
              <PropertyRef Name="WorkflowInstanceID" />
            </Principal>
            <Dependent Role="WorkflowInstanceTasks">
              <PropertyRef Name="WorkflowInstanceID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowInstanceTasks_WorkflowInstanceTaskStatus">
          <End Role="WorkflowInstanceTaskStatus" Type="Self.WorkflowInstanceTaskStatus" Multiplicity="1" />
          <End Role="WorkflowInstanceTasks" Type="Self.WorkflowInstanceTasks" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowInstanceTaskStatus">
              <PropertyRef Name="WorkflowInstanceTaskStatusID" />
            </Principal>
            <Dependent Role="WorkflowInstanceTasks">
              <PropertyRef Name="WorkflowInstanceTaskStatusID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowInstanceTasks_WorkflowTemplateSteps">
          <End Role="WorkflowTemplateSteps" Type="Self.WorkflowTemplateSteps" Multiplicity="1" />
          <End Role="WorkflowInstanceTasks" Type="Self.WorkflowInstanceTasks" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplateSteps">
              <PropertyRef Name="WorkflowTemplateStepID" />
            </Principal>
            <Dependent Role="WorkflowInstanceTasks">
              <PropertyRef Name="WorkflowTemplateStepID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowInstanceTaskStatusHistory_WorkflowInstanceTaskStatus">
          <End Role="WorkflowInstanceTaskStatus" Type="Self.WorkflowInstanceTaskStatus" Multiplicity="1" />
          <End Role="WorkflowInstanceTaskStatusHistory" Type="Self.WorkflowInstanceTaskStatusHistory" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowInstanceTaskStatus">
              <PropertyRef Name="WorkflowInstanceTaskStatusID" />
            </Principal>
            <Dependent Role="WorkflowInstanceTaskStatusHistory">
              <PropertyRef Name="WorkflowInstanceTaskStatusID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_Workflows_Entities">
          <End Role="Entities" Type="Self.Entities" Multiplicity="1" />
          <End Role="Workflows" Type="Self.Workflows" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Entities">
              <PropertyRef Name="EntityID" />
            </Principal>
            <Dependent Role="Workflows">
              <PropertyRef Name="EntityID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplateDefaults_WorkflowTemplates">
          <End Role="WorkflowTemplates" Type="Self.WorkflowTemplates" Multiplicity="1" />
          <End Role="WorkflowTemplateDefaults" Type="Self.WorkflowTemplateDefaults" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplates">
              <PropertyRef Name="WorkflowTemplateID" />
            </Principal>
            <Dependent Role="WorkflowTemplateDefaults">
              <PropertyRef Name="WorkflowTemplateID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplateDocuments_WorkflowTemplates">
          <End Role="WorkflowTemplates" Type="Self.WorkflowTemplates" Multiplicity="1" />
          <End Role="WorkflowTemplateDocuments" Type="Self.WorkflowTemplateDocuments" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplates">
              <PropertyRef Name="WorkflowTemplateID" />
            </Principal>
            <Dependent Role="WorkflowTemplateDocuments">
              <PropertyRef Name="WorkflowTemplateID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplateParticipantRoles_WorkflowTemplateParticipants">
          <End Role="WorkflowTemplateParticipants" Type="Self.WorkflowTemplateParticipants" Multiplicity="1" />
          <End Role="WorkflowTemplateParticipantRoles" Type="Self.WorkflowTemplateParticipantRoles" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplateParticipants">
              <PropertyRef Name="WorkflowTemplateParticipantID" />
            </Principal>
            <Dependent Role="WorkflowTemplateParticipantRoles">
              <PropertyRef Name="WorkflowTemplateParticipantID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplateParticipants_WorkflowTemplates">
          <End Role="WorkflowTemplates" Type="Self.WorkflowTemplates" Multiplicity="1" />
          <End Role="WorkflowTemplateParticipants" Type="Self.WorkflowTemplateParticipants" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplates">
              <PropertyRef Name="WorkflowTemplateID" />
            </Principal>
            <Dependent Role="WorkflowTemplateParticipants">
              <PropertyRef Name="WorkflowTemplateID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplates_Workflows">
          <End Role="Workflows" Type="Self.Workflows" Multiplicity="1" />
          <End Role="WorkflowTemplates" Type="Self.WorkflowTemplates" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Workflows">
              <PropertyRef Name="WorkflowID" />
            </Principal>
            <Dependent Role="WorkflowTemplates">
              <PropertyRef Name="WorkflowID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplates_WorkflowTemplateStatus">
          <End Role="WorkflowTemplateStatus" Type="Self.WorkflowTemplateStatus" Multiplicity="1" />
          <End Role="WorkflowTemplates" Type="Self.WorkflowTemplates" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplateStatus">
              <PropertyRef Name="WorkflowTemplateStatusID" />
            </Principal>
            <Dependent Role="WorkflowTemplates">
              <PropertyRef Name="WorkflowTemplateStatusID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplateStatusHistory_WorkflowTemplates">
          <End Role="WorkflowTemplates" Type="Self.WorkflowTemplates" Multiplicity="1" />
          <End Role="WorkflowTemplateStatusHistory" Type="Self.WorkflowTemplateStatusHistory" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplates">
              <PropertyRef Name="WorkflowTemplateID" />
            </Principal>
            <Dependent Role="WorkflowTemplateStatusHistory">
              <PropertyRef Name="WorkflowTemplateID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplateStatusHistory_WorkflowTemplateStatus">
          <End Role="WorkflowTemplateStatus" Type="Self.WorkflowTemplateStatus" Multiplicity="1" />
          <End Role="WorkflowTemplateStatusHistory" Type="Self.WorkflowTemplateStatusHistory" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplateStatus">
              <PropertyRef Name="WorkflowTemplateStatusID" />
            </Principal>
            <Dependent Role="WorkflowTemplateStatusHistory">
              <PropertyRef Name="WorkflowTemplateStatusID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplateStepAssignees_WorkflowTemplateParticipants">
          <End Role="WorkflowTemplateParticipants" Type="Self.WorkflowTemplateParticipants" Multiplicity="1" />
          <End Role="WorkflowTemplateStepAssignees" Type="Self.WorkflowTemplateStepAssignees" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplateParticipants">
              <PropertyRef Name="WorkflowTemplateParticipantID" />
            </Principal>
            <Dependent Role="WorkflowTemplateStepAssignees">
              <PropertyRef Name="WorkflowTemplateParticipantID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplateStepAssignees_WorkflowTemplateSteps">
          <End Role="WorkflowTemplateSteps" Type="Self.WorkflowTemplateSteps" Multiplicity="1" />
          <End Role="WorkflowTemplateStepAssignees" Type="Self.WorkflowTemplateStepAssignees" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplateSteps">
              <PropertyRef Name="WorkflowTemplateStepID" />
            </Principal>
            <Dependent Role="WorkflowTemplateStepAssignees">
              <PropertyRef Name="WorkflowTemplateStepID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplateSteps_WorkflowTemplates">
          <End Role="WorkflowTemplates" Type="Self.WorkflowTemplates" Multiplicity="1" />
          <End Role="WorkflowTemplateSteps" Type="Self.WorkflowTemplateSteps" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplates">
              <PropertyRef Name="WorkflowTemplateID" />
            </Principal>
            <Dependent Role="WorkflowTemplateSteps">
              <PropertyRef Name="WorkflowTemplateID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplateSteps_WorkflowTemplateStepTypes">
          <End Role="WorkflowTemplateStepTypes" Type="Self.WorkflowTemplateStepTypes" Multiplicity="1" />
          <End Role="WorkflowTemplateSteps" Type="Self.WorkflowTemplateSteps" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplateStepTypes">
              <PropertyRef Name="WorkflowTemplateStepTypeID" />
            </Principal>
            <Dependent Role="WorkflowTemplateSteps">
              <PropertyRef Name="WorkflowTemplateStepTypeID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplateTriggers_WorkflowTemplates">
          <End Role="WorkflowTemplates" Type="Self.WorkflowTemplates" Multiplicity="1" />
          <End Role="WorkflowTemplateTriggers" Type="Self.WorkflowTemplateTriggers" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplates">
              <PropertyRef Name="WorkflowTemplateID" />
            </Principal>
            <Dependent Role="WorkflowTemplateTriggers">
              <PropertyRef Name="WorkflowTemplateID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplateTriggers_WorkflowTemplateSteps">
          <End Role="WorkflowTemplateSteps" Type="Self.WorkflowTemplateSteps" Multiplicity="0..1" />
          <End Role="WorkflowTemplateTriggers" Type="Self.WorkflowTemplateTriggers" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplateSteps">
              <PropertyRef Name="WorkflowTemplateStepID" />
            </Principal>
            <Dependent Role="WorkflowTemplateTriggers">
              <PropertyRef Name="WorkflowTemplateStepID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplateTriggers_WorkflowTemplateTriggerActions">
          <End Role="WorkflowTemplateTriggerActions" Type="Self.WorkflowTemplateTriggerActions" Multiplicity="1" />
          <End Role="WorkflowTemplateTriggers" Type="Self.WorkflowTemplateTriggers" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplateTriggerActions">
              <PropertyRef Name="WorkflowTemplateTriggerActionID" />
            </Principal>
            <Dependent Role="WorkflowTemplateTriggers">
              <PropertyRef Name="WorkflowTemplateTriggerActionID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplateTriggers_WorkflowTemplateTriggerTypes">
          <End Role="WorkflowTemplateTriggerTypes" Type="Self.WorkflowTemplateTriggerTypes" Multiplicity="1" />
          <End Role="WorkflowTemplateTriggers" Type="Self.WorkflowTemplateTriggers" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplateTriggerTypes">
              <PropertyRef Name="WorkflowTemplateTriggerTypeID" />
            </Principal>
            <Dependent Role="WorkflowTemplateTriggers">
              <PropertyRef Name="WorkflowTemplateTriggerTypeID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="PK_WorkflowInstanceStatusHistory_WorkflowInstanceStatus">
          <End Role="WorkflowInstanceStatus" Type="Self.WorkflowInstanceStatus" Multiplicity="1" />
          <End Role="WorkflowInstanceStatusHistory" Type="Self.WorkflowInstanceStatusHistory" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowInstanceStatus">
              <PropertyRef Name="WorkflowInstanceStatusID" />
            </Principal>
            <Dependent Role="WorkflowInstanceStatusHistory">
              <PropertyRef Name="WorkflowInstanceStatusID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Function Name="Pr_WorkflowInstanceDocumentExpiryDateUpdate" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="Wf">
          <Parameter Name="WorkflowInstanceDocumentID" Type="bigint" Mode="In" />
          <Parameter Name="ExpiryDate" Type="datetime" Mode="In" />
          <Parameter Name="UserID" Type="bigint" Mode="In" />
        </Function>
        <Function Name="Pr_WorkflowInstanceDocumentIdUpdate" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="Wf">
          <Parameter Name="WorkflowInstanceDocumentID" Type="bigint" Mode="In" />
          <Parameter Name="DocumentID" Type="bigint" Mode="In" />
          <Parameter Name="UserID" Type="bigint" Mode="In" />
        </Function>
        <Function Name="Pr_WorkflowInstanceDocumentsGet" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="Wf">
          <Parameter Name="WorkflowInstanceID" Type="bigint" Mode="In" />
          <Parameter Name="UserID" Type="bigint" Mode="In" />
        </Function>
        <Function Name="Pr_WorkflowInstanceDocumentsUpdate" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="Wf">
          <Parameter Name="WorkflowInstanceID" Type="bigint" Mode="In" />
          <Parameter Name="UserID" Type="bigint" Mode="In" />
        </Function>
        <Function Name="Pr_WorkflowInstanceDocumentTitleUpdate" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="Wf">
          <Parameter Name="WorkflowInstanceDocumentID" Type="bigint" Mode="In" />
          <Parameter Name="Title" Type="varchar" Mode="In" />
          <Parameter Name="UserID" Type="bigint" Mode="In" />
        </Function>
        <Function Name="Pr_WorkflowInstancePostFormSave" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="Wf">
          <Parameter Name="WorkflowInstanceID" Type="bigint" Mode="In" />
          <Parameter Name="UserID" Type="bigint" Mode="In" />
        </Function>
        <Function Name="Pr_WorkflowInstanceRetryFailedTask" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="Wf">
          <Parameter Name="WorkflowInstanceID" Type="bigint" Mode="In" />
          <Parameter Name="WorkflowInstanceTaskID" Type="bigint" Mode="In" />
          <Parameter Name="Comments" Type="varchar" Mode="In" />
          <Parameter Name="UserID" Type="bigint" Mode="In" />
        </Function>
        <Function Name="Pr_WorkflowInstanceRouteGet" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="Wf">
          <Parameter Name="WorkflowTemplateID" Type="bigint" Mode="In" />
          <Parameter Name="WorkflowInstanceID" Type="bigint" Mode="In" />
          <Parameter Name="UserID" Type="bigint" Mode="In" />
        </Function>
        <Function Name="Pr_WorkflowInstanceSubmitToNextStepChecks" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="Wf">
          <Parameter Name="WorkflowInstanceID" Type="bigint" Mode="In" />
          <Parameter Name="TaskID" Type="bigint" Mode="In" />
          <Parameter Name="UserID" Type="bigint" Mode="In" />
        </Function>
        <Function Name="Pr_WorkflowInstanceTaskCanAction" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="Wf">
          <Parameter Name="WorkflowInstanceTaskID" Type="bigint" Mode="In" />
          <Parameter Name="UserID" Type="bigint" Mode="In" />
        </Function>
        <Function Name="Pr_WorkflowInstanceTaskCanAssignToMe" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="Wf">
          <Parameter Name="WorkflowInstanceTaskID" Type="bigint" Mode="In" />
          <Parameter Name="UserID" Type="bigint" Mode="In" />
        </Function>
        <Function Name="Pr_WorkflowInstanceTaskEscalation" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="Wf">
          <Parameter Name="WorkflowInstanceTaskID" Type="bigint" Mode="In" />
          <Parameter Name="EscalationByUserName" Type="varchar" Mode="In" />
          <Parameter Name="EscalateTo" Type="bigint" Mode="In" />
          <Parameter Name="ReturnEscalation" Type="bit" Mode="In" />
          <Parameter Name="Comments" Type="varchar" Mode="In" />
          <Parameter Name="ErrorMessage" Type="varchar" Mode="InOut" />
        </Function>
        <Function Name="Pr_WorkflowInstanceTaskEscalationUsersGet" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="Wf">
          <Parameter Name="WorkflowInstanceTaskID" Type="bigint" Mode="In" />
          <Parameter Name="IncludeUserSettings" Type="bit" Mode="In" />
        </Function>
        <Function Name="Pr_WorkflowInstanceTaskReAssignGroupTask" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="Wf">
          <Parameter Name="WorkflowInstanceID" Type="bigint" Mode="In" />
          <Parameter Name="ReassignedToID" Type="bigint" Mode="In" />
          <Parameter Name="UserID" Type="bigint" Mode="In" />
          <Parameter Name="Comments" Type="varchar" Mode="In" />
          <Parameter Name="ErrorMessage" Type="varchar" Mode="InOut" />
        </Function>
        <Function Name="Pr_WorkflowInstanceTaskStepsGetForCorrection" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="Wf">
          <Parameter Name="WorkflowInstanceTaskID" Type="bigint" Mode="In" />
        </Function>
        <EntityContainer Name="ModelStoreContainer">
          <EntitySet Name="Users" EntityType="Self.Users" Schema="Security" store:Type="Tables" />
          <EntitySet Name="WorkflowBuddies" EntityType="Self.WorkflowBuddies" Schema="Security" store:Type="Tables" />
          <EntitySet Name="Entities" EntityType="Self.Entities" Schema="System" store:Type="Tables" />
          <EntitySet Name="WorkflowInstanceDocuments" EntityType="Self.WorkflowInstanceDocuments" Schema="Wf" store:Type="Tables" />
          <EntitySet Name="WorkflowInstanceParticipants" EntityType="Self.WorkflowInstanceParticipants" Schema="Wf" store:Type="Tables" />
          <EntitySet Name="WorkflowInstances" EntityType="Self.WorkflowInstances" Schema="Wf" store:Type="Tables" />
          <EntitySet Name="WorkflowInstanceStatus" EntityType="Self.WorkflowInstanceStatus" Schema="Wf" store:Type="Tables" />
          <EntitySet Name="WorkflowInstanceStatusHistory" EntityType="Self.WorkflowInstanceStatusHistory" Schema="Wf" store:Type="Tables" />
          <EntitySet Name="WorkflowInstanceStepHistory" EntityType="Self.WorkflowInstanceStepHistory" Schema="Wf" store:Type="Tables" />
          <EntitySet Name="WorkflowInstanceTasks" EntityType="Self.WorkflowInstanceTasks" Schema="Wf" store:Type="Tables" />
          <EntitySet Name="WorkflowInstanceTaskStatus" EntityType="Self.WorkflowInstanceTaskStatus" Schema="Wf" store:Type="Tables" />
          <EntitySet Name="WorkflowInstanceTaskStatusHistory" EntityType="Self.WorkflowInstanceTaskStatusHistory" Schema="Wf" store:Type="Tables" />
          <EntitySet Name="Workflows" EntityType="Self.Workflows" Schema="Wf" store:Type="Tables" />
          <EntitySet Name="WorkflowTemplateDefaults" EntityType="Self.WorkflowTemplateDefaults" Schema="Wf" store:Type="Tables" />
          <EntitySet Name="WorkflowTemplateDocuments" EntityType="Self.WorkflowTemplateDocuments" Schema="Wf" store:Type="Tables" />
          <EntitySet Name="WorkflowTemplateParticipantRoles" EntityType="Self.WorkflowTemplateParticipantRoles" Schema="Wf" store:Type="Tables" />
          <EntitySet Name="WorkflowTemplateParticipants" EntityType="Self.WorkflowTemplateParticipants" Schema="Wf" store:Type="Tables" />
          <EntitySet Name="WorkflowTemplates" EntityType="Self.WorkflowTemplates" Schema="Wf" store:Type="Tables" />
          <EntitySet Name="WorkflowTemplateStatus" EntityType="Self.WorkflowTemplateStatus" Schema="Wf" store:Type="Tables" />
          <EntitySet Name="WorkflowTemplateStatusHistory" EntityType="Self.WorkflowTemplateStatusHistory" Schema="Wf" store:Type="Tables" />
          <EntitySet Name="WorkflowTemplateStepAssignees" EntityType="Self.WorkflowTemplateStepAssignees" Schema="Wf" store:Type="Tables" />
          <EntitySet Name="WorkflowTemplateSteps" EntityType="Self.WorkflowTemplateSteps" Schema="Wf" store:Type="Tables" />
          <EntitySet Name="WorkflowTemplateStepTypes" EntityType="Self.WorkflowTemplateStepTypes" Schema="Wf" store:Type="Tables" />
          <EntitySet Name="WorkflowTemplateTriggerActions" EntityType="Self.WorkflowTemplateTriggerActions" Schema="Wf" store:Type="Tables" />
          <EntitySet Name="WorkflowTemplateTriggers" EntityType="Self.WorkflowTemplateTriggers" Schema="Wf" store:Type="Tables" />
          <EntitySet Name="WorkflowTemplateTriggerTypes" EntityType="Self.WorkflowTemplateTriggerTypes" Schema="Wf" store:Type="Tables" />
          <EntitySet Name="Vw_WorkflowInstanceDocuments" EntityType="Self.Vw_WorkflowInstanceDocuments" store:Type="Views" store:Schema="Wf">
            <DefiningQuery>SELECT 
    [Vw_WorkflowInstanceDocuments].[WorkflowInstanceDocumentID] AS [WorkflowInstanceDocumentID], 
    [Vw_WorkflowInstanceDocuments].[WorkflowInstanceID] AS [WorkflowInstanceID], 
    [Vw_WorkflowInstanceDocuments].[DocumentTypeID] AS [DocumentTypeID], 
    [Vw_WorkflowInstanceDocuments].[DocumentID] AS [DocumentID], 
    [Vw_WorkflowInstanceDocuments].[IsMandatory] AS [IsMandatory], 
    [Vw_WorkflowInstanceDocuments].[IsCancelled] AS [IsCancelled], 
    [Vw_WorkflowInstanceDocuments].[IsExpiryDateRequired] AS [IsExpiryDateRequired], 
    [Vw_WorkflowInstanceDocuments].[ExpiryDate] AS [ExpiryDate], 
    [Vw_WorkflowInstanceDocuments].[Title] AS [Title], 
    [Vw_WorkflowInstanceDocuments].[DocumentDescription] AS [DocumentDescription], 
    [Vw_WorkflowInstanceDocuments].[IsDocumentTitleEditable] AS [IsDocumentTitleEditable], 
    [Vw_WorkflowInstanceDocuments].[DocumentVerificationStatusID] AS [DocumentVerificationStatusID]
    FROM [Wf].[Vw_WorkflowInstanceDocuments] AS [Vw_WorkflowInstanceDocuments]</DefiningQuery>
          </EntitySet>
          <EntitySet Name="Vw_WorkflowInstances" EntityType="Self.Vw_WorkflowInstances" store:Type="Views" store:Schema="Wf">
            <DefiningQuery>SELECT 
    [Vw_WorkflowInstances].[WorkflowInstanceID] AS [WorkflowInstanceID], 
    [Vw_WorkflowInstances].[WorkflowInstanceDescription] AS [WorkflowInstanceDescription], 
    [Vw_WorkflowInstances].[WorkflowStartDate] AS [WorkflowStartDate], 
    [Vw_WorkflowInstances].[WorkflowEndDate] AS [WorkflowEndDate], 
    [Vw_WorkflowInstances].[CreatedByID] AS [CreatedByID], 
    [Vw_WorkflowInstances].[CreatedDate] AS [CreatedDate], 
    [Vw_WorkflowInstances].[WorkflowInstanceStatusID] AS [WorkflowInstanceStatusID], 
    [Vw_WorkflowInstances].[WorkflowInstanceStatus] AS [WorkflowInstanceStatus], 
    [Vw_WorkflowInstances].[WorkflowTemplateID] AS [WorkflowTemplateID], 
    [Vw_WorkflowInstances].[WorkflowTemplateStepID] AS [WorkflowTemplateStepID], 
    [Vw_WorkflowInstances].[EntityID] AS [EntityID], 
    [Vw_WorkflowInstances].[ItemID] AS [ItemID], 
    [Vw_WorkflowInstances].[ReferenceNumber] AS [ReferenceNumber], 
    [Vw_WorkflowInstances].[Description] AS [Description], 
    [Vw_WorkflowInstances].[WorkflowID] AS [WorkflowID], 
    [Vw_WorkflowInstances].[DashboardControllerName] AS [DashboardControllerName], 
    [Vw_WorkflowInstances].[WorkflowControllerName] AS [WorkflowControllerName], 
    [Vw_WorkflowInstances].[Reference] AS [Reference], 
    [Vw_WorkflowInstances].[WarningDate] AS [WarningDate], 
    [Vw_WorkflowInstances].[DueDate] AS [DueDate], 
    [Vw_WorkflowInstances].[WorkflowFriendlyName] AS [WorkflowFriendlyName], 
    [Vw_WorkflowInstances].[UpdatedByID] AS [UpdatedByID], 
    [Vw_WorkflowInstances].[UpdatedDate] AS [UpdatedDate], 
    [Vw_WorkflowInstances].[ASsignedTo] AS [ASsignedTo], 
    [Vw_WorkflowInstances].[CreatedByName] AS [CreatedByName], 
    [Vw_WorkflowInstances].[WorkflowInstanceStateID] AS [WorkflowInstanceStateID], 
    [Vw_WorkflowInstances].[WorkflowInstanceState] AS [WorkflowInstanceState], 
    [Vw_WorkflowInstances].[WorkflowInstanceAge] AS [WorkflowInstanceAge], 
    [Vw_WorkflowInstances].[StepNumber] AS [StepNumber], 
    [Vw_WorkflowInstances].[StepTitle] AS [StepTitle]
    FROM [Wf].[Vw_WorkflowInstances] AS [Vw_WorkflowInstances]</DefiningQuery>
          </EntitySet>
          <EntitySet Name="Vw_WorkflowInstanceTasks" EntityType="Self.Vw_WorkflowInstanceTasks" store:Type="Views" store:Schema="Wf">
            <DefiningQuery>SELECT 
    [Vw_WorkflowInstanceTasks].[WorkflowInstanceTaskID] AS [WorkflowInstanceTaskID], 
    [Vw_WorkflowInstanceTasks].[WorkflowInstanceID] AS [WorkflowInstanceID], 
    [Vw_WorkflowInstanceTasks].[WorkflowInstanceTaskStatusID] AS [WorkflowInstanceTaskStatusID], 
    [Vw_WorkflowInstanceTasks].[WorkflowTemplateStepID] AS [WorkflowTemplateStepID], 
    [Vw_WorkflowInstanceTasks].[DateCreated] AS [DateCreated], 
    [Vw_WorkflowInstanceTasks].[DateCompleted] AS [DateCompleted], 
    [Vw_WorkflowInstanceTasks].[AssignedToID] AS [AssignedToID], 
    [Vw_WorkflowInstanceTasks].[CompletedByID] AS [CompletedByID], 
    [Vw_WorkflowInstanceTasks].[Description] AS [Description], 
    [Vw_WorkflowInstanceTasks].[Comments] AS [Comments], 
    [Vw_WorkflowInstanceTasks].[TaskStatusDescription] AS [TaskStatusDescription], 
    [Vw_WorkflowInstanceTasks].[WorkflowTemplateStepNumber] AS [WorkflowTemplateStepNumber], 
    [Vw_WorkflowInstanceTasks].[WorkflowTemplateStepTitle] AS [WorkflowTemplateStepTitle], 
    [Vw_WorkflowInstanceTasks].[WorkflowTemplateStepDurationOvertime] AS [WorkflowTemplateStepDurationOvertime], 
    [Vw_WorkflowInstanceTasks].[WorkflowTemplateStepTypeID] AS [WorkflowTemplateStepTypeID], 
    [Vw_WorkflowInstanceTasks].[WorkflowTemplateStepTypeDescription] AS [WorkflowTemplateStepTypeDescription], 
    [Vw_WorkflowInstanceTasks].[AssignedToName] AS [AssignedToName], 
    [Vw_WorkflowInstanceTasks].[CompletedByName] AS [CompletedByName], 
    [Vw_WorkflowInstanceTasks].[WorkflowInstanceEntityID] AS [WorkflowInstanceEntityID], 
    [Vw_WorkflowInstanceTasks].[WorkflowInstanceItemID] AS [WorkflowInstanceItemID], 
    [Vw_WorkflowInstanceTasks].[WorkflowInstanceReference] AS [WorkflowInstanceReference], 
    [Vw_WorkflowInstanceTasks].[WorkflowInstanceCreatedDate] AS [WorkflowInstanceCreatedDate], 
    [Vw_WorkflowInstanceTasks].[WorkflowInstanceCreatedByID] AS [WorkflowInstanceCreatedByID], 
    [Vw_WorkflowInstanceTasks].[WorkflowInstanceCreatedByName] AS [WorkflowInstanceCreatedByName], 
    [Vw_WorkflowInstanceTasks].[WorkflowID] AS [WorkflowID], 
    [Vw_WorkflowInstanceTasks].[WorkflowFriendlyName] AS [WorkflowFriendlyName], 
    [Vw_WorkflowInstanceTasks].[WorkflowControllerName] AS [WorkflowControllerName], 
    [Vw_WorkflowInstanceTasks].[TaskDuration] AS [TaskDuration], 
    [Vw_WorkflowInstanceTasks].[EscalatedFromID] AS [EscalatedFromID]
    FROM [Wf].[Vw_WorkflowInstanceTasks] AS [Vw_WorkflowInstanceTasks]</DefiningQuery>
          </EntitySet>
          <EntitySet Name="Vw_WorkflowTemplates" EntityType="Self.Vw_WorkflowTemplates" store:Type="Views" store:Schema="Wf">
            <DefiningQuery>SELECT 
    [Vw_WorkflowTemplates].[WorkflowID] AS [WorkflowID], 
    [Vw_WorkflowTemplates].[WorkflowFriendlyName] AS [WorkflowFriendlyName], 
    [Vw_WorkflowTemplates].[WorkflowDescription] AS [WorkflowDescription], 
    [Vw_WorkflowTemplates].[WorkflowControllerName] AS [WorkflowControllerName], 
    [Vw_WorkflowTemplates].[EntityName] AS [EntityName], 
    [Vw_WorkflowTemplates].[WorkflowTemplateID] AS [WorkflowTemplateID], 
    [Vw_WorkflowTemplates].[WorkflowTemplateStatusID] AS [WorkflowTemplateStatusID], 
    [Vw_WorkflowTemplates].[Version] AS [Version], 
    [Vw_WorkflowTemplates].[TotalRequestsInPogress] AS [TotalRequestsInPogress]
    FROM [Wf].[Vw_WorkflowTemplates] AS [Vw_WorkflowTemplates]</DefiningQuery>
          </EntitySet>
          <AssociationSet Name="FK_Users_AssignedTo" Association="Self.FK_Users_AssignedTo">
            <End Role="Users" EntitySet="Users" />
            <End Role="WorkflowInstanceTasks" EntitySet="WorkflowInstanceTasks" />
          </AssociationSet>
          <AssociationSet Name="FK_Users_CompletedBy" Association="Self.FK_Users_CompletedBy">
            <End Role="Users" EntitySet="Users" />
            <End Role="WorkflowInstanceTasks" EntitySet="WorkflowInstanceTasks" />
          </AssociationSet>
          <AssociationSet Name="FK_Users_Entities" Association="Self.FK_Users_Entities">
            <End Role="Entities" EntitySet="Entities" />
            <End Role="Users" EntitySet="Users" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowBuddies_Workflows" Association="Self.FK_WorkflowBuddies_Workflows">
            <End Role="Workflows" EntitySet="Workflows" />
            <End Role="WorkflowBuddies" EntitySet="WorkflowBuddies" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowInstanceDocuments_WorkflowInstances" Association="Self.FK_WorkflowInstanceDocuments_WorkflowInstances">
            <End Role="WorkflowInstances" EntitySet="WorkflowInstances" />
            <End Role="WorkflowInstanceDocuments" EntitySet="WorkflowInstanceDocuments" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowInstanceParticipants_WorkflowTemplateParticipants" Association="Self.FK_WorkflowInstanceParticipants_WorkflowTemplateParticipants">
            <End Role="WorkflowTemplateParticipants" EntitySet="WorkflowTemplateParticipants" />
            <End Role="WorkflowInstanceParticipants" EntitySet="WorkflowInstanceParticipants" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowInstances_WorkflowInstanceParticipants" Association="Self.FK_WorkflowInstances_WorkflowInstanceParticipants">
            <End Role="WorkflowInstances" EntitySet="WorkflowInstances" />
            <End Role="WorkflowInstanceParticipants" EntitySet="WorkflowInstanceParticipants" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowInstances_WorkflowInstanceStatus" Association="Self.FK_WorkflowInstances_WorkflowInstanceStatus">
            <End Role="WorkflowInstanceStatus" EntitySet="WorkflowInstanceStatus" />
            <End Role="WorkflowInstances" EntitySet="WorkflowInstances" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowInstances_WorkflowTemplates" Association="Self.FK_WorkflowInstances_WorkflowTemplates">
            <End Role="WorkflowTemplates" EntitySet="WorkflowTemplates" />
            <End Role="WorkflowInstances" EntitySet="WorkflowInstances" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowInstances_WorkflowTemplateSteps" Association="Self.FK_WorkflowInstances_WorkflowTemplateSteps">
            <End Role="WorkflowTemplateSteps" EntitySet="WorkflowTemplateSteps" />
            <End Role="WorkflowInstances" EntitySet="WorkflowInstances" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowInstanceStatusHistory_WorkflowInstances" Association="Self.FK_WorkflowInstanceStatusHistory_WorkflowInstances">
            <End Role="WorkflowInstances" EntitySet="WorkflowInstances" />
            <End Role="WorkflowInstanceStatusHistory" EntitySet="WorkflowInstanceStatusHistory" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowInstanceStepHistory_WorkflowInstances" Association="Self.FK_WorkflowInstanceStepHistory_WorkflowInstances">
            <End Role="WorkflowInstances" EntitySet="WorkflowInstances" />
            <End Role="WorkflowInstanceStepHistory" EntitySet="WorkflowInstanceStepHistory" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowInstanceTasks_Users1" Association="Self.FK_WorkflowInstanceTasks_Users1">
            <End Role="Users" EntitySet="Users" />
            <End Role="WorkflowInstanceTasks" EntitySet="WorkflowInstanceTasks" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowInstanceTasks_WorkflowInstances" Association="Self.FK_WorkflowInstanceTasks_WorkflowInstances">
            <End Role="WorkflowInstances" EntitySet="WorkflowInstances" />
            <End Role="WorkflowInstanceTasks" EntitySet="WorkflowInstanceTasks" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowInstanceTasks_WorkflowInstanceTaskStatus" Association="Self.FK_WorkflowInstanceTasks_WorkflowInstanceTaskStatus">
            <End Role="WorkflowInstanceTaskStatus" EntitySet="WorkflowInstanceTaskStatus" />
            <End Role="WorkflowInstanceTasks" EntitySet="WorkflowInstanceTasks" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowInstanceTasks_WorkflowTemplateSteps" Association="Self.FK_WorkflowInstanceTasks_WorkflowTemplateSteps">
            <End Role="WorkflowTemplateSteps" EntitySet="WorkflowTemplateSteps" />
            <End Role="WorkflowInstanceTasks" EntitySet="WorkflowInstanceTasks" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowInstanceTaskStatusHistory_WorkflowInstanceTaskStatus" Association="Self.FK_WorkflowInstanceTaskStatusHistory_WorkflowInstanceTaskStatus">
            <End Role="WorkflowInstanceTaskStatus" EntitySet="WorkflowInstanceTaskStatus" />
            <End Role="WorkflowInstanceTaskStatusHistory" EntitySet="WorkflowInstanceTaskStatusHistory" />
          </AssociationSet>
          <AssociationSet Name="FK_Workflows_Entities" Association="Self.FK_Workflows_Entities">
            <End Role="Entities" EntitySet="Entities" />
            <End Role="Workflows" EntitySet="Workflows" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplateDefaults_WorkflowTemplates" Association="Self.FK_WorkflowTemplateDefaults_WorkflowTemplates">
            <End Role="WorkflowTemplates" EntitySet="WorkflowTemplates" />
            <End Role="WorkflowTemplateDefaults" EntitySet="WorkflowTemplateDefaults" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplateDocuments_WorkflowTemplates" Association="Self.FK_WorkflowTemplateDocuments_WorkflowTemplates">
            <End Role="WorkflowTemplates" EntitySet="WorkflowTemplates" />
            <End Role="WorkflowTemplateDocuments" EntitySet="WorkflowTemplateDocuments" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplateParticipantRoles_WorkflowTemplateParticipants" Association="Self.FK_WorkflowTemplateParticipantRoles_WorkflowTemplateParticipants">
            <End Role="WorkflowTemplateParticipants" EntitySet="WorkflowTemplateParticipants" />
            <End Role="WorkflowTemplateParticipantRoles" EntitySet="WorkflowTemplateParticipantRoles" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplateParticipants_WorkflowTemplates" Association="Self.FK_WorkflowTemplateParticipants_WorkflowTemplates">
            <End Role="WorkflowTemplates" EntitySet="WorkflowTemplates" />
            <End Role="WorkflowTemplateParticipants" EntitySet="WorkflowTemplateParticipants" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplates_Workflows" Association="Self.FK_WorkflowTemplates_Workflows">
            <End Role="Workflows" EntitySet="Workflows" />
            <End Role="WorkflowTemplates" EntitySet="WorkflowTemplates" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplates_WorkflowTemplateStatus" Association="Self.FK_WorkflowTemplates_WorkflowTemplateStatus">
            <End Role="WorkflowTemplateStatus" EntitySet="WorkflowTemplateStatus" />
            <End Role="WorkflowTemplates" EntitySet="WorkflowTemplates" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplateStatusHistory_WorkflowTemplates" Association="Self.FK_WorkflowTemplateStatusHistory_WorkflowTemplates">
            <End Role="WorkflowTemplates" EntitySet="WorkflowTemplates" />
            <End Role="WorkflowTemplateStatusHistory" EntitySet="WorkflowTemplateStatusHistory" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplateStatusHistory_WorkflowTemplateStatus" Association="Self.FK_WorkflowTemplateStatusHistory_WorkflowTemplateStatus">
            <End Role="WorkflowTemplateStatus" EntitySet="WorkflowTemplateStatus" />
            <End Role="WorkflowTemplateStatusHistory" EntitySet="WorkflowTemplateStatusHistory" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplateStepAssignees_WorkflowTemplateParticipants" Association="Self.FK_WorkflowTemplateStepAssignees_WorkflowTemplateParticipants">
            <End Role="WorkflowTemplateParticipants" EntitySet="WorkflowTemplateParticipants" />
            <End Role="WorkflowTemplateStepAssignees" EntitySet="WorkflowTemplateStepAssignees" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplateStepAssignees_WorkflowTemplateSteps" Association="Self.FK_WorkflowTemplateStepAssignees_WorkflowTemplateSteps">
            <End Role="WorkflowTemplateSteps" EntitySet="WorkflowTemplateSteps" />
            <End Role="WorkflowTemplateStepAssignees" EntitySet="WorkflowTemplateStepAssignees" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplateSteps_WorkflowTemplates" Association="Self.FK_WorkflowTemplateSteps_WorkflowTemplates">
            <End Role="WorkflowTemplates" EntitySet="WorkflowTemplates" />
            <End Role="WorkflowTemplateSteps" EntitySet="WorkflowTemplateSteps" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplateSteps_WorkflowTemplateStepTypes" Association="Self.FK_WorkflowTemplateSteps_WorkflowTemplateStepTypes">
            <End Role="WorkflowTemplateStepTypes" EntitySet="WorkflowTemplateStepTypes" />
            <End Role="WorkflowTemplateSteps" EntitySet="WorkflowTemplateSteps" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplateTriggers_WorkflowTemplates" Association="Self.FK_WorkflowTemplateTriggers_WorkflowTemplates">
            <End Role="WorkflowTemplates" EntitySet="WorkflowTemplates" />
            <End Role="WorkflowTemplateTriggers" EntitySet="WorkflowTemplateTriggers" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplateTriggers_WorkflowTemplateSteps" Association="Self.FK_WorkflowTemplateTriggers_WorkflowTemplateSteps">
            <End Role="WorkflowTemplateSteps" EntitySet="WorkflowTemplateSteps" />
            <End Role="WorkflowTemplateTriggers" EntitySet="WorkflowTemplateTriggers" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplateTriggers_WorkflowTemplateTriggerActions" Association="Self.FK_WorkflowTemplateTriggers_WorkflowTemplateTriggerActions">
            <End Role="WorkflowTemplateTriggerActions" EntitySet="WorkflowTemplateTriggerActions" />
            <End Role="WorkflowTemplateTriggers" EntitySet="WorkflowTemplateTriggers" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplateTriggers_WorkflowTemplateTriggerTypes" Association="Self.FK_WorkflowTemplateTriggers_WorkflowTemplateTriggerTypes">
            <End Role="WorkflowTemplateTriggerTypes" EntitySet="WorkflowTemplateTriggerTypes" />
            <End Role="WorkflowTemplateTriggers" EntitySet="WorkflowTemplateTriggers" />
          </AssociationSet>
          <AssociationSet Name="PK_WorkflowInstanceStatusHistory_WorkflowInstanceStatus" Association="Self.PK_WorkflowInstanceStatusHistory_WorkflowInstanceStatus">
            <End Role="WorkflowInstanceStatus" EntitySet="WorkflowInstanceStatus" />
            <End Role="WorkflowInstanceStatusHistory" EntitySet="WorkflowInstanceStatusHistory" />
          </AssociationSet>
        </EntityContainer>
      </Schema></edmx:StorageModels>
    <!-- CSDL content -->
    <edmx:ConceptualModels>
      <Schema Namespace="Model" Alias="Self" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
        <EntityContainer Name="WorkflowContext" annotation:LazyLoadingEnabled="true">
          <EntitySet Name="Workflows" EntityType="Model.Workflow" />
          <EntitySet Name="WorkflowTemplateDefaults" EntityType="Model.WorkflowTemplateDefault" />
          <EntitySet Name="WorkflowTemplates" EntityType="Model.WorkflowTemplate" />
          <EntitySet Name="WorkflowTemplateStatuses" EntityType="Model.WorkflowTemplateStatus" />
          <EntitySet Name="WorkflowTemplateStatusHistories" EntityType="Model.WorkflowTemplateStatusHistory" />
          <EntitySet Name="WorkflowTemplateSteps" EntityType="Model.WorkflowTemplateStep" />
          <EntitySet Name="WorkflowTemplateStepTypes" EntityType="Model.WorkflowTemplateStepType" />
          <AssociationSet Name="FK_WorkflowTemplateDefaults_WorkflowTemplates" Association="Model.FK_WorkflowTemplateDefaults_WorkflowTemplates">
            <End Role="WorkflowTemplates" EntitySet="WorkflowTemplates" />
            <End Role="WorkflowTemplateDefaults" EntitySet="WorkflowTemplateDefaults" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplates_WorkflowTemplateStatus" Association="Model.FK_WorkflowTemplates_WorkflowTemplateStatus">
            <End Role="WorkflowTemplateStatus" EntitySet="WorkflowTemplateStatuses" />
            <End Role="WorkflowTemplates" EntitySet="WorkflowTemplates" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplateStatusHistory_WorkflowTemplates" Association="Model.FK_WorkflowTemplateStatusHistory_WorkflowTemplates">
            <End Role="WorkflowTemplates" EntitySet="WorkflowTemplates" />
            <End Role="WorkflowTemplateStatusHistory" EntitySet="WorkflowTemplateStatusHistories" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplateSteps_WorkflowTemplates" Association="Model.FK_WorkflowTemplateSteps_WorkflowTemplates">
            <End Role="WorkflowTemplates" EntitySet="WorkflowTemplates" />
            <End Role="WorkflowTemplateSteps" EntitySet="WorkflowTemplateSteps" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplateStatusHistory_WorkflowTemplateStatus" Association="Model.FK_WorkflowTemplateStatusHistory_WorkflowTemplateStatus">
            <End Role="WorkflowTemplateStatus" EntitySet="WorkflowTemplateStatuses" />
            <End Role="WorkflowTemplateStatusHistory" EntitySet="WorkflowTemplateStatusHistories" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplateSteps_WorkflowTemplateStepTypes" Association="Model.FK_WorkflowTemplateSteps_WorkflowTemplateStepTypes">
            <End Role="WorkflowTemplateStepTypes" EntitySet="WorkflowTemplateStepTypes" />
            <End Role="WorkflowTemplateSteps" EntitySet="WorkflowTemplateSteps" />
          </AssociationSet>
          <EntitySet Name="WorkflowInstances" EntityType="Model.WorkflowInstance" />
          <EntitySet Name="WorkflowInstanceStatuses" EntityType="Model.WorkflowInstanceStatus" />
          <EntitySet Name="WorkflowInstanceStatusHistories" EntityType="Model.WorkflowInstanceStatusHistory" />
          <EntitySet Name="WorkflowInstanceStepHistories" EntityType="Model.WorkflowInstanceStepHistory" />
          <EntitySet Name="WorkflowInstanceTaskStatuses" EntityType="Model.WorkflowInstanceTaskStatus" />
          <EntitySet Name="WorkflowInstanceTaskStatusHistories" EntityType="Model.WorkflowInstanceTaskStatusHistory" />
          <EntitySet Name="WorkflowTemplateTriggerTypes" EntityType="Model.WorkflowTemplateTriggerType" />
          <AssociationSet Name="FK_WorkflowInstances_WorkflowInstanceStatus" Association="Model.FK_WorkflowInstances_WorkflowInstanceStatus">
            <End Role="WorkflowInstanceStatu" EntitySet="WorkflowInstanceStatuses" />
            <End Role="WorkflowInstance" EntitySet="WorkflowInstances" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowInstances_WorkflowTemplates" Association="Model.FK_WorkflowInstances_WorkflowTemplates">
            <End Role="WorkflowTemplate" EntitySet="WorkflowTemplates" />
            <End Role="WorkflowInstance" EntitySet="WorkflowInstances" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowInstances_WorkflowTemplateSteps" Association="Model.FK_WorkflowInstances_WorkflowTemplateSteps">
            <End Role="WorkflowTemplateStep" EntitySet="WorkflowTemplateSteps" />
            <End Role="WorkflowInstance" EntitySet="WorkflowInstances" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowInstanceStatusHistory_WorkflowInstances" Association="Model.FK_WorkflowInstanceStatusHistory_WorkflowInstances">
            <End Role="WorkflowInstance" EntitySet="WorkflowInstances" />
            <End Role="WorkflowInstanceStatusHistory" EntitySet="WorkflowInstanceStatusHistories" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowInstanceStepHistory_WorkflowInstances" Association="Model.FK_WorkflowInstanceStepHistory_WorkflowInstances">
            <End Role="WorkflowInstance" EntitySet="WorkflowInstances" />
            <End Role="WorkflowInstanceStepHistory" EntitySet="WorkflowInstanceStepHistories" />
          </AssociationSet>
          <AssociationSet Name="PK_WorkflowInstanceStatusHistory_WorkflowInstanceStatus" Association="Model.PK_WorkflowInstanceStatusHistory_WorkflowInstanceStatus">
            <End Role="WorkflowInstanceStatu" EntitySet="WorkflowInstanceStatuses" />
            <End Role="WorkflowInstanceStatusHistory" EntitySet="WorkflowInstanceStatusHistories" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowInstanceTaskStatusHistory_WorkflowInstanceTaskStatus" Association="Model.FK_WorkflowInstanceTaskStatusHistory_WorkflowInstanceTaskStatus">
            <End Role="WorkflowInstanceTaskStatu" EntitySet="WorkflowInstanceTaskStatuses" />
            <End Role="WorkflowInstanceTaskStatusHistory" EntitySet="WorkflowInstanceTaskStatusHistories" />
          </AssociationSet>
          <EntitySet Name="WorkflowTemplateTriggerActions" EntityType="Model.WorkflowTemplateTriggerAction" />
          <EntitySet Name="WorkflowTemplateTriggers" EntityType="Model.WorkflowTemplateTrigger" />
          <AssociationSet Name="FK_WorkflowTemplateTriggers_WorkflowTemplates" Association="Model.FK_WorkflowTemplateTriggers_WorkflowTemplates">
            <End Role="WorkflowTemplate" EntitySet="WorkflowTemplates" />
            <End Role="WorkflowTemplateTrigger" EntitySet="WorkflowTemplateTriggers" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplateTriggers_WorkflowTemplateTriggerActions" Association="Model.FK_WorkflowTemplateTriggers_WorkflowTemplateTriggerActions">
            <End Role="WorkflowTemplateTriggerAction" EntitySet="WorkflowTemplateTriggerActions" />
            <End Role="WorkflowTemplateTrigger" EntitySet="WorkflowTemplateTriggers" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplateTriggers_WorkflowTemplateTriggerTypes" Association="Model.FK_WorkflowTemplateTriggers_WorkflowTemplateTriggerTypes">
            <End Role="WorkflowTemplateTriggerType" EntitySet="WorkflowTemplateTriggerTypes" />
            <End Role="WorkflowTemplateTrigger" EntitySet="WorkflowTemplateTriggers" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplates_Workflows" Association="Model.FK_WorkflowTemplates_Workflows">
            <End Role="Workflow" EntitySet="Workflows" />
            <End Role="WorkflowTemplate" EntitySet="WorkflowTemplates" />
          </AssociationSet>
          <EntitySet Name="WorkflowInstanceParticipants" EntityType="Model.WorkflowInstanceParticipant" />
          <EntitySet Name="WorkflowTemplateParticipantRoles" EntityType="Model.WorkflowTemplateParticipantRole" />
          <EntitySet Name="WorkflowTemplateParticipants" EntityType="Model.WorkflowTemplateParticipant" />
          <EntitySet Name="WorkflowTemplateStepAssignees" EntityType="Model.WorkflowTemplateStepAssignee" />
          <AssociationSet Name="FK_WorkflowInstanceParticipants_WorkflowTemplateParticipants" Association="Model.FK_WorkflowInstanceParticipants_WorkflowTemplateParticipants">
            <End Role="WorkflowTemplateParticipant" EntitySet="WorkflowTemplateParticipants" />
            <End Role="WorkflowInstanceParticipant" EntitySet="WorkflowInstanceParticipants" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplateParticipantRoles_WorkflowTemplateParticipants" Association="Model.FK_WorkflowTemplateParticipantRoles_WorkflowTemplateParticipants">
            <End Role="WorkflowTemplateParticipant" EntitySet="WorkflowTemplateParticipants" />
            <End Role="WorkflowTemplateParticipantRole" EntitySet="WorkflowTemplateParticipantRoles" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplateParticipants_WorkflowTemplates" Association="Model.FK_WorkflowTemplateParticipants_WorkflowTemplates">
            <End Role="WorkflowTemplate" EntitySet="WorkflowTemplates" />
            <End Role="WorkflowTemplateParticipant" EntitySet="WorkflowTemplateParticipants" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplateStepAssignees_WorkflowTemplateParticipants" Association="Model.FK_WorkflowTemplateStepAssignees_WorkflowTemplateParticipants">
            <End Role="WorkflowTemplateParticipant" EntitySet="WorkflowTemplateParticipants" />
            <End Role="WorkflowTemplateStepAssignee" EntitySet="WorkflowTemplateStepAssignees" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplateStepAssignees_WorkflowTemplateSteps" Association="Model.FK_WorkflowTemplateStepAssignees_WorkflowTemplateSteps">
            <End Role="WorkflowTemplateStep" EntitySet="WorkflowTemplateSteps" />
            <End Role="WorkflowTemplateStepAssignee" EntitySet="WorkflowTemplateStepAssignees" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowInstances_WorkflowInstanceParticipants" Association="Model.FK_WorkflowInstances_WorkflowInstanceParticipants">
            <End Role="WorkflowInstance" EntitySet="WorkflowInstances" />
            <End Role="WorkflowInstanceParticipant" EntitySet="WorkflowInstanceParticipants" />
          </AssociationSet>
          <EntitySet Name="WorkflowUsers" EntityType="Model.WorkflowUser" />
          <EntitySet Name="Vw_WorkflowInstances" EntityType="Model.Vw_WorkflowInstance" />
          <EntitySet Name="WorkflowEntities" EntityType="Model.WorkflowEntity" />
          <AssociationSet Name="FK_Workflows_Entities" Association="Model.FK_Workflows_Entities">
            <End Role="Entity" EntitySet="WorkflowEntities" />
            <End Role="Workflow" EntitySet="Workflows" />
          </AssociationSet>
          <AssociationSet Name="FK_Users_Entities" Association="Model.FK_Users_Entities">
            <End Role="WorkflowEntity" EntitySet="WorkflowEntities" />
            <End Role="WorkflowUser" EntitySet="WorkflowUsers" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplateTriggers_WorkflowTemplateSteps" Association="Model.FK_WorkflowTemplateTriggers_WorkflowTemplateSteps">
            <End Role="WorkflowTemplateStep" EntitySet="WorkflowTemplateSteps" />
            <End Role="WorkflowTemplateTrigger" EntitySet="WorkflowTemplateTriggers" />
          </AssociationSet>
          <FunctionImport Name="Pr_WorkflowInstanceTaskCanAction" ReturnType="Collection(Boolean)">
            <Parameter Name="WorkflowInstanceTaskID" Mode="In" Type="Int64" />
            <Parameter Name="UserID" Mode="In" Type="Int64" />
          </FunctionImport>
          <FunctionImport Name="Pr_WorkflowInstanceTaskEscalation">
            <Parameter Name="WorkflowInstanceTaskID" Mode="In" Type="Int64" />
            <Parameter Name="EscalationByUserName" Mode="In" Type="String" />
            <Parameter Name="EscalateTo" Mode="In" Type="Int64" />
            <Parameter Name="ReturnEscalation" Mode="In" Type="Boolean" />
            <Parameter Name="Comments" Mode="In" Type="String" />
            <Parameter Name="ErrorMessage" Mode="InOut" Type="String" />
          </FunctionImport>
          <FunctionImport Name="Pr_WorkflowInstanceTaskStepsGetForCorrection" ReturnType="Collection(Model.Pr_WorkflowInstanceTaskStepsGetForCorrection_Result)">
          <Parameter Name="WorkflowInstanceTaskID" Mode="In" Type="Int64" />
          </FunctionImport>
          <FunctionImport Name="Pr_WorkflowInstanceTaskEscalationUsersGet" ReturnType="Collection(Model.Pr_WorkflowInstanceTaskEscalationUsersGet_Result)">
            <Parameter Name="WorkflowInstanceTaskID" Mode="In" Type="Int64" />
            <Parameter Name="IncludeUserSettings" Mode="In" Type="Boolean" />
          </FunctionImport>
          <EntitySet Name="WorkflowBuddies" EntityType="Model.WorkflowBuddy" />
          <AssociationSet Name="FK_WorkflowBuddies_Workflows" Association="Model.FK_WorkflowBuddies_Workflows">
            <End Role="Workflow" EntitySet="Workflows" />
            <End Role="WorkflowBuddy" EntitySet="WorkflowBuddies" />
          </AssociationSet>
          <FunctionImport Name="Pr_WorkflowInstanceTaskReAssignGroupTask">
            <Parameter Name="WorkflowInstanceID" Mode="In" Type="Int64" />
            <Parameter Name="ReassignedToID" Mode="In" Type="Int64" />
            <Parameter Name="UserID" Mode="In" Type="Int64" />
            <Parameter Name="Comments" Mode="In" Type="String" />
            <Parameter Name="ErrorMessage" Mode="InOut" Type="String" />
          </FunctionImport>
          <FunctionImport Name="Pr_WorkflowInstanceDocumentIdUpdate">
            <Parameter Name="WorkflowInstanceDocumentID" Mode="In" Type="Int64" />
            <Parameter Name="DocumentID" Mode="In" Type="Int64" />
            <Parameter Name="UserID" Mode="In" Type="Int64" />
          </FunctionImport>
          <FunctionImport Name="Pr_WorkflowInstanceDocumentsGet" EntitySet="Vw_WorkflowInstanceDocuments" ReturnType="Collection(Model.Vw_WorkflowInstanceDocument)">
            <Parameter Name="WorkflowInstanceID" Mode="In" Type="Int64" />
            <Parameter Name="UserID" Mode="In" Type="Int64" />
          </FunctionImport>
          <FunctionImport Name="Pr_WorkflowInstanceDocumentsUpdate">
            <Parameter Name="WorkflowInstanceID" Mode="In" Type="Int64" />
            <Parameter Name="UserID" Mode="In" Type="Int64" />
          </FunctionImport>
          <FunctionImport Name="Pr_WorkflowInstancePostFormSave">
            <Parameter Name="WorkflowInstanceID" Mode="In" Type="Int64" />
            <Parameter Name="UserID" Mode="In" Type="Int64" />
          </FunctionImport>
          <EntitySet Name="WorkflowInstanceDocuments" EntityType="Model.WorkflowInstanceDocument" />
          <EntitySet Name="WorkflowTemplateDocuments" EntityType="Model.WorkflowTemplateDocument" />
          <AssociationSet Name="FK_WorkflowInstanceDocuments_WorkflowInstances" Association="Model.FK_WorkflowInstanceDocuments_WorkflowInstances">
            <End Role="WorkflowInstance" EntitySet="WorkflowInstances" />
            <End Role="WorkflowInstanceDocument" EntitySet="WorkflowInstanceDocuments" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowTemplateDocuments_WorkflowTemplates" Association="Model.FK_WorkflowTemplateDocuments_WorkflowTemplates">
            <End Role="WorkflowTemplate" EntitySet="WorkflowTemplates" />
            <End Role="WorkflowTemplateDocument" EntitySet="WorkflowTemplateDocuments" />
          </AssociationSet>
          <EntitySet Name="Vw_WorkflowInstanceDocuments" EntityType="Model.Vw_WorkflowInstanceDocument" />
          <FunctionImport Name="Pr_WorkflowInstanceSubmitToNextStepChecks" ReturnType="Collection(Model.SubmitToNextStepOutcome)">
            <Parameter Name="WorkflowInstanceID" Mode="In" Type="Int64" />
            <Parameter Name="TaskID" Mode="In" Type="Int64" />
            <Parameter Name="UserID" Mode="In" Type="Int64" />
          </FunctionImport>
          <FunctionImport Name="Pr_WorkflowInstanceDocumentExpiryDateUpdate">
            <Parameter Name="WorkflowInstanceDocumentID" Mode="In" Type="Int64" />
            <Parameter Name="ExpiryDate" Mode="In" Type="DateTime" />
            <Parameter Name="UserID" Mode="In" Type="Int64" />
          </FunctionImport>
          <FunctionImport Name="Pr_WorkflowInstanceDocumentTitleUpdate">
            <Parameter Name="WorkflowInstanceDocumentID" Mode="In" Type="Int64" />
            <Parameter Name="Title" Mode="In" Type="String" />
            <Parameter Name="UserID" Mode="In" Type="Int64" />
          </FunctionImport>
          <EntitySet Name="WorkflowInstanceTasks" EntityType="Model.WorkflowInstanceTask" />
          <EntitySet Name="Vw_WorkflowInstanceTasks" EntityType="Model.Vw_WorkflowInstanceTask" />
          <AssociationSet Name="FK_Users_AssignedTo" Association="Model.FK_Users_AssignedTo">
            <End Role="WorkflowUser" EntitySet="WorkflowUsers" />
            <End Role="WorkflowInstanceTask" EntitySet="WorkflowInstanceTasks" />
          </AssociationSet>
          <AssociationSet Name="FK_Users_CompletedBy" Association="Model.FK_Users_CompletedBy">
            <End Role="WorkflowUser" EntitySet="WorkflowUsers" />
            <End Role="WorkflowInstanceTask" EntitySet="WorkflowInstanceTasks" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowInstanceTasks_Users1" Association="Model.FK_WorkflowInstanceTasks_Users1">
            <End Role="WorkflowUser" EntitySet="WorkflowUsers" />
            <End Role="WorkflowInstanceTask" EntitySet="WorkflowInstanceTasks" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowInstanceTasks_WorkflowInstances" Association="Model.FK_WorkflowInstanceTasks_WorkflowInstances">
            <End Role="WorkflowInstance" EntitySet="WorkflowInstances" />
            <End Role="WorkflowInstanceTask" EntitySet="WorkflowInstanceTasks" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowInstanceTasks_WorkflowInstanceTaskStatus" Association="Model.FK_WorkflowInstanceTasks_WorkflowInstanceTaskStatus">
            <End Role="WorkflowInstanceTaskStatus" EntitySet="WorkflowInstanceTaskStatuses" />
            <End Role="WorkflowInstanceTask" EntitySet="WorkflowInstanceTasks" />
          </AssociationSet>
          <AssociationSet Name="FK_WorkflowInstanceTasks_WorkflowTemplateSteps" Association="Model.FK_WorkflowInstanceTasks_WorkflowTemplateSteps">
            <End Role="WorkflowTemplateStep" EntitySet="WorkflowTemplateSteps" />
            <End Role="WorkflowInstanceTask" EntitySet="WorkflowInstanceTasks" />
          </AssociationSet>
          <EntitySet Name="Vw_WorkflowTemplates" EntityType="Model.Vw_WorkflowTemplate" />
          <FunctionImport Name="Pr_WorkflowInstanceTaskCanAssignToMe" ReturnType="Collection(Boolean)">
            <Parameter Name="WorkflowInstanceTaskID" Mode="In" Type="Int64" />
            <Parameter Name="UserID" Mode="In" Type="Int64" />
          </FunctionImport>
          <FunctionImport Name="Pr_WorkflowInstanceRetryFailedTask">
            <Parameter Name="WorkflowInstanceID" Mode="In" Type="Int64" />
            <Parameter Name="WorkflowInstanceTaskID" Mode="In" Type="Int64" />
            <Parameter Name="Comments" Mode="In" Type="String" />
            <Parameter Name="UserID" Mode="In" Type="Int64" />
          </FunctionImport>
        </EntityContainer>
        <EntityType Name="Workflow">
          <Key>
            <PropertyRef Name="WorkflowID" />
          </Key>
          <Property Name="WorkflowID" Type="Int64" Nullable="false" />
          <Property Name="CreatedByID" Type="Int64" Nullable="false" />
          <Property Name="CreatedDate" Type="DateTime" Nullable="false" Precision="3" />
          <Property Name="UpdatedByID" Type="Int64" Nullable="false" />
          <Property Name="UpdatedDate" Type="DateTime" Nullable="false" Precision="3" />
          <Property Type="Int32" Name="EntityID" Nullable="false" />
          <NavigationProperty Name="WorkflowTemplates" Relationship="Model.FK_WorkflowTemplates_Workflows" FromRole="Workflow" ToRole="WorkflowTemplate" />
          <NavigationProperty Name="WorkflowEntity" Relationship="Model.FK_Workflows_Entities" FromRole="Workflow" ToRole="Entity" />
          <Property Type="String" Name="WorkflowControllerName" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="WorkflowFriendlyName" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="WorkflowDescription" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="DashboardControllerName" MaxLength="50" FixedLength="false" Unicode="false" />
          <NavigationProperty Name="WorkflowBuddies" Relationship="Model.FK_WorkflowBuddies_Workflows" FromRole="Workflow" ToRole="WorkflowBuddy" />
          <Property Name="WorkflowCategoryID" Type="Int16" Nullable="false" />
          <Property Name="AdministratorRoles" Type="String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="false" />
          <Property Name="InitiatorRoles" Type="String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="false" />
          <Property Name="HelpUrl" Type="String" MaxLength="1000" FixedLength="false" Unicode="false" />
          <Property Name="ViewerRoles" Type="String" MaxLength="100" FixedLength="false" Unicode="false" />
        </EntityType>
        <EntityType Name="WorkflowTemplateDefault">
          <Key>
            <PropertyRef Name="WorkflowTemplateDefaultID" />
          </Key>
          <Property Name="WorkflowTemplateDefaultID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="WorkflowTemplateID" Type="Int64" Nullable="false" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </Property>
          <Property Name="Description" Type="String" Nullable="false" MaxLength="100" Unicode="false" FixedLength="false" />
          <Property Name="Value" Type="String" Nullable="false" MaxLength="2000" Unicode="false" FixedLength="false" />
          <NavigationProperty Name="WorkflowTemplate" Relationship="Model.FK_WorkflowTemplateDefaults_WorkflowTemplates" FromRole="WorkflowTemplateDefaults" ToRole="WorkflowTemplates" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
        </EntityType>
        <EntityType Name="WorkflowTemplate">
          <Key>
            <PropertyRef Name="WorkflowTemplateID" />
          </Key>
          <Property Name="WorkflowTemplateID" Type="Int64" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="WorkflowID" Type="Int64" Nullable="false" />
          <Property Name="WorkflowTemplateStatusID" Type="Int16" Nullable="false" />
          <Property Name="Version" Type="Int16" Nullable="false" />
          <Property Name="CreatedByID" Type="Int64" Nullable="false" />
          <Property Name="CreatedDate" Type="DateTime" Nullable="false" Precision="3" />
          <Property Name="UpdatedByID" Type="Int64" Nullable="false" />
          <Property Name="UpdatedDate" Type="DateTime" Nullable="false" Precision="3" />
          <NavigationProperty Name="WorkflowTemplateDefaults" Relationship="Model.FK_WorkflowTemplateDefaults_WorkflowTemplates" FromRole="WorkflowTemplates" ToRole="WorkflowTemplateDefaults" />
          <NavigationProperty Name="WorkflowTemplateStatus" Relationship="Model.FK_WorkflowTemplates_WorkflowTemplateStatus" FromRole="WorkflowTemplates" ToRole="WorkflowTemplateStatus" />
          <NavigationProperty Name="WorkflowTemplateStatusHistories" Relationship="Model.FK_WorkflowTemplateStatusHistory_WorkflowTemplates" FromRole="WorkflowTemplates" ToRole="WorkflowTemplateStatusHistory" />
          <NavigationProperty Name="WorkflowTemplateSteps" Relationship="Model.FK_WorkflowTemplateSteps_WorkflowTemplates" FromRole="WorkflowTemplates" ToRole="WorkflowTemplateSteps" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <NavigationProperty Name="WorkflowInstances" Relationship="Model.FK_WorkflowInstances_WorkflowTemplates" FromRole="WorkflowTemplate" ToRole="WorkflowInstance" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <NavigationProperty Name="WorkflowTemplateTriggers" Relationship="Model.FK_WorkflowTemplateTriggers_WorkflowTemplates" FromRole="WorkflowTemplate" ToRole="WorkflowTemplateTrigger" />
          <NavigationProperty Name="Workflow" Relationship="Model.FK_WorkflowTemplates_Workflows" FromRole="WorkflowTemplate" ToRole="Workflow" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <NavigationProperty Name="WorkflowTemplateParticipants" Relationship="Model.FK_WorkflowTemplateParticipants_WorkflowTemplates" FromRole="WorkflowTemplate" ToRole="WorkflowTemplateParticipant" />
          <Property Type="String" Name="RouteLayout" MaxLength="Max" FixedLength="false" Unicode="false" />
          <Property Type="Boolean" Name="CustomWorkflowTaskEmailRequired" Nullable="false" />
          <Property Type="Int64" Name="CustomWorkflowTaskEmailScriptID" />
          <Property Type="Int64" Name="MessageTemplateID_NewTask" />
          <Property Type="Int64" Name="MessageTemplateID_CancelledTask" />
          <Property Type="Int64" Name="MessageTemplateID_ReAssignedTask" />
          <Property Type="Int64" Name="DocumentStoreLocationID" Nullable="false" />
          <Property Type="String" Name="DescriptionTemplate" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Name="ParticipantUpdateProcedure" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Name="NextStepCheckProcedure" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Name="PostSaveProcedure" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Name="MoveToVerifiedProcedure" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
          <NavigationProperty Name="WorkflowTemplateDocuments" Relationship="Model.FK_WorkflowTemplateDocuments_WorkflowTemplates" FromRole="WorkflowTemplate" ToRole="WorkflowTemplateDocument" />
        </EntityType>
        <EntityType Name="WorkflowTemplateStatus">
          <Key>
            <PropertyRef Name="WorkflowTemplateStatusID" />
          </Key>
          <Property Name="WorkflowTemplateStatusID" Type="Int16" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="Description" Type="String" Nullable="false" MaxLength="50" Unicode="false" FixedLength="false" />
          <Property Name="IsCancelled" Type="Boolean" Nullable="false" />
          <NavigationProperty Name="WorkflowTemplates" Relationship="Model.FK_WorkflowTemplates_WorkflowTemplateStatus" FromRole="WorkflowTemplateStatus" ToRole="WorkflowTemplates" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <NavigationProperty Name="WorkflowTemplateStatusHistories" Relationship="Model.FK_WorkflowTemplateStatusHistory_WorkflowTemplateStatus" FromRole="WorkflowTemplateStatus" ToRole="WorkflowTemplateStatusHistory" />
        </EntityType>
        <EntityType Name="WorkflowTemplateStatusHistory">
          <Key>
            <PropertyRef Name="WorkflowTemplateStatusHistoryID" />
          </Key>
          <Property Name="WorkflowTemplateStatusHistoryID" Type="Int64" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="WorkflowTemplateID" Type="Int64" Nullable="false" />
          <Property Name="WorkflowTemplateStatusID" Type="Int16" Nullable="false" />
          <Property Name="UserID" Type="Int64" Nullable="false" />
          <Property Name="Date" Type="DateTime" Nullable="false" Precision="3" />
          <NavigationProperty Name="WorkflowTemplate" Relationship="Model.FK_WorkflowTemplateStatusHistory_WorkflowTemplates" FromRole="WorkflowTemplateStatusHistory" ToRole="WorkflowTemplates" />
          <NavigationProperty Name="WorkflowTemplateStatu" Relationship="Model.FK_WorkflowTemplateStatusHistory_WorkflowTemplateStatus" FromRole="WorkflowTemplateStatusHistory" ToRole="WorkflowTemplateStatus" />
        </EntityType>
        <EntityType Name="WorkflowTemplateStep">
          <Key>
            <PropertyRef Name="WorkflowTemplateStepID" />
          </Key>
          <Property Name="WorkflowTemplateStepID" Type="Int64" Nullable="false" />
          <Property Name="WorkflowTemplateID" Type="Int64" Nullable="false" />
          <Property Name="WorkflowTemplateStepTypeID" Type="Int16" Nullable="false" />
          <Property Name="Branch" Type="Double" Nullable="false" />
          <Property Name="Step" Type="Double" Nullable="false" />
          <Property Name="StepParent" Type="Double" Nullable="false" />
          <Property Name="StepNext" Type="Double" Nullable="false" />
          <Property Name="StepTitle" Type="String" Nullable="false" MaxLength="255" Unicode="false" FixedLength="false" />
          <Property Name="StepDescription" Type="String" MaxLength="255" Unicode="false" FixedLength="false" />
          <Property Name="StepDurationWarning" Type="Int32" Nullable="false" />
          <Property Name="StepDurationOvertime" Type="Int32" Nullable="false" />
          <Property Name="IsDefaultStep" Type="Boolean" Nullable="false" />
          <NavigationProperty Name="WorkflowTemplate" Relationship="Model.FK_WorkflowTemplateSteps_WorkflowTemplates" FromRole="WorkflowTemplateSteps" ToRole="WorkflowTemplates" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <NavigationProperty Name="WorkflowTemplateStepType" Relationship="Model.FK_WorkflowTemplateSteps_WorkflowTemplateStepTypes" FromRole="WorkflowTemplateSteps" ToRole="WorkflowTemplateStepTypes" />
          <NavigationProperty Name="WorkflowInstances" Relationship="Model.FK_WorkflowInstances_WorkflowTemplateSteps" FromRole="WorkflowTemplateStep" ToRole="WorkflowInstance" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <NavigationProperty Name="WorkflowTemplateStepAssignees" Relationship="Model.FK_WorkflowTemplateStepAssignees_WorkflowTemplateSteps" FromRole="WorkflowTemplateStep" ToRole="WorkflowTemplateStepAssignee" />
          <NavigationProperty Name="WorkflowTemplateTriggers" Relationship="Model.FK_WorkflowTemplateTriggers_WorkflowTemplateSteps" FromRole="WorkflowTemplateStep" ToRole="WorkflowTemplateTrigger" />
          <Property Type="Int64" Name="WorkflowTaskHandlerID" />
          <Property Type="String" Name="IsRequiredScript" MaxLength="1000" FixedLength="false" Unicode="false" />
          <Property Type="Boolean" Name="IsEmailRequired" Nullable="false" />
          <Property Name="StepNextPossibles" Type="String" MaxLength="100" FixedLength="false" Unicode="false" />
          <Property Name="StepApplicationRoles" Type="String" MaxLength="1000" FixedLength="false" Unicode="false" />
          <Property Name="StepReassignRoles" Type="String" MaxLength="1000" FixedLength="false" Unicode="false" />
          <Property Name="IsRequiredXml" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
          <Property Name="CanAutoExpire" Type="Boolean" Nullable="false" />
          <NavigationProperty Name="WorkflowInstanceTasks" Relationship="Model.FK_WorkflowInstanceTasks_WorkflowTemplateSteps" FromRole="WorkflowTemplateStep" ToRole="WorkflowInstanceTask" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
        </EntityType>
        <EntityType Name="WorkflowTemplateStepType">
          <Key>
            <PropertyRef Name="WorkflowTemplateStepTypeID" />
          </Key>
          <Property Name="WorkflowTemplateStepTypeID" Type="Int16" Nullable="false" />
          <Property Name="Description" Type="String" Nullable="false" MaxLength="50" Unicode="false" FixedLength="false" />
          <Property Name="IsCancelled" Type="Boolean" Nullable="false" />
          <NavigationProperty Name="WorkflowTemplateSteps" Relationship="Model.FK_WorkflowTemplateSteps_WorkflowTemplateStepTypes" FromRole="WorkflowTemplateStepTypes" ToRole="WorkflowTemplateSteps" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
        </EntityType>
        <Association Name="FK_WorkflowTemplateDefaults_WorkflowTemplates">
          <End Role="WorkflowTemplates" Type="Model.WorkflowTemplate" Multiplicity="1" />
          <End Role="WorkflowTemplateDefaults" Type="Model.WorkflowTemplateDefault" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplates">
              <PropertyRef Name="WorkflowTemplateID" />
            </Principal>
            <Dependent Role="WorkflowTemplateDefaults">
              <PropertyRef Name="WorkflowTemplateID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplates_WorkflowTemplateStatus">
          <End Role="WorkflowTemplateStatus" Type="Model.WorkflowTemplateStatus" Multiplicity="1" />
          <End Role="WorkflowTemplates" Type="Model.WorkflowTemplate" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplateStatus">
              <PropertyRef Name="WorkflowTemplateStatusID" />
            </Principal>
            <Dependent Role="WorkflowTemplates">
              <PropertyRef Name="WorkflowTemplateStatusID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplateStatusHistory_WorkflowTemplates">
          <End Role="WorkflowTemplates" Type="Model.WorkflowTemplate" Multiplicity="1" />
          <End Role="WorkflowTemplateStatusHistory" Type="Model.WorkflowTemplateStatusHistory" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplates">
              <PropertyRef Name="WorkflowTemplateID" />
            </Principal>
            <Dependent Role="WorkflowTemplateStatusHistory">
              <PropertyRef Name="WorkflowTemplateID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplateSteps_WorkflowTemplates">
          <End Role="WorkflowTemplates" Type="Model.WorkflowTemplate" Multiplicity="1" />
          <End Role="WorkflowTemplateSteps" Type="Model.WorkflowTemplateStep" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplates">
              <PropertyRef Name="WorkflowTemplateID" />
            </Principal>
            <Dependent Role="WorkflowTemplateSteps">
              <PropertyRef Name="WorkflowTemplateID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplateStatusHistory_WorkflowTemplateStatus">
          <End Role="WorkflowTemplateStatus" Type="Model.WorkflowTemplateStatus" Multiplicity="1" />
          <End Role="WorkflowTemplateStatusHistory" Type="Model.WorkflowTemplateStatusHistory" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplateStatus">
              <PropertyRef Name="WorkflowTemplateStatusID" />
            </Principal>
            <Dependent Role="WorkflowTemplateStatusHistory">
              <PropertyRef Name="WorkflowTemplateStatusID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplateSteps_WorkflowTemplateStepTypes">
          <End Role="WorkflowTemplateStepTypes" Type="Model.WorkflowTemplateStepType" Multiplicity="1" />
          <End Role="WorkflowTemplateSteps" Type="Model.WorkflowTemplateStep" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplateStepTypes">
              <PropertyRef Name="WorkflowTemplateStepTypeID" />
            </Principal>
            <Dependent Role="WorkflowTemplateSteps">
              <PropertyRef Name="WorkflowTemplateStepTypeID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <EntityType Name="WorkflowInstance">
          <Key>
            <PropertyRef Name="WorkflowInstanceID" />
          </Key>
          <Property Type="Int64" Name="WorkflowInstanceID" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Type="Int16" Name="WorkflowInstanceStatusID" />
          <Property Type="Int64" Name="WorkflowTemplateID" Nullable="false" />
          <Property Type="Int64" Name="WorkflowTemplateStepID" Nullable="false" />
          <Property Type="Int32" Name="EntityID" Nullable="false" />
          <Property Type="Int64" Name="ItemID" Nullable="false" />
          <Property Type="DateTime" Name="StartDate" Nullable="false" Precision="3" />
          <Property Type="DateTime" Name="EndDate" Precision="3" />
          <Property Type="Int64" Name="CreatedByID" Nullable="false" />
          <Property Type="DateTime" Name="CreatedDate" Nullable="false" Precision="3" />
          <Property Type="Int64" Name="UpdatedByID" Nullable="false" />
          <Property Type="DateTime" Name="UpdatedDate" Nullable="false" Precision="3" />
          <NavigationProperty Name="WorkflowInstanceStatus" Relationship="Model.FK_WorkflowInstances_WorkflowInstanceStatus" FromRole="WorkflowInstance" ToRole="WorkflowInstanceStatu" />
          <NavigationProperty Name="WorkflowTemplate" Relationship="Model.FK_WorkflowInstances_WorkflowTemplates" FromRole="WorkflowInstance" ToRole="WorkflowTemplate" />
          <NavigationProperty Name="WorkflowTemplateStep" Relationship="Model.FK_WorkflowInstances_WorkflowTemplateSteps" FromRole="WorkflowInstance" ToRole="WorkflowTemplateStep" />
          <NavigationProperty Name="WorkflowInstanceStatusHistories" Relationship="Model.FK_WorkflowInstanceStatusHistory_WorkflowInstances" FromRole="WorkflowInstance" ToRole="WorkflowInstanceStatusHistory" />
          <NavigationProperty Name="WorkflowInstanceStepHistories" Relationship="Model.FK_WorkflowInstanceStepHistory_WorkflowInstances" FromRole="WorkflowInstance" ToRole="WorkflowInstanceStepHistory" />
          <NavigationProperty Name="WorkflowInstanceParticipants" Relationship="Model.FK_WorkflowInstances_WorkflowInstanceParticipants" FromRole="WorkflowInstance" ToRole="WorkflowInstanceParticipant" />
          <Property Type="String" Name="ReferenceNumber" Nullable="false" MaxLength="12" FixedLength="false" Unicode="false" />
          <Property Type="DateTime" Name="WarningDate" Precision="3" />
          <Property Type="Int16" Name="WorkflowInstanceStateID" annotation:StoreGeneratedPattern="Computed" />
          <Property Type="DateTime" Name="DueDate" Precision="3" />
          <Property Type="String" Name="RequiredSteps" MaxLength="100" FixedLength="false" Unicode="false" />
          <Property Type="Int32" Name="WorkflowInstanceAge" Nullable="false" />
          <Property Type="String" Name="Description" MaxLength="255" FixedLength="false" Unicode="false" />
          <NavigationProperty Name="WorkflowInstanceDocuments" Relationship="Model.FK_WorkflowInstanceDocuments_WorkflowInstances" FromRole="WorkflowInstance" ToRole="WorkflowInstanceDocument" />
          <Property Name="OfficeLocationID" Type="Int64" Nullable="false" />
          <NavigationProperty Name="WorkflowInstanceTasks" Relationship="Model.FK_WorkflowInstanceTasks_WorkflowInstances" FromRole="WorkflowInstance" ToRole="WorkflowInstanceTask" >
          </NavigationProperty>
        </EntityType>
        <EntityType Name="WorkflowInstanceStatus">
          <Key>
            <PropertyRef Name="WorkflowInstanceStatusID" />
          </Key>
          <Property Type="Int16" Name="WorkflowInstanceStatusID" Nullable="false" />
          <Property Type="String" Name="Description" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" />
          <NavigationProperty Name="WorkflowInstances" Relationship="Model.FK_WorkflowInstances_WorkflowInstanceStatus" FromRole="WorkflowInstanceStatu" ToRole="WorkflowInstance" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <NavigationProperty Name="WorkflowInstanceStatusHistories" Relationship="Model.PK_WorkflowInstanceStatusHistory_WorkflowInstanceStatus" FromRole="WorkflowInstanceStatu" ToRole="WorkflowInstanceStatusHistory" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
        </EntityType>
        <EntityType Name="WorkflowInstanceStatusHistory">
          <Key>
            <PropertyRef Name="WorkflowInstanceStatusHistoryID" />
          </Key>
          <Property Type="Int64" Name="WorkflowInstanceStatusHistoryID" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Type="Int64" Name="WorkflowInstanceID" Nullable="false" />
          <Property Type="Int16" Name="WorkflowInstanceStatusID" Nullable="false" />
          <Property Type="Int64" Name="UserID" Nullable="false" />
          <Property Type="DateTime" Name="Date" Nullable="false" Precision="3" />
          <NavigationProperty Name="WorkflowInstance" Relationship="Model.FK_WorkflowInstanceStatusHistory_WorkflowInstances" FromRole="WorkflowInstanceStatusHistory" ToRole="WorkflowInstance" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <NavigationProperty Name="WorkflowInstanceStatus" Relationship="Model.PK_WorkflowInstanceStatusHistory_WorkflowInstanceStatus" FromRole="WorkflowInstanceStatusHistory" ToRole="WorkflowInstanceStatu" />
        </EntityType>
        <EntityType Name="WorkflowInstanceStepHistory">
          <Key>
            <PropertyRef Name="WorkflowInstanceStepHistoryID" />
          </Key>
          <Property Type="Int64" Name="WorkflowInstanceStepHistoryID" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Type="Int64" Name="WorkflowInstanceID" Nullable="false" />
          <Property Type="Int16" Name="WorkflowTemplateStepID" Nullable="false" />
          <Property Type="Int64" Name="UserID" Nullable="false" />
          <Property Type="DateTime" Name="Date" Nullable="false" Precision="3" />
          <NavigationProperty Name="WorkflowInstance" Relationship="Model.FK_WorkflowInstanceStepHistory_WorkflowInstances" FromRole="WorkflowInstanceStepHistory" ToRole="WorkflowInstance" />
        </EntityType>
        <EntityType Name="WorkflowInstanceTaskStatus">
          <Key>
            <PropertyRef Name="WorkflowInstanceTaskStatusID" />
          </Key>
          <Property Type="Int16" Name="WorkflowInstanceTaskStatusID" Nullable="false" />
          <Property Type="String" Name="Description" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Type="Boolean" Name="IsCancelled" Nullable="false" />
          <NavigationProperty Name="WorkflowInstanceTaskStatusHistories" Relationship="Model.FK_WorkflowInstanceTaskStatusHistory_WorkflowInstanceTaskStatus" FromRole="WorkflowInstanceTaskStatu" ToRole="WorkflowInstanceTaskStatusHistory" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <NavigationProperty Name="WorkflowInstanceTasks" Relationship="Model.FK_WorkflowInstanceTasks_WorkflowInstanceTaskStatus" FromRole="WorkflowInstanceTaskStatus" ToRole="WorkflowInstanceTask" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
        </EntityType>
        <EntityType Name="WorkflowInstanceTaskStatusHistory">
          <Key>
            <PropertyRef Name="WorkflowInstanceTaskStatusHistoryID" />
          </Key>
          <Property Type="Int64" Name="WorkflowInstanceTaskStatusHistoryID" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Type="Int64" Name="WorkflowInstanceTaskID" Nullable="false" />
          <Property Type="Int16" Name="WorkflowInstanceTaskStatusID" Nullable="false" />
          <Property Type="Int64" Name="UserID" Nullable="false" />
          <Property Type="DateTime" Name="Date" Nullable="false" Precision="3" />
          <NavigationProperty Name="WorkflowInstanceTaskStatus" Relationship="Model.FK_WorkflowInstanceTaskStatusHistory_WorkflowInstanceTaskStatus" FromRole="WorkflowInstanceTaskStatusHistory" ToRole="WorkflowInstanceTaskStatu" />
        </EntityType>
        <EntityType Name="WorkflowTemplateTriggerType">
          <Key>
            <PropertyRef Name="WorkflowTemplateTriggerTypeID" />
          </Key>
          <Property Type="Int16" Name="WorkflowTemplateTriggerTypeID" Nullable="false" />
          <Property Type="String" Name="Description" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Type="Boolean" Name="IsCancelled" Nullable="false" />
          <NavigationProperty Name="WorkflowTemplateTriggers" Relationship="Model.FK_WorkflowTemplateTriggers_WorkflowTemplateTriggerTypes" FromRole="WorkflowTemplateTriggerType" ToRole="WorkflowTemplateTrigger" />
        </EntityType>
        <Association Name="FK_WorkflowInstances_WorkflowInstanceStatus">
          <End Type="Model.WorkflowInstanceStatus" Role="WorkflowInstanceStatu" Multiplicity="0..1" />
          <End Type="Model.WorkflowInstance" Role="WorkflowInstance" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowInstanceStatu">
              <PropertyRef Name="WorkflowInstanceStatusID" />
            </Principal>
            <Dependent Role="WorkflowInstance">
              <PropertyRef Name="WorkflowInstanceStatusID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowInstances_WorkflowTemplates">
          <End Type="Model.WorkflowTemplate" Role="WorkflowTemplate" Multiplicity="1" />
          <End Type="Model.WorkflowInstance" Role="WorkflowInstance" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplate">
              <PropertyRef Name="WorkflowTemplateID" />
            </Principal>
            <Dependent Role="WorkflowInstance">
              <PropertyRef Name="WorkflowTemplateID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowInstances_WorkflowTemplateSteps">
          <End Type="Model.WorkflowTemplateStep" Role="WorkflowTemplateStep" Multiplicity="1" />
          <End Type="Model.WorkflowInstance" Role="WorkflowInstance" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplateStep">
              <PropertyRef Name="WorkflowTemplateStepID" />
            </Principal>
            <Dependent Role="WorkflowInstance">
              <PropertyRef Name="WorkflowTemplateStepID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowInstanceStatusHistory_WorkflowInstances">
          <End Type="Model.WorkflowInstance" Role="WorkflowInstance" Multiplicity="1" />
          <End Type="Model.WorkflowInstanceStatusHistory" Role="WorkflowInstanceStatusHistory" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowInstance">
              <PropertyRef Name="WorkflowInstanceID" />
            </Principal>
            <Dependent Role="WorkflowInstanceStatusHistory">
              <PropertyRef Name="WorkflowInstanceID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowInstanceStepHistory_WorkflowInstances">
          <End Type="Model.WorkflowInstance" Role="WorkflowInstance" Multiplicity="1" />
          <End Type="Model.WorkflowInstanceStepHistory" Role="WorkflowInstanceStepHistory" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowInstance">
              <PropertyRef Name="WorkflowInstanceID" />
            </Principal>
            <Dependent Role="WorkflowInstanceStepHistory">
              <PropertyRef Name="WorkflowInstanceID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="PK_WorkflowInstanceStatusHistory_WorkflowInstanceStatus">
          <End Type="Model.WorkflowInstanceStatus" Role="WorkflowInstanceStatu" Multiplicity="1" />
          <End Type="Model.WorkflowInstanceStatusHistory" Role="WorkflowInstanceStatusHistory" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowInstanceStatu">
              <PropertyRef Name="WorkflowInstanceStatusID" />
            </Principal>
            <Dependent Role="WorkflowInstanceStatusHistory">
              <PropertyRef Name="WorkflowInstanceStatusID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowInstanceTaskStatusHistory_WorkflowInstanceTaskStatus">
          <End Type="Model.WorkflowInstanceTaskStatus" Role="WorkflowInstanceTaskStatu" Multiplicity="1" />
          <End Type="Model.WorkflowInstanceTaskStatusHistory" Role="WorkflowInstanceTaskStatusHistory" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowInstanceTaskStatu">
              <PropertyRef Name="WorkflowInstanceTaskStatusID" />
            </Principal>
            <Dependent Role="WorkflowInstanceTaskStatusHistory">
              <PropertyRef Name="WorkflowInstanceTaskStatusID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <EntityType Name="WorkflowTemplateTriggerAction">
          <Key>
            <PropertyRef Name="WorkflowTemplateTriggerActionID" />
          </Key>
          <Property Type="Int16" Name="WorkflowTemplateTriggerActionID" Nullable="false" />
          <Property Type="String" Name="Description" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Type="Boolean" Name="IsCancelled" Nullable="false" />
          <NavigationProperty Name="WorkflowTemplateTriggers" Relationship="Model.FK_WorkflowTemplateTriggers_WorkflowTemplateTriggerActions" FromRole="WorkflowTemplateTriggerAction" ToRole="WorkflowTemplateTrigger" />
        </EntityType>
        <EntityType Name="WorkflowTemplateTrigger">
          <Key>
            <PropertyRef Name="WorkflowTemplateTriggerID" />
          </Key>
          <Property Type="Int64" Name="WorkflowTemplateTriggerID" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Type="Int64" Name="WorkflowTemplateID" Nullable="false" />
          <Property Type="Int16" Name="WorkflowTemplateTriggerTypeID" Nullable="false" />
          <Property Type="Int16" Name="WorkflowTemplateTriggerActionID" Nullable="false" />
          <NavigationProperty Name="WorkflowTemplate" Relationship="Model.FK_WorkflowTemplateTriggers_WorkflowTemplates" FromRole="WorkflowTemplateTrigger" ToRole="WorkflowTemplate" />
          <NavigationProperty Name="WorkflowTemplateTriggerAction" Relationship="Model.FK_WorkflowTemplateTriggers_WorkflowTemplateTriggerActions" FromRole="WorkflowTemplateTrigger" ToRole="WorkflowTemplateTriggerAction" />
          <NavigationProperty Name="WorkflowTemplateTriggerType" Relationship="Model.FK_WorkflowTemplateTriggers_WorkflowTemplateTriggerTypes" FromRole="WorkflowTemplateTrigger" ToRole="WorkflowTemplateTriggerType" />
          <Property Type="String" Name="Title" Nullable="false" MaxLength="1000" FixedLength="false" Unicode="false" />
          <Property Type="Int32" Name="MessageTemplateID" />
          <Property Type="Int64" Name="WorkflowTemplateStepID" />
          <NavigationProperty Name="WorkflowTemplateStep" Relationship="Model.FK_WorkflowTemplateTriggers_WorkflowTemplateSteps" FromRole="WorkflowTemplateTrigger" ToRole="WorkflowTemplateStep" />
          <Property Type="Int32" Name="WorkflowTemplateScriptID" />
          <Property Type="String" Name="IsRequiredXml" MaxLength="Max" FixedLength="false" Unicode="true" />
          <Property Type="String" Name="IsRequiredScript" MaxLength="1000" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="IsRequiredStatusIds" MaxLength="40" FixedLength="false" Unicode="false" />
        </EntityType>
        <Association Name="FK_WorkflowTemplateTriggers_WorkflowTemplates">
          <End Type="Model.WorkflowTemplate" Role="WorkflowTemplate" Multiplicity="1" />
          <End Type="Model.WorkflowTemplateTrigger" Role="WorkflowTemplateTrigger" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplate">
              <PropertyRef Name="WorkflowTemplateID" />
            </Principal>
            <Dependent Role="WorkflowTemplateTrigger">
              <PropertyRef Name="WorkflowTemplateID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplateTriggers_WorkflowTemplateTriggerActions">
          <End Type="Model.WorkflowTemplateTriggerAction" Role="WorkflowTemplateTriggerAction" Multiplicity="1" />
          <End Type="Model.WorkflowTemplateTrigger" Role="WorkflowTemplateTrigger" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplateTriggerAction">
              <PropertyRef Name="WorkflowTemplateTriggerActionID" />
            </Principal>
            <Dependent Role="WorkflowTemplateTrigger">
              <PropertyRef Name="WorkflowTemplateTriggerActionID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplateTriggers_WorkflowTemplateTriggerTypes">
          <End Type="Model.WorkflowTemplateTriggerType" Role="WorkflowTemplateTriggerType" Multiplicity="1" />
          <End Type="Model.WorkflowTemplateTrigger" Role="WorkflowTemplateTrigger" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplateTriggerType">
              <PropertyRef Name="WorkflowTemplateTriggerTypeID" />
            </Principal>
            <Dependent Role="WorkflowTemplateTrigger">
              <PropertyRef Name="WorkflowTemplateTriggerTypeID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplates_Workflows">
          <End Type="Model.Workflow" Role="Workflow" Multiplicity="1" />
          <End Type="Model.WorkflowTemplate" Role="WorkflowTemplate" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Workflow">
              <PropertyRef Name="WorkflowID" />
            </Principal>
            <Dependent Role="WorkflowTemplate">
              <PropertyRef Name="WorkflowID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <EntityType Name="WorkflowInstanceParticipant">
          <Key>
            <PropertyRef Name="WorkflowInstanceParticipantID" />
          </Key>
          <Property Type="Int64" Name="WorkflowInstanceParticipantID" Nullable="false" />
          <Property Type="Int64" Name="WorkflowTemplateParticipantID" Nullable="false" />
          <Property Type="Int64" Name="UserID" />
          <NavigationProperty Name="WorkflowTemplateParticipant" Relationship="Model.FK_WorkflowInstanceParticipants_WorkflowTemplateParticipants" FromRole="WorkflowInstanceParticipant" ToRole="WorkflowTemplateParticipant" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <Property Type="Int64" Name="WorkflowInstanceID" Nullable="false" />
          <NavigationProperty Name="WorkflowInstance" Relationship="Model.FK_WorkflowInstances_WorkflowInstanceParticipants" FromRole="WorkflowInstanceParticipant" ToRole="WorkflowInstance" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
        </EntityType>
        <EntityType Name="WorkflowTemplateParticipantRole">
          <Key>
            <PropertyRef Name="WorkflowTemplateParticipantID" />
            <PropertyRef Name="RoleID" />
          </Key>
          <Property Type="Int64" Name="WorkflowTemplateParticipantID" Nullable="false" />
          <Property Type="Int16" Name="RoleID" Nullable="false" />
          <NavigationProperty Name="WorkflowTemplateParticipant" Relationship="Model.FK_WorkflowTemplateParticipantRoles_WorkflowTemplateParticipants" FromRole="WorkflowTemplateParticipantRole" ToRole="WorkflowTemplateParticipant" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
        </EntityType>
        <EntityType Name="WorkflowTemplateParticipant">
          <Key>
            <PropertyRef Name="WorkflowTemplateParticipantID" />
          </Key>
          <Property Type="Int64" Name="WorkflowTemplateParticipantID" Nullable="false" />
          <Property Type="Int64" Name="WorkflowTemplateID" Nullable="false" />
          <NavigationProperty Name="WorkflowInstanceParticipants" Relationship="Model.FK_WorkflowInstanceParticipants_WorkflowTemplateParticipants" FromRole="WorkflowTemplateParticipant" ToRole="WorkflowInstanceParticipant" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <NavigationProperty Name="WorkflowTemplateParticipantRoles" Relationship="Model.FK_WorkflowTemplateParticipantRoles_WorkflowTemplateParticipants" FromRole="WorkflowTemplateParticipant" ToRole="WorkflowTemplateParticipantRole" />
          <NavigationProperty Name="WorkflowTemplate" Relationship="Model.FK_WorkflowTemplateParticipants_WorkflowTemplates" FromRole="WorkflowTemplateParticipant" ToRole="WorkflowTemplate" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <NavigationProperty Name="WorkflowTemplateStepAssignees" Relationship="Model.FK_WorkflowTemplateStepAssignees_WorkflowTemplateParticipants" FromRole="WorkflowTemplateParticipant" ToRole="WorkflowTemplateStepAssignee" />
          <Property Type="String" Name="FieldName" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="DisplayName" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Type="Int16" Name="OrderBy" Nullable="false" />
          <Property Type="Int64" Name="DefaultUserID" />
          <Property Type="Boolean" Name="IsVisible" Nullable="false" />
          <Property Type="String" Name="DocumentPermissionLevel" MaxLength="50" FixedLength="false" Unicode="false" />
        </EntityType>
        <EntityType Name="WorkflowTemplateStepAssignee">
          <Key>
            <PropertyRef Name="WorkflowTemplateStepAssigneeID" />
          </Key>
          <Property Type="Int64" Name="WorkflowTemplateStepAssigneeID" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Type="Int64" Name="WorkflowTemplateStepID" Nullable="false" />
          <Property Type="Int64" Name="WorkflowTemplateParticipantID" Nullable="false" />
          <Property Type="Boolean" Name="IsMandatory" Nullable="false" />
          <NavigationProperty Name="WorkflowTemplateParticipant" Relationship="Model.FK_WorkflowTemplateStepAssignees_WorkflowTemplateParticipants" FromRole="WorkflowTemplateStepAssignee" ToRole="WorkflowTemplateParticipant" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <NavigationProperty Name="WorkflowTemplateStep" Relationship="Model.FK_WorkflowTemplateStepAssignees_WorkflowTemplateSteps" FromRole="WorkflowTemplateStepAssignee" ToRole="WorkflowTemplateStep" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
        </EntityType>
        <Association Name="FK_WorkflowInstanceParticipants_WorkflowTemplateParticipants">
          <End Type="Model.WorkflowTemplateParticipant" Role="WorkflowTemplateParticipant" Multiplicity="1" />
          <End Type="Model.WorkflowInstanceParticipant" Role="WorkflowInstanceParticipant" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplateParticipant">
              <PropertyRef Name="WorkflowTemplateParticipantID" />
            </Principal>
            <Dependent Role="WorkflowInstanceParticipant">
              <PropertyRef Name="WorkflowTemplateParticipantID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplateParticipantRoles_WorkflowTemplateParticipants">
          <End Type="Model.WorkflowTemplateParticipant" Role="WorkflowTemplateParticipant" Multiplicity="1" />
          <End Type="Model.WorkflowTemplateParticipantRole" Role="WorkflowTemplateParticipantRole" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplateParticipant">
              <PropertyRef Name="WorkflowTemplateParticipantID" />
            </Principal>
            <Dependent Role="WorkflowTemplateParticipantRole">
              <PropertyRef Name="WorkflowTemplateParticipantID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplateParticipants_WorkflowTemplates">
          <End Type="Model.WorkflowTemplate" Role="WorkflowTemplate" Multiplicity="1" />
          <End Type="Model.WorkflowTemplateParticipant" Role="WorkflowTemplateParticipant" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplate">
              <PropertyRef Name="WorkflowTemplateID" />
            </Principal>
            <Dependent Role="WorkflowTemplateParticipant">
              <PropertyRef Name="WorkflowTemplateID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplateStepAssignees_WorkflowTemplateParticipants">
          <End Type="Model.WorkflowTemplateParticipant" Role="WorkflowTemplateParticipant" Multiplicity="1" />
          <End Type="Model.WorkflowTemplateStepAssignee" Role="WorkflowTemplateStepAssignee" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplateParticipant">
              <PropertyRef Name="WorkflowTemplateParticipantID" />
            </Principal>
            <Dependent Role="WorkflowTemplateStepAssignee">
              <PropertyRef Name="WorkflowTemplateParticipantID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplateStepAssignees_WorkflowTemplateSteps">
          <End Type="Model.WorkflowTemplateStep" Role="WorkflowTemplateStep" Multiplicity="1" />
          <End Type="Model.WorkflowTemplateStepAssignee" Role="WorkflowTemplateStepAssignee" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplateStep">
              <PropertyRef Name="WorkflowTemplateStepID" />
            </Principal>
            <Dependent Role="WorkflowTemplateStepAssignee">
              <PropertyRef Name="WorkflowTemplateStepID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowInstances_WorkflowInstanceParticipants">
          <End Type="Model.WorkflowInstance" Role="WorkflowInstance" Multiplicity="1" />
          <End Type="Model.WorkflowInstanceParticipant" Role="WorkflowInstanceParticipant" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowInstance">
              <PropertyRef Name="WorkflowInstanceID" />
            </Principal>
            <Dependent Role="WorkflowInstanceParticipant">
              <PropertyRef Name="WorkflowInstanceID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <EntityType Name="WorkflowUser">
          <Key>
            <PropertyRef Name="UserID" />
          </Key>
          <Property Type="Int64" Name="UserID" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Type="Int16" Name="UserStatusID" Nullable="false" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </Property>
          <Property Type="String" Name="LastName" MaxLength="50" FixedLength="false" Unicode="false" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </Property>
          <Property Type="String" Name="FirstName" MaxLength="50" FixedLength="false" Unicode="false" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </Property>
          <Property Type="String" Name="FullName" Nullable="false" MaxLength="101" FixedLength="false" Unicode="false" annotation:StoreGeneratedPattern="Computed" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </Property>
          <Property Type="String" Name="KnownAs" MaxLength="101" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="Email" Nullable="false" MaxLength="255" FixedLength="false" Unicode="false" >
          </Property>
          <Property Type="String" Name="NTAccount" MaxLength="255" FixedLength="false" Unicode="false" a:GetterAccess="Internal" xmlns:a="http://schemas.microsoft.com/ado/2006/04/codegeneration" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </Property>
          <Property Type="Boolean" Name="IsPasswordExpired" a:GetterAccess="Internal" xmlns:a="http://schemas.microsoft.com/ado/2006/04/codegeneration" a:SetterAccess="Internal" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </Property>
          <Property Type="DateTime" Name="PasswordDate" Precision="3" a:GetterAccess="Internal" xmlns:a="http://schemas.microsoft.com/ado/2006/04/codegeneration" a:SetterAccess="Internal" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </Property>
          <Property Type="String" Name="PasswordHash" MaxLength="255" FixedLength="false" Unicode="false" a:GetterAccess="Internal" xmlns:a="http://schemas.microsoft.com/ado/2006/04/codegeneration" a:SetterAccess="Internal" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </Property>
          <Property Type="String" Name="PasswordSalt" MaxLength="20" FixedLength="false" Unicode="false" a:GetterAccess="Internal" xmlns:a="http://schemas.microsoft.com/ado/2006/04/codegeneration" a:SetterAccess="Internal" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </Property>
          <Property Type="String" Name="PasswordChallenge" MaxLength="20" FixedLength="false" Unicode="false" a:GetterAccess="Internal" xmlns:a="http://schemas.microsoft.com/ado/2006/04/codegeneration" a:SetterAccess="Internal" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </Property>
          <Property Type="String" Name="PasswordQuestion" MaxLength="255" FixedLength="false" Unicode="false" a:GetterAccess="Internal" xmlns:a="http://schemas.microsoft.com/ado/2006/04/codegeneration" a:SetterAccess="Internal" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </Property>
          <Property Type="String" Name="PasswordAnswerHash" MaxLength="255" FixedLength="false" Unicode="false" a:GetterAccess="Internal" xmlns:a="http://schemas.microsoft.com/ado/2006/04/codegeneration" a:SetterAccess="Internal" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </Property>
          <Property Type="String" Name="PasswordAnswerSalt" MaxLength="20" FixedLength="false" Unicode="false" a:GetterAccess="Internal" xmlns:a="http://schemas.microsoft.com/ado/2006/04/codegeneration" a:SetterAccess="Internal" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </Property>
          <Property Type="String" Name="PasswordAnswerChallenge" MaxLength="20" FixedLength="false" Unicode="false" a:GetterAccess="Internal" xmlns:a="http://schemas.microsoft.com/ado/2006/04/codegeneration" a:SetterAccess="Internal" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </Property>
          <Property Type="Int64" Name="CreatedByID" Nullable="false" a:GetterAccess="Internal" xmlns:a="http://schemas.microsoft.com/ado/2006/04/codegeneration" a:SetterAccess="Internal" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </Property>
          <Property Type="DateTime" Name="CreatedDate" Nullable="false" Precision="3" a:GetterAccess="Internal" xmlns:a="http://schemas.microsoft.com/ado/2006/04/codegeneration" a:SetterAccess="Internal" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </Property>
          <Property Type="Int64" Name="UpdatedByID" Nullable="false" a:GetterAccess="Internal" xmlns:a="http://schemas.microsoft.com/ado/2006/04/codegeneration" a:SetterAccess="Internal" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </Property>
          <Property Type="DateTime" Name="UpdatedDate" Nullable="false" Precision="3" a:GetterAccess="Internal" xmlns:a="http://schemas.microsoft.com/ado/2006/04/codegeneration" a:SetterAccess="Internal" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </Property>
          <Property Type="Int32" Name="EntityID" a:GetterAccess="Internal" xmlns:a="http://schemas.microsoft.com/ado/2006/04/codegeneration" a:SetterAccess="Internal" />
          <Property Type="String" Name="ItemID" MaxLength="20" FixedLength="false" Unicode="false" a:GetterAccess="Internal" xmlns:a="http://schemas.microsoft.com/ado/2006/04/codegeneration" a:SetterAccess="Internal" />
          <NavigationProperty Name="Entity" Relationship="Model.FK_Users_Entities" FromRole="WorkflowUser" ToRole="WorkflowEntity" />
          <Property Type="String" Name="Cell" MaxLength="10" FixedLength="false" Unicode="false" a:GetterAccess="Internal" xmlns:a="http://schemas.microsoft.com/ado/2006/04/codegeneration" a:SetterAccess="Internal" />
          <Property Type="Binary" Name="FingerprintTemplate" MaxLength="Max" FixedLength="false" a:GetterAccess="Internal" xmlns:a="http://schemas.microsoft.com/ado/2006/04/codegeneration" a:SetterAccess="Internal" />
          <Property Name="FingerprintRequestToken" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Name="FingerprintRequestExpiryDate" Type="DateTime" Precision="3" />
          <Property Name="UserProfileDocID" Type="Int64" />
          <Property Name="OfficeLocationID" Type="Int64" />
          <NavigationProperty Name="WorkflowInstanceTasks" Relationship="Model.FK_Users_AssignedTo" FromRole="WorkflowUser" ToRole="WorkflowInstanceTask" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <NavigationProperty Name="WorkflowInstanceTasks1" Relationship="Model.FK_Users_CompletedBy" FromRole="WorkflowUser" ToRole="WorkflowInstanceTask" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <NavigationProperty Name="WorkflowInstanceTasks2" Relationship="Model.FK_WorkflowInstanceTasks_Users1" FromRole="WorkflowUser" ToRole="WorkflowInstanceTask" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
        </EntityType>
        <EntityType Name="Vw_WorkflowInstance">
          <Key>
            <PropertyRef Name="WorkflowInstanceID" />
          </Key>
          <Property Type="Int64" Name="WorkflowInstanceID" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Type="Int64" Name="CreatedByID" Nullable="false" />
          <Property Type="DateTime" Name="CreatedDate" Nullable="false" Precision="3" />
          <Property Type="Int16" Name="WorkflowInstanceStatusID" Nullable="false" />
          <Property Type="Int64" Name="WorkflowTemplateID" Nullable="false" />
          <Property Type="Int64" Name="WorkflowTemplateStepID" Nullable="false" />
          <Property Type="Int32" Name="EntityID" Nullable="false" />
          <Property Type="Int64" Name="ItemID" Nullable="false" />
          <Property Type="String" Name="ReferenceNumber" MaxLength="12" FixedLength="false" Unicode="false" Nullable="false" />
          <Property Type="String" Name="Description" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Type="Int64" Name="WorkflowID" Nullable="false" />
          <Property Type="String" Name="WorkflowControllerName" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="Reference" Nullable="false" MaxLength="12" FixedLength="false" Unicode="false" />
          <Property Type="DateTime" Name="WarningDate" Precision="3" />
          <Property Type="String" Name="WorkflowFriendlyName" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Type="Int64" Name="UpdatedByID" Nullable="false" />
          <Property Type="DateTime" Name="UpdatedDate" Nullable="false" Precision="3" />
          <Property Type="DateTime" Name="DueDate" Precision="3" />
          <Property Type="String" Name="CreatedByName" MaxLength="101" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="WorkflowInstanceState" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Type="Int16" Name="WorkflowInstanceStateID" Nullable="false" />
          <Property Type="DateTime" Name="WorkflowStartDate" Nullable="false" Precision="3" />
          <Property Type="DateTime" Name="WorkflowEndDate" Precision="3" />
          <Property Type="String" Name="WorkflowInstanceStatus" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Type="Int32" Name="WorkflowInstanceAge" Nullable="false" />
          <Property Name="ASsignedTo" Type="String" Nullable="false" MaxLength="1" FixedLength="false" Unicode="false" />
          <Property Name="WorkflowInstanceDescription" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Name="DashboardControllerName" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Name="StepNumber" Type="Double" Nullable="false" />
          <Property Name="StepTitle" Type="String" Nullable="false" MaxLength="255" FixedLength="false" Unicode="false" />
        </EntityType>
        <EntityType Name="WorkflowEntity">
          <Key>
            <PropertyRef Name="EntityID" />
          </Key>
          <Property Type="Int32" Name="EntityID" Nullable="false" />
          <Property Type="String" Name="EntityName" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="EntityTableName" MaxLength="50" FixedLength="false" Unicode="false" Nullable="false" />
          <Property Type="String" Name="EntityKey" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" />
          <NavigationProperty Name="Workflows" Relationship="Model.FK_Workflows_Entities" FromRole="Entity" ToRole="Workflow" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <NavigationProperty Name="Users" Relationship="Model.FK_Users_Entities" FromRole="WorkflowEntity" ToRole="WorkflowUser" />
          <Property Type="String" Name="EntityViewName" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Type="Boolean" Name="IsCancelled" Nullable="false" />
          <Property Type="String" Name="FolderPrefix" MaxLength="3" FixedLength="false" Unicode="false" />
          <Property Type="String" Name="EntityDataTableName" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Name="SMSFieldKey" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Name="EmailFieldKey" Type="String" MaxLength="50" FixedLength="false" Unicode="false" />
        </EntityType>
        <Association Name="FK_Workflows_Entities">
          <End Type="Model.WorkflowEntity" Role="Entity" Multiplicity="1" />
          <End Type="Model.Workflow" Role="Workflow" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Entity">
              <PropertyRef Name="EntityID" />
            </Principal>
            <Dependent Role="Workflow">
              <PropertyRef Name="EntityID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_Users_Entities">
          <End Type="Model.WorkflowEntity" Role="WorkflowEntity" Multiplicity="0..1" />
          <End Type="Model.WorkflowUser" Role="WorkflowUser" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowEntity">
              <PropertyRef Name="EntityID" />
            </Principal>
            <Dependent Role="WorkflowUser">
              <PropertyRef Name="EntityID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplateTriggers_WorkflowTemplateSteps">
          <End Type="Model.WorkflowTemplateStep" Role="WorkflowTemplateStep" Multiplicity="0..1" />
          <End Type="Model.WorkflowTemplateTrigger" Role="WorkflowTemplateTrigger" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplateStep">
              <PropertyRef Name="WorkflowTemplateStepID" />
            </Principal>
            <Dependent Role="WorkflowTemplateTrigger">
              <PropertyRef Name="WorkflowTemplateStepID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <ComplexType Name="Pr_WorkflowInstanceTaskStepsGetForCorrection_Result">
          <Property Type="Int64" Name="WorkflowTemplateID" Nullable="false" />
          <Property Type="Int64" Name="WorkflowInstanceTaskID" Nullable="false" />
          <Property Type="Int64" Name="WorkflowTemplateStepID" Nullable="false" />
          <Property Type="Double" Name="Step" Nullable="false" />
          <Property Type="String" Name="StepDescription" Nullable="true" MaxLength="255" />
          <Property Type="String" Name="CompletedBy" Nullable="true" MaxLength="101" />
          <Property Type="String" Name="CompletedTaskDescription" Nullable="true" MaxLength="633" />
        </ComplexType>
        <ComplexType Name="Pr_WorkflowInstanceTaskEscalationUsersGet_Result">
          <Property Type="Int64" Name="UserID" Nullable="false" />
          <Property Type="String" Name="KnownAs" Nullable="true" MaxLength="101" />
          <Property Type="String" Name="RoleName" Nullable="false" MaxLength="50" />
          <Property Type="String" Name="Settings" Nullable="true" />
        </ComplexType>
        <EntityType Name="WorkflowBuddy">
          <Key>
            <PropertyRef Name="WorkflowBuddyID" />
          </Key>
          <Property Type="Int64" Name="WorkflowBuddyID" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Type="Int64" Name="WorkflowID" Nullable="false" />
          <Property Type="Int64" Name="UserID" Nullable="false" />
          <Property Type="Int64" Name="BuddyUserID" Nullable="false" />
          <NavigationProperty Name="Workflow" Relationship="Model.FK_WorkflowBuddies_Workflows" FromRole="WorkflowBuddy" ToRole="Workflow" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
        </EntityType>
        <Association Name="FK_WorkflowBuddies_Workflows">
          <End Type="Model.Workflow" Role="Workflow" Multiplicity="1" />
          <End Type="Model.WorkflowBuddy" Role="WorkflowBuddy" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="Workflow">
              <PropertyRef Name="WorkflowID" />
            </Principal>
            <Dependent Role="WorkflowBuddy">
              <PropertyRef Name="WorkflowID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <ComplexType Name="Pr_WorkflowInstanceDocumentsGet_Result">
          <Property Type="Int64" Name="WorkflowInstanceDocumentID" Nullable="false" />
          <Property Type="Int64" Name="WorkflowInstanceID" Nullable="false" />
          <Property Type="Int16" Name="DocumentTypeID" Nullable="false" />
          <Property Type="Int64" Name="DocumentID" Nullable="true" />
          <Property Type="Boolean" Name="IsMandatory" Nullable="false" />
          <Property Type="Boolean" Name="IsCancelled" Nullable="false" />
          <Property Type="String" Name="DocumentDescription" Nullable="false" MaxLength="255" />
          <Property Type="Int16" Name="DocumentVerificationStatusID" Nullable="true" />
        </ComplexType>
        <EntityType Name="WorkflowInstanceDocument">
          <Key>
            <PropertyRef Name="WorkflowInstanceDocumentID" />
          </Key>
          <Property Name="WorkflowInstanceDocumentID" Type="Int64" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="WorkflowInstanceID" Type="Int64" Nullable="false" />
          <Property Name="DocumentTypeID" Type="Int16" Nullable="false" />
          <Property Name="DocumentID" Type="Int64" />
          <Property Name="IsMandatory" Type="Boolean" Nullable="false" />
          <Property Name="IsCancelled" Type="Boolean" Nullable="false" />
          <NavigationProperty Name="WorkflowInstance" Relationship="Model.FK_WorkflowInstanceDocuments_WorkflowInstances" FromRole="WorkflowInstanceDocument" ToRole="WorkflowInstance" />
          <Property Name="IsExpiryDateRequired" Type="Boolean" />
          <Property Name="ExpiryDate" Type="DateTime" Precision="3" />
          <Property Name="Title" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
        </EntityType>
        <EntityType Name="WorkflowTemplateDocument">
          <Key>
            <PropertyRef Name="WorkflowTemplateDocumentID" />
          </Key>
          <Property Name="WorkflowTemplateDocumentID" Type="Int64" Nullable="false" />
          <Property Name="WorkflowTemplateID" Type="Int64" Nullable="false" />
          <Property Name="DocumentTypeID" Type="Int16" Nullable="false" />
          <Property Name="IsRequiredSql" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="false" />
          <Property Name="IsAvailableForUploadSql" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="false" />
          <Property Name="OrderBy" Type="Int16" Nullable="false" />
          <Property Name="IsCancelled" Type="Boolean" Nullable="false" />
          <NavigationProperty Name="WorkflowTemplate" Relationship="Model.FK_WorkflowTemplateDocuments_WorkflowTemplates" FromRole="WorkflowTemplateDocument" ToRole="WorkflowTemplate" />
        </EntityType>
        <Association Name="FK_WorkflowInstanceDocuments_WorkflowInstances">
          <End Type="Model.WorkflowInstance" Role="WorkflowInstance" Multiplicity="1" />
          <End Type="Model.WorkflowInstanceDocument" Role="WorkflowInstanceDocument" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowInstance">
              <PropertyRef Name="WorkflowInstanceID" />
            </Principal>
            <Dependent Role="WorkflowInstanceDocument">
              <PropertyRef Name="WorkflowInstanceID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowTemplateDocuments_WorkflowTemplates">
          <End Type="Model.WorkflowTemplate" Role="WorkflowTemplate" Multiplicity="1" />
          <End Type="Model.WorkflowTemplateDocument" Role="WorkflowTemplateDocument" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplate">
              <PropertyRef Name="WorkflowTemplateID" />
            </Principal>
            <Dependent Role="WorkflowTemplateDocument">
              <PropertyRef Name="WorkflowTemplateID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <EntityType Name="Vw_WorkflowInstanceDocument">
          <Key>
            <PropertyRef Name="WorkflowInstanceDocumentID" />
            <PropertyRef Name="WorkflowInstanceID" />
            <PropertyRef Name="DocumentTypeID" />
            <PropertyRef Name="IsMandatory" />
            <PropertyRef Name="IsCancelled" />
            <PropertyRef Name="DocumentDescription" />
            <PropertyRef Name="IsDocumentTitleEditable" />
          </Key>
          <Property Name="WorkflowInstanceDocumentID" Type="Int64" Nullable="false" />
          <Property Name="WorkflowInstanceID" Type="Int64" Nullable="false" />
          <Property Name="DocumentTypeID" Type="Int16" Nullable="false" />
          <Property Name="DocumentID" Type="Int64" />
          <Property Name="IsMandatory" Type="Boolean" Nullable="false" />
          <Property Name="IsCancelled" Type="Boolean" Nullable="false" />
          <Property Name="DocumentDescription" Type="String" Nullable="false" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Name="DocumentVerificationStatusID" Type="Int16" />
          <Property Name="IsExpiryDateRequired" Type="Boolean" />
          <Property Name="ExpiryDate" Type="DateTime" Precision="3" />
          <Property Name="IsDocumentTitleEditable" Type="Boolean" Nullable="false" />
          <Property Name="Title" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
        </EntityType>
        <ComplexType Name="SubmitToNextStepOutcome" >
          <Property Type="String" Name="Title" Nullable="false" />
          <Property Type="Boolean" Name="IsSuccessfull" Nullable="false" />
          <Property Type="String" Name="OutcomeDetails" Nullable="false" />
          <Property Type="Boolean" Name="RequiredForSubmitting" Nullable="false" />
        </ComplexType>
        <EntityType Name="WorkflowInstanceTask">
          <Key>
            <PropertyRef Name="WorkflowInstanceTaskID" />
          </Key>
          <Property Name="WorkflowInstanceTaskID" Type="Int64" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
          <Property Name="WorkflowInstanceID" Type="Int64" Nullable="false" />
          <Property Name="WorkflowInstanceTaskStatusID" Type="Int16" Nullable="false" />
          <Property Name="WorkflowTemplateStepID" Type="Int64" Nullable="false" />
          <Property Name="DateCompleted" Type="DateTime" Precision="3" />
          <Property Name="AssignedToID" Type="Int64" Nullable="false" />
          <Property Name="CompletedByID" Type="Int64" />
          <Property Name="Description" Type="String" Nullable="false" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Name="Comments" Type="String" MaxLength="1000" FixedLength="false" Unicode="false" />
          <Property Name="CreatedByID" Type="Int64" Nullable="false" />
          <Property Name="CreatedDate" Type="DateTime" Nullable="false" Precision="3" />
          <Property Name="UpdatedByID" Type="Int64" Nullable="false" />
          <Property Name="UpdatedDate" Type="DateTime" Nullable="false" Precision="3" />
          <Property Name="EscalatedFromID" Type="Int64" />
          <NavigationProperty Name="AssignedTo" Relationship="Model.FK_Users_AssignedTo" FromRole="WorkflowInstanceTask" ToRole="WorkflowUser" />
          <NavigationProperty Name="CompletedBy" Relationship="Model.FK_Users_CompletedBy" FromRole="WorkflowInstanceTask" ToRole="WorkflowUser" />
          <NavigationProperty Name="EscalatedFrom" Relationship="Model.FK_WorkflowInstanceTasks_Users1" FromRole="WorkflowInstanceTask" ToRole="WorkflowUser" />
          <NavigationProperty Name="WorkflowInstance" Relationship="Model.FK_WorkflowInstanceTasks_WorkflowInstances" FromRole="WorkflowInstanceTask" ToRole="WorkflowInstance" >
            <Documentation>
              <LongDescription>[ScriptIgnore]</LongDescription>
            </Documentation>
          </NavigationProperty>
          <NavigationProperty Name="WorkflowInstanceTaskStatus" Relationship="Model.FK_WorkflowInstanceTasks_WorkflowInstanceTaskStatus" FromRole="WorkflowInstanceTask" ToRole="WorkflowInstanceTaskStatus" />
          <NavigationProperty Name="WorkflowTemplateStep" Relationship="Model.FK_WorkflowInstanceTasks_WorkflowTemplateSteps" FromRole="WorkflowInstanceTask" ToRole="WorkflowTemplateStep" >
          </NavigationProperty>
        </EntityType>
        <EntityType Name="Vw_WorkflowInstanceTask">
          <Key>
            <PropertyRef Name="WorkflowInstanceTaskID" />
            <PropertyRef Name="WorkflowInstanceID" />
            <PropertyRef Name="WorkflowInstanceTaskStatusID" />
            <PropertyRef Name="WorkflowTemplateStepID" />
            <PropertyRef Name="DateCreated" />
            <PropertyRef Name="AssignedToID" />
            <PropertyRef Name="TaskStatusDescription" />
            <PropertyRef Name="WorkflowTemplateStepNumber" />
            <PropertyRef Name="WorkflowTemplateStepTitle" />
            <PropertyRef Name="WorkflowTemplateStepDurationOvertime" />
            <PropertyRef Name="WorkflowTemplateStepTypeID" />
            <PropertyRef Name="WorkflowTemplateStepTypeDescription" />
            <PropertyRef Name="WorkflowInstanceEntityID" />
            <PropertyRef Name="WorkflowInstanceItemID" />
            <PropertyRef Name="WorkflowInstanceReference" />
            <PropertyRef Name="WorkflowInstanceCreatedDate" />
            <PropertyRef Name="WorkflowInstanceCreatedByID" />
            <PropertyRef Name="WorkflowID" />
            <PropertyRef Name="WorkflowFriendlyName" />
            <PropertyRef Name="WorkflowControllerName" />
          </Key>
          <Property Name="WorkflowInstanceTaskID" Type="Int64" Nullable="false" />
          <Property Name="WorkflowInstanceID" Type="Int64" Nullable="false" />
          <Property Name="WorkflowInstanceTaskStatusID" Type="Int16" Nullable="false" />
          <Property Name="WorkflowTemplateStepID" Type="Int64" Nullable="false" />
          <Property Name="DateCreated" Type="DateTime" Nullable="false" Precision="3" />
          <Property Name="DateCompleted" Type="DateTime" Precision="3" />
          <Property Name="AssignedToID" Type="Int64" Nullable="false" />
          <Property Name="CompletedByID" Type="Int64" />
          <Property Name="Description" Type="String" MaxLength="512" FixedLength="false" Unicode="false" />
          <Property Name="Comments" Type="String" MaxLength="1000" FixedLength="false" Unicode="false" />
          <Property Name="TaskStatusDescription" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Name="WorkflowTemplateStepNumber" Type="Double" Nullable="false" />
          <Property Name="WorkflowTemplateStepTitle" Type="String" Nullable="false" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Name="WorkflowTemplateStepDurationOvertime" Type="Int32" Nullable="false" />
          <Property Name="WorkflowTemplateStepTypeID" Type="Int16" Nullable="false" />
          <Property Name="WorkflowTemplateStepTypeDescription" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Name="AssignedToName" Type="String" MaxLength="101" FixedLength="false" Unicode="false" />
          <Property Name="CompletedByName" Type="String" MaxLength="101" FixedLength="false" Unicode="false" />
          <Property Name="WorkflowInstanceEntityID" Type="Int32" Nullable="false" />
          <Property Name="WorkflowInstanceItemID" Type="Int64" Nullable="false" />
          <Property Name="WorkflowInstanceReference" Type="String" Nullable="false" MaxLength="12" FixedLength="false" Unicode="false" />
          <Property Name="WorkflowInstanceCreatedDate" Type="DateTime" Nullable="false" Precision="3" />
          <Property Name="WorkflowInstanceCreatedByID" Type="Int64" Nullable="false" />
          <Property Name="WorkflowInstanceCreatedByName" Type="String" MaxLength="101" FixedLength="false" Unicode="false" />
          <Property Name="WorkflowID" Type="Int64" Nullable="false" />
          <Property Name="WorkflowFriendlyName" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Name="WorkflowControllerName" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Name="TaskDuration" Type="String" MaxLength="100" FixedLength="false" Unicode="false" />
          <Property Name="EscalatedFromID" Type="Int64" />
        </EntityType>
        <Association Name="FK_Users_AssignedTo">
          <End Type="Model.WorkflowUser" Role="WorkflowUser" Multiplicity="1" />
          <End Type="Model.WorkflowInstanceTask" Role="WorkflowInstanceTask" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowUser">
              <PropertyRef Name="UserID" />
            </Principal>
            <Dependent Role="WorkflowInstanceTask">
              <PropertyRef Name="AssignedToID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_Users_CompletedBy">
          <End Type="Model.WorkflowUser" Role="WorkflowUser" Multiplicity="0..1" />
          <End Type="Model.WorkflowInstanceTask" Role="WorkflowInstanceTask" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowUser">
              <PropertyRef Name="UserID" />
            </Principal>
            <Dependent Role="WorkflowInstanceTask">
              <PropertyRef Name="CompletedByID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowInstanceTasks_Users1">
          <End Type="Model.WorkflowUser" Role="WorkflowUser" Multiplicity="0..1" />
          <End Type="Model.WorkflowInstanceTask" Role="WorkflowInstanceTask" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowUser">
              <PropertyRef Name="UserID" />
            </Principal>
            <Dependent Role="WorkflowInstanceTask">
              <PropertyRef Name="EscalatedFromID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowInstanceTasks_WorkflowInstances">
          <End Type="Model.WorkflowInstance" Role="WorkflowInstance" Multiplicity="1" />
          <End Type="Model.WorkflowInstanceTask" Role="WorkflowInstanceTask" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowInstance">
              <PropertyRef Name="WorkflowInstanceID" />
            </Principal>
            <Dependent Role="WorkflowInstanceTask">
              <PropertyRef Name="WorkflowInstanceID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowInstanceTasks_WorkflowInstanceTaskStatus">
          <End Type="Model.WorkflowInstanceTaskStatus" Role="WorkflowInstanceTaskStatus" Multiplicity="1" />
          <End Type="Model.WorkflowInstanceTask" Role="WorkflowInstanceTask" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowInstanceTaskStatus">
              <PropertyRef Name="WorkflowInstanceTaskStatusID" />
            </Principal>
            <Dependent Role="WorkflowInstanceTask">
              <PropertyRef Name="WorkflowInstanceTaskStatusID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <Association Name="FK_WorkflowInstanceTasks_WorkflowTemplateSteps">
          <End Type="Model.WorkflowTemplateStep" Role="WorkflowTemplateStep" Multiplicity="1" />
          <End Type="Model.WorkflowInstanceTask" Role="WorkflowInstanceTask" Multiplicity="*" />
          <ReferentialConstraint>
            <Principal Role="WorkflowTemplateStep">
              <PropertyRef Name="WorkflowTemplateStepID" />
            </Principal>
            <Dependent Role="WorkflowInstanceTask">
              <PropertyRef Name="WorkflowTemplateStepID" />
            </Dependent>
          </ReferentialConstraint>
        </Association>
        <EntityType Name="Vw_WorkflowTemplate">
          <Key>
            <PropertyRef Name="WorkflowID" />
            <PropertyRef Name="WorkflowFriendlyName" />
            <PropertyRef Name="WorkflowControllerName" />
            <PropertyRef Name="EntityName" />
            <PropertyRef Name="WorkflowTemplateID" />
            <PropertyRef Name="WorkflowTemplateStatusID" />
            <PropertyRef Name="Version" />
          </Key>
          <Property Name="WorkflowID" Type="Int64" Nullable="false" />
          <Property Name="WorkflowFriendlyName" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Name="WorkflowDescription" Type="String" MaxLength="255" FixedLength="false" Unicode="false" />
          <Property Name="WorkflowControllerName" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Name="EntityName" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" />
          <Property Name="WorkflowTemplateID" Type="Int64" Nullable="false" />
          <Property Name="WorkflowTemplateStatusID" Type="Int16" Nullable="false" />
          <Property Name="Version" Type="Int16" Nullable="false" />
          <Property Name="TotalRequestsInPogress" Type="Int32" />
        </EntityType>
      </Schema>
    </edmx:ConceptualModels>
    <!-- C-S mapping content -->
    <edmx:Mappings>
      <Mapping Space="C-S" xmlns="http://schemas.microsoft.com/ado/2009/11/mapping/cs">
        <EntityContainerMapping StorageEntityContainer="ModelStoreContainer" CdmEntityContainer="WorkflowContext">
          <EntitySetMapping Name="Workflows"><EntityTypeMapping TypeName="Model.Workflow"><MappingFragment StoreEntitySet="Workflows">
                <ScalarProperty Name="ViewerRoles" ColumnName="ViewerRoles" />
                <ScalarProperty Name="HelpUrl" ColumnName="HelpUrl" />
                <ScalarProperty Name="InitiatorRoles" ColumnName="InitiatorRoles" />
                <ScalarProperty Name="AdministratorRoles" ColumnName="AdministratorRoles" />
                <ScalarProperty Name="WorkflowCategoryID" ColumnName="WorkflowCategoryID" />
                <ScalarProperty Name="DashboardControllerName" ColumnName="DashboardControllerName" />
                <ScalarProperty Name="WorkflowDescription" ColumnName="WorkflowDescription" />
                <ScalarProperty Name="WorkflowFriendlyName" ColumnName="WorkflowFriendlyName" />
                <ScalarProperty Name="WorkflowControllerName" ColumnName="WorkflowControllerName" />
                <ScalarProperty Name="EntityID" ColumnName="EntityID" />
                <ScalarProperty Name="WorkflowID" ColumnName="WorkflowID" />
            <ScalarProperty Name="CreatedByID" ColumnName="CreatedByID" />
            <ScalarProperty Name="CreatedDate" ColumnName="CreatedDate" />
            <ScalarProperty Name="UpdatedByID" ColumnName="UpdatedByID" />
            <ScalarProperty Name="UpdatedDate" ColumnName="UpdatedDate" />
          </MappingFragment></EntityTypeMapping></EntitySetMapping>
          <EntitySetMapping Name="WorkflowTemplateDefaults"><EntityTypeMapping TypeName="Model.WorkflowTemplateDefault"><MappingFragment StoreEntitySet="WorkflowTemplateDefaults">
            <ScalarProperty Name="WorkflowTemplateDefaultID" ColumnName="WorkflowTemplateDefaultID" />
            <ScalarProperty Name="WorkflowTemplateID" ColumnName="WorkflowTemplateID" />
            <ScalarProperty Name="Description" ColumnName="Description" />
            <ScalarProperty Name="Value" ColumnName="Value" />
          </MappingFragment></EntityTypeMapping></EntitySetMapping>
          <EntitySetMapping Name="WorkflowTemplates"><EntityTypeMapping TypeName="Model.WorkflowTemplate"><MappingFragment StoreEntitySet="WorkflowTemplates">
                <ScalarProperty Name="MoveToVerifiedProcedure" ColumnName="MoveToVerifiedProcedure" />
                <ScalarProperty Name="PostSaveProcedure" ColumnName="PostSaveProcedure" />
                <ScalarProperty Name="NextStepCheckProcedure" ColumnName="NextStepCheckProcedure" />
                <ScalarProperty Name="ParticipantUpdateProcedure" ColumnName="ParticipantUpdateProcedure" />
                <ScalarProperty Name="DescriptionTemplate" ColumnName="DescriptionTemplate" />
                <ScalarProperty Name="DocumentStoreLocationID" ColumnName="DocumentStoreLocationID" />
                <ScalarProperty Name="MessageTemplateID_ReAssignedTask" ColumnName="MessageTemplateID_ReAssignedTask" />
                <ScalarProperty Name="MessageTemplateID_CancelledTask" ColumnName="MessageTemplateID_CancelledTask" />
                <ScalarProperty Name="MessageTemplateID_NewTask" ColumnName="MessageTemplateID_NewTask" />
                <ScalarProperty Name="CustomWorkflowTaskEmailScriptID" ColumnName="CustomWorkflowTaskEmailScriptID" />
                <ScalarProperty Name="CustomWorkflowTaskEmailRequired" ColumnName="CustomWorkflowTaskEmailRequired" />
                <ScalarProperty Name="RouteLayout" ColumnName="RouteLayout" />
                <ScalarProperty Name="WorkflowTemplateID" ColumnName="WorkflowTemplateID" />
            <ScalarProperty Name="WorkflowID" ColumnName="WorkflowID" />
            <ScalarProperty Name="WorkflowTemplateStatusID" ColumnName="WorkflowTemplateStatusID" />
            <ScalarProperty Name="Version" ColumnName="Version" />
            <ScalarProperty Name="CreatedByID" ColumnName="CreatedByID" />
            <ScalarProperty Name="CreatedDate" ColumnName="CreatedDate" />
            <ScalarProperty Name="UpdatedByID" ColumnName="UpdatedByID" />
            <ScalarProperty Name="UpdatedDate" ColumnName="UpdatedDate" />
          </MappingFragment></EntityTypeMapping></EntitySetMapping>
          <EntitySetMapping Name="WorkflowTemplateStatuses"><EntityTypeMapping TypeName="Model.WorkflowTemplateStatus"><MappingFragment StoreEntitySet="WorkflowTemplateStatus">
            <ScalarProperty Name="WorkflowTemplateStatusID" ColumnName="WorkflowTemplateStatusID" />
            <ScalarProperty Name="Description" ColumnName="Description" />
            <ScalarProperty Name="IsCancelled" ColumnName="IsCancelled" />
          </MappingFragment></EntityTypeMapping></EntitySetMapping>
          <EntitySetMapping Name="WorkflowTemplateStatusHistories"><EntityTypeMapping TypeName="Model.WorkflowTemplateStatusHistory"><MappingFragment StoreEntitySet="WorkflowTemplateStatusHistory">
            <ScalarProperty Name="WorkflowTemplateStatusHistoryID" ColumnName="WorkflowTemplateStatusHistoryID" />
            <ScalarProperty Name="WorkflowTemplateID" ColumnName="WorkflowTemplateID" />
            <ScalarProperty Name="WorkflowTemplateStatusID" ColumnName="WorkflowTemplateStatusID" />
            <ScalarProperty Name="UserID" ColumnName="UserID" />
            <ScalarProperty Name="Date" ColumnName="Date" />
          </MappingFragment></EntityTypeMapping></EntitySetMapping>
          <EntitySetMapping Name="WorkflowTemplateSteps"><EntityTypeMapping TypeName="Model.WorkflowTemplateStep"><MappingFragment StoreEntitySet="WorkflowTemplateSteps">
            <ScalarProperty Name="CanAutoExpire" ColumnName="CanAutoExpire" />
                <ScalarProperty Name="IsRequiredXml" ColumnName="IsRequiredXml" />
                <ScalarProperty Name="StepReassignRoles" ColumnName="StepReassignRoles" />
                <ScalarProperty Name="StepApplicationRoles" ColumnName="StepApplicationRoles" />
                <ScalarProperty Name="StepNextPossibles" ColumnName="StepNextPossibles" />
                <ScalarProperty Name="IsEmailRequired" ColumnName="IsEmailRequired" />
                <ScalarProperty Name="IsRequiredScript" ColumnName="IsRequiredScript" />
                <ScalarProperty Name="WorkflowTaskHandlerID" ColumnName="WorkflowTaskHandlerID" />
                <ScalarProperty Name="WorkflowTemplateStepID" ColumnName="WorkflowTemplateStepID" />
            <ScalarProperty Name="WorkflowTemplateID" ColumnName="WorkflowTemplateID" />
            <ScalarProperty Name="WorkflowTemplateStepTypeID" ColumnName="WorkflowTemplateStepTypeID" />
            <ScalarProperty Name="Branch" ColumnName="Branch" />
            <ScalarProperty Name="Step" ColumnName="Step" />
            <ScalarProperty Name="StepParent" ColumnName="StepParent" />
            <ScalarProperty Name="StepNext" ColumnName="StepNext" />
            <ScalarProperty Name="StepTitle" ColumnName="StepTitle" />
            <ScalarProperty Name="StepDescription" ColumnName="StepDescription" />
            <ScalarProperty Name="StepDurationWarning" ColumnName="StepDurationWarning" />
            <ScalarProperty Name="StepDurationOvertime" ColumnName="StepDurationOvertime" />
            <ScalarProperty Name="IsDefaultStep" ColumnName="IsDefaultStep" />
          </MappingFragment></EntityTypeMapping></EntitySetMapping>
          <EntitySetMapping Name="WorkflowTemplateStepTypes"><EntityTypeMapping TypeName="Model.WorkflowTemplateStepType"><MappingFragment StoreEntitySet="WorkflowTemplateStepTypes">
            <ScalarProperty Name="WorkflowTemplateStepTypeID" ColumnName="WorkflowTemplateStepTypeID" />
            <ScalarProperty Name="Description" ColumnName="Description" />
            <ScalarProperty Name="IsCancelled" ColumnName="IsCancelled" />
          </MappingFragment></EntityTypeMapping></EntitySetMapping>
          <EntitySetMapping Name="WorkflowInstances">
            <EntityTypeMapping TypeName="Model.WorkflowInstance">
              <MappingFragment StoreEntitySet="WorkflowInstances">
                <ScalarProperty Name="OfficeLocationID" ColumnName="OfficeLocationID" />
                <ScalarProperty Name="Description" ColumnName="Description" />
                <ScalarProperty Name="WorkflowInstanceAge" ColumnName="WorkflowInstanceAge" />
                <ScalarProperty Name="RequiredSteps" ColumnName="RequiredSteps" />
                <ScalarProperty Name="DueDate" ColumnName="DueDate" />
                <ScalarProperty Name="WorkflowInstanceStateID" ColumnName="WorkflowInstanceStateID" />
                <ScalarProperty Name="WarningDate" ColumnName="WarningDate" />
                <ScalarProperty Name="ReferenceNumber" ColumnName="ReferenceNumber" />
                <ScalarProperty Name="UpdatedDate" ColumnName="UpdatedDate" />
                <ScalarProperty Name="UpdatedByID" ColumnName="UpdatedByID" />
                <ScalarProperty Name="CreatedDate" ColumnName="CreatedDate" />
                <ScalarProperty Name="CreatedByID" ColumnName="CreatedByID" />
                <ScalarProperty Name="EndDate" ColumnName="EndDate" />
                <ScalarProperty Name="StartDate" ColumnName="StartDate" />
                <ScalarProperty Name="ItemID" ColumnName="ItemID" />
                <ScalarProperty Name="EntityID" ColumnName="EntityID" />
                <ScalarProperty Name="WorkflowTemplateStepID" ColumnName="WorkflowTemplateStepID" />
                <ScalarProperty Name="WorkflowTemplateID" ColumnName="WorkflowTemplateID" />
                <ScalarProperty Name="WorkflowInstanceStatusID" ColumnName="WorkflowInstanceStatusID" />
                <ScalarProperty Name="WorkflowInstanceID" ColumnName="WorkflowInstanceID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="WorkflowInstanceStatuses">
            <EntityTypeMapping TypeName="Model.WorkflowInstanceStatus">
              <MappingFragment StoreEntitySet="WorkflowInstanceStatus">
                <ScalarProperty Name="Description" ColumnName="Description" />
                <ScalarProperty Name="WorkflowInstanceStatusID" ColumnName="WorkflowInstanceStatusID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="WorkflowInstanceStatusHistories">
            <EntityTypeMapping TypeName="Model.WorkflowInstanceStatusHistory">
              <MappingFragment StoreEntitySet="WorkflowInstanceStatusHistory">
                <ScalarProperty Name="Date" ColumnName="Date" />
                <ScalarProperty Name="UserID" ColumnName="UserID" />
                <ScalarProperty Name="WorkflowInstanceStatusID" ColumnName="WorkflowInstanceStatusID" />
                <ScalarProperty Name="WorkflowInstanceID" ColumnName="WorkflowInstanceID" />
                <ScalarProperty Name="WorkflowInstanceStatusHistoryID" ColumnName="WorkflowInstanceStatusHistoryID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="WorkflowInstanceStepHistories">
            <EntityTypeMapping TypeName="Model.WorkflowInstanceStepHistory">
              <MappingFragment StoreEntitySet="WorkflowInstanceStepHistory">
                <ScalarProperty Name="Date" ColumnName="Date" />
                <ScalarProperty Name="UserID" ColumnName="UserID" />
                <ScalarProperty Name="WorkflowTemplateStepID" ColumnName="WorkflowTemplateStepID" />
                <ScalarProperty Name="WorkflowInstanceID" ColumnName="WorkflowInstanceID" />
                <ScalarProperty Name="WorkflowInstanceStepHistoryID" ColumnName="WorkflowInstanceStepHistoryID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="WorkflowInstanceTaskStatuses">
            <EntityTypeMapping TypeName="Model.WorkflowInstanceTaskStatus">
              <MappingFragment StoreEntitySet="WorkflowInstanceTaskStatus">
                <ScalarProperty Name="IsCancelled" ColumnName="IsCancelled" />
                <ScalarProperty Name="Description" ColumnName="Description" />
                <ScalarProperty Name="WorkflowInstanceTaskStatusID" ColumnName="WorkflowInstanceTaskStatusID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="WorkflowInstanceTaskStatusHistories">
            <EntityTypeMapping TypeName="Model.WorkflowInstanceTaskStatusHistory">
              <MappingFragment StoreEntitySet="WorkflowInstanceTaskStatusHistory">
                <ScalarProperty Name="Date" ColumnName="Date" />
                <ScalarProperty Name="UserID" ColumnName="UserID" />
                <ScalarProperty Name="WorkflowInstanceTaskStatusID" ColumnName="WorkflowInstanceTaskStatusID" />
                <ScalarProperty Name="WorkflowInstanceTaskID" ColumnName="WorkflowInstanceTaskID" />
                <ScalarProperty Name="WorkflowInstanceTaskStatusHistoryID" ColumnName="WorkflowInstanceTaskStatusHistoryID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="WorkflowTemplateTriggerTypes">
            <EntityTypeMapping TypeName="Model.WorkflowTemplateTriggerType">
              <MappingFragment StoreEntitySet="WorkflowTemplateTriggerTypes">
                <ScalarProperty Name="IsCancelled" ColumnName="IsCancelled" />
                <ScalarProperty Name="Description" ColumnName="Description" />
                <ScalarProperty Name="WorkflowTemplateTriggerTypeID" ColumnName="WorkflowTemplateTriggerTypeID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="WorkflowTemplateTriggerActions">
            <EntityTypeMapping TypeName="Model.WorkflowTemplateTriggerAction">
              <MappingFragment StoreEntitySet="WorkflowTemplateTriggerActions">
                <ScalarProperty Name="IsCancelled" ColumnName="IsCancelled" />
                <ScalarProperty Name="Description" ColumnName="Description" />
                <ScalarProperty Name="WorkflowTemplateTriggerActionID" ColumnName="WorkflowTemplateTriggerActionID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="WorkflowTemplateTriggers">
            <EntityTypeMapping TypeName="Model.WorkflowTemplateTrigger">
              <MappingFragment StoreEntitySet="WorkflowTemplateTriggers">
                <ScalarProperty Name="IsRequiredStatusIds" ColumnName="IsRequiredStatusIds" />
                <ScalarProperty Name="IsRequiredScript" ColumnName="IsRequiredScript" />
                <ScalarProperty Name="IsRequiredXml" ColumnName="IsRequiredXml" />
                <ScalarProperty Name="WorkflowTemplateScriptID" ColumnName="WorkflowTemplateScriptID" />
                <ScalarProperty Name="WorkflowTemplateStepID" ColumnName="WorkflowTemplateStepID" />
                <ScalarProperty Name="MessageTemplateID" ColumnName="MessageTemplateID" />
                <ScalarProperty Name="Title" ColumnName="Title" />
                <ScalarProperty Name="WorkflowTemplateTriggerActionID" ColumnName="WorkflowTemplateTriggerActionID" />
                <ScalarProperty Name="WorkflowTemplateTriggerTypeID" ColumnName="WorkflowTemplateTriggerTypeID" />
                <ScalarProperty Name="WorkflowTemplateID" ColumnName="WorkflowTemplateID" />
                <ScalarProperty Name="WorkflowTemplateTriggerID" ColumnName="WorkflowTemplateTriggerID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="WorkflowInstanceParticipants">
            <EntityTypeMapping TypeName="Model.WorkflowInstanceParticipant">
              <MappingFragment StoreEntitySet="WorkflowInstanceParticipants">
                <ScalarProperty Name="WorkflowInstanceID" ColumnName="WorkflowInstanceID" />
                <ScalarProperty Name="UserID" ColumnName="UserID" />
                <ScalarProperty Name="WorkflowTemplateParticipantID" ColumnName="WorkflowTemplateParticipantID" />
                <ScalarProperty Name="WorkflowInstanceParticipantID" ColumnName="WorkflowInstanceParticipantID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="WorkflowTemplateParticipantRoles">
            <EntityTypeMapping TypeName="Model.WorkflowTemplateParticipantRole">
              <MappingFragment StoreEntitySet="WorkflowTemplateParticipantRoles">
                <ScalarProperty Name="RoleID" ColumnName="RoleID" />
                <ScalarProperty Name="WorkflowTemplateParticipantID" ColumnName="WorkflowTemplateParticipantID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="WorkflowTemplateParticipants">
            <EntityTypeMapping TypeName="Model.WorkflowTemplateParticipant">
              <MappingFragment StoreEntitySet="WorkflowTemplateParticipants">
                <ScalarProperty Name="DocumentPermissionLevel" ColumnName="DocumentPermissionLevel" />
                <ScalarProperty Name="IsVisible" ColumnName="IsVisible" />
                <ScalarProperty Name="DefaultUserID" ColumnName="DefaultUserID" />
                <ScalarProperty Name="OrderBy" ColumnName="OrderBy" />
                <ScalarProperty Name="DisplayName" ColumnName="DisplayName" />
                <ScalarProperty Name="FieldName" ColumnName="FieldName" />
                <ScalarProperty Name="WorkflowTemplateID" ColumnName="WorkflowTemplateID" />
                <ScalarProperty Name="WorkflowTemplateParticipantID" ColumnName="WorkflowTemplateParticipantID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="WorkflowTemplateStepAssignees">
            <EntityTypeMapping TypeName="Model.WorkflowTemplateStepAssignee">
              <MappingFragment StoreEntitySet="WorkflowTemplateStepAssignees">
                <ScalarProperty Name="IsMandatory" ColumnName="IsMandatory" />
                <ScalarProperty Name="WorkflowTemplateParticipantID" ColumnName="WorkflowTemplateParticipantID" />
                <ScalarProperty Name="WorkflowTemplateStepID" ColumnName="WorkflowTemplateStepID" />
                <ScalarProperty Name="WorkflowTemplateStepAssigneeID" ColumnName="WorkflowTemplateStepAssigneeID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="WorkflowUsers">
            <EntityTypeMapping TypeName="Model.WorkflowUser">
              <MappingFragment StoreEntitySet="Users">
                <ScalarProperty Name="OfficeLocationID" ColumnName="OfficeLocationID" />
                <ScalarProperty Name="UserProfileDocID" ColumnName="UserProfileDocID" />
                <ScalarProperty Name="FingerprintRequestExpiryDate" ColumnName="FingerprintRequestExpiryDate" />
                <ScalarProperty Name="FingerprintRequestToken" ColumnName="FingerprintRequestToken" />
                <ScalarProperty Name="FingerprintTemplate" ColumnName="FingerprintTemplate" />
                <ScalarProperty Name="Cell" ColumnName="Cell" />
                <ScalarProperty Name="ItemID" ColumnName="ItemID" />
                <ScalarProperty Name="EntityID" ColumnName="EntityID" />
                <ScalarProperty Name="UpdatedDate" ColumnName="UpdatedDate" />
                <ScalarProperty Name="UpdatedByID" ColumnName="UpdatedByID" />
                <ScalarProperty Name="CreatedDate" ColumnName="CreatedDate" />
                <ScalarProperty Name="CreatedByID" ColumnName="CreatedByID" />
                <ScalarProperty Name="PasswordAnswerChallenge" ColumnName="PasswordAnswerChallenge" />
                <ScalarProperty Name="PasswordAnswerSalt" ColumnName="PasswordAnswerSalt" />
                <ScalarProperty Name="PasswordAnswerHash" ColumnName="PasswordAnswerHash" />
                <ScalarProperty Name="PasswordQuestion" ColumnName="PasswordQuestion" />
                <ScalarProperty Name="PasswordChallenge" ColumnName="PasswordChallenge" />
                <ScalarProperty Name="PasswordSalt" ColumnName="PasswordSalt" />
                <ScalarProperty Name="PasswordHash" ColumnName="PasswordHash" />
                <ScalarProperty Name="PasswordDate" ColumnName="PasswordDate" />
                <ScalarProperty Name="IsPasswordExpired" ColumnName="IsPasswordExpired" />
                <ScalarProperty Name="NTAccount" ColumnName="NTAccount" />
                <ScalarProperty Name="Email" ColumnName="Email" />
                <ScalarProperty Name="KnownAs" ColumnName="KnownAs" />
                <ScalarProperty Name="FullName" ColumnName="FullName" />
                <ScalarProperty Name="FirstName" ColumnName="FirstName" />
                <ScalarProperty Name="LastName" ColumnName="LastName" />
                <ScalarProperty Name="UserStatusID" ColumnName="UserStatusID" />
                <ScalarProperty Name="UserID" ColumnName="UserID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Vw_WorkflowInstances">
            <EntityTypeMapping TypeName="Model.Vw_WorkflowInstance">
              <MappingFragment StoreEntitySet="Vw_WorkflowInstances">
                <ScalarProperty Name="StepTitle" ColumnName="StepTitle" />
                <ScalarProperty Name="StepNumber" ColumnName="StepNumber" />
                <ScalarProperty Name="DashboardControllerName" ColumnName="DashboardControllerName" />
                <ScalarProperty Name="WorkflowInstanceDescription" ColumnName="WorkflowInstanceDescription" />
                <ScalarProperty Name="ASsignedTo" ColumnName="ASsignedTo" />
                <ScalarProperty Name="WorkflowInstanceAge" ColumnName="WorkflowInstanceAge" />
                <ScalarProperty Name="WorkflowInstanceStatus" ColumnName="WorkflowInstanceStatus" />
                <ScalarProperty Name="WorkflowEndDate" ColumnName="WorkflowEndDate" />
                <ScalarProperty Name="WorkflowStartDate" ColumnName="WorkflowStartDate" />
                <ScalarProperty Name="WorkflowInstanceStateID" ColumnName="WorkflowInstanceStateID" />
                <ScalarProperty Name="WorkflowInstanceState" ColumnName="WorkflowInstanceState" />
                <ScalarProperty Name="CreatedByName" ColumnName="CreatedByName" />
                <ScalarProperty Name="DueDate" ColumnName="DueDate" />
                <ScalarProperty Name="UpdatedDate" ColumnName="UpdatedDate" />
                <ScalarProperty Name="UpdatedByID" ColumnName="UpdatedByID" />
                <ScalarProperty Name="WorkflowFriendlyName" ColumnName="WorkflowFriendlyName" />
                <ScalarProperty Name="WarningDate" ColumnName="WarningDate" />
                <ScalarProperty Name="Reference" ColumnName="Reference" />
                <ScalarProperty Name="WorkflowControllerName" ColumnName="WorkflowControllerName" />
                <ScalarProperty Name="WorkflowID" ColumnName="WorkflowID" />
                <ScalarProperty Name="Description" ColumnName="Description" />
                <ScalarProperty Name="ReferenceNumber" ColumnName="ReferenceNumber" />
                <ScalarProperty Name="ItemID" ColumnName="ItemID" />
                <ScalarProperty Name="EntityID" ColumnName="EntityID" />
                <ScalarProperty Name="WorkflowTemplateStepID" ColumnName="WorkflowTemplateStepID" />
                <ScalarProperty Name="WorkflowTemplateID" ColumnName="WorkflowTemplateID" />
                <ScalarProperty Name="WorkflowInstanceStatusID" ColumnName="WorkflowInstanceStatusID" />
                <ScalarProperty Name="CreatedDate" ColumnName="CreatedDate" />
                <ScalarProperty Name="CreatedByID" ColumnName="CreatedByID" />
                <ScalarProperty Name="WorkflowInstanceID" ColumnName="WorkflowInstanceID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="WorkflowEntities">
            <EntityTypeMapping TypeName="Model.WorkflowEntity">
              <MappingFragment StoreEntitySet="Entities">
                <ScalarProperty Name="EmailFieldKey" ColumnName="EmailFieldKey" />
                <ScalarProperty Name="SMSFieldKey" ColumnName="SMSFieldKey" />
                <ScalarProperty Name="EntityDataTableName" ColumnName="EntityDataTableName" />
                <ScalarProperty Name="FolderPrefix" ColumnName="FolderPrefix" />
                <ScalarProperty Name="IsCancelled" ColumnName="IsCancelled" />
                <ScalarProperty Name="EntityViewName" ColumnName="EntityViewName" />
                <ScalarProperty Name="EntityKey" ColumnName="EntityKey" />
                <ScalarProperty Name="EntityTableName" ColumnName="EntityTableName" />
                <ScalarProperty Name="EntityName" ColumnName="EntityName" />
                <ScalarProperty Name="EntityID" ColumnName="EntityID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <FunctionImportMapping FunctionImportName="Pr_WorkflowInstanceTaskCanAction" FunctionName="Model.Store.Pr_WorkflowInstanceTaskCanAction" />
          <FunctionImportMapping FunctionImportName="Pr_WorkflowInstanceTaskEscalation" FunctionName="Model.Store.Pr_WorkflowInstanceTaskEscalation" />
          <FunctionImportMapping FunctionImportName="Pr_WorkflowInstanceTaskStepsGetForCorrection" FunctionName="Model.Store.Pr_WorkflowInstanceTaskStepsGetForCorrection">
            <ResultMapping>
              <ComplexTypeMapping TypeName="Model.Pr_WorkflowInstanceTaskStepsGetForCorrection_Result">
                <ScalarProperty Name="WorkflowTemplateID" ColumnName="WorkflowTemplateID" />
                <ScalarProperty Name="WorkflowInstanceTaskID" ColumnName="WorkflowInstanceTaskID" />
                <ScalarProperty Name="WorkflowTemplateStepID" ColumnName="WorkflowTemplateStepID" />
                <ScalarProperty Name="Step" ColumnName="Step" />
                <ScalarProperty Name="StepDescription" ColumnName="StepDescription" />
                <ScalarProperty Name="CompletedBy" ColumnName="CompletedBy" />
                <ScalarProperty Name="CompletedTaskDescription" ColumnName="CompletedTaskDescription" />
              </ComplexTypeMapping>
            </ResultMapping>
          </FunctionImportMapping>
          <FunctionImportMapping FunctionImportName="Pr_WorkflowInstanceTaskEscalationUsersGet" FunctionName="Model.Store.Pr_WorkflowInstanceTaskEscalationUsersGet">
            <ResultMapping>
              <ComplexTypeMapping TypeName="Model.Pr_WorkflowInstanceTaskEscalationUsersGet_Result">
                <ScalarProperty Name="UserID" ColumnName="UserID" />
                <ScalarProperty Name="KnownAs" ColumnName="KnownAs" />
                <ScalarProperty Name="RoleName" ColumnName="RoleName" />
                <ScalarProperty Name="Settings" ColumnName="Settings" />
              </ComplexTypeMapping>
            </ResultMapping>
          </FunctionImportMapping>
          <EntitySetMapping Name="WorkflowBuddies">
            <EntityTypeMapping TypeName="Model.WorkflowBuddy">
              <MappingFragment StoreEntitySet="WorkflowBuddies">
                <ScalarProperty Name="BuddyUserID" ColumnName="BuddyUserID" />
                <ScalarProperty Name="UserID" ColumnName="UserID" />
                <ScalarProperty Name="WorkflowID" ColumnName="WorkflowID" />
                <ScalarProperty Name="WorkflowBuddyID" ColumnName="WorkflowBuddyID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <FunctionImportMapping FunctionImportName="Pr_WorkflowInstanceTaskReAssignGroupTask" FunctionName="Model.Store.Pr_WorkflowInstanceTaskReAssignGroupTask" />
          <FunctionImportMapping FunctionImportName="Pr_WorkflowInstanceDocumentIdUpdate" FunctionName="Model.Store.Pr_WorkflowInstanceDocumentIdUpdate" />
          <FunctionImportMapping FunctionImportName="Pr_WorkflowInstanceDocumentsGet" FunctionName="Model.Store.Pr_WorkflowInstanceDocumentsGet">
          </FunctionImportMapping>
          <FunctionImportMapping FunctionImportName="Pr_WorkflowInstanceDocumentsUpdate" FunctionName="Model.Store.Pr_WorkflowInstanceDocumentsUpdate" />
          <FunctionImportMapping FunctionImportName="Pr_WorkflowInstancePostFormSave" FunctionName="Model.Store.Pr_WorkflowInstancePostFormSave" />
          <EntitySetMapping Name="WorkflowInstanceDocuments">
            <EntityTypeMapping TypeName="Model.WorkflowInstanceDocument">
              <MappingFragment StoreEntitySet="WorkflowInstanceDocuments">
                <ScalarProperty Name="Title" ColumnName="Title" />
                <ScalarProperty Name="ExpiryDate" ColumnName="ExpiryDate" />
                <ScalarProperty Name="IsExpiryDateRequired" ColumnName="IsExpiryDateRequired" />
                <ScalarProperty Name="IsCancelled" ColumnName="IsCancelled" />
                <ScalarProperty Name="IsMandatory" ColumnName="IsMandatory" />
                <ScalarProperty Name="DocumentID" ColumnName="DocumentID" />
                <ScalarProperty Name="DocumentTypeID" ColumnName="DocumentTypeID" />
                <ScalarProperty Name="WorkflowInstanceID" ColumnName="WorkflowInstanceID" />
                <ScalarProperty Name="WorkflowInstanceDocumentID" ColumnName="WorkflowInstanceDocumentID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="WorkflowTemplateDocuments">
            <EntityTypeMapping TypeName="Model.WorkflowTemplateDocument">
              <MappingFragment StoreEntitySet="WorkflowTemplateDocuments">
                <ScalarProperty Name="IsCancelled" ColumnName="IsCancelled" />
                <ScalarProperty Name="OrderBy" ColumnName="OrderBy" />
                <ScalarProperty Name="IsAvailableForUploadSql" ColumnName="IsAvailableForUploadSql" />
                <ScalarProperty Name="IsRequiredSql" ColumnName="IsRequiredSql" />
                <ScalarProperty Name="DocumentTypeID" ColumnName="DocumentTypeID" />
                <ScalarProperty Name="WorkflowTemplateID" ColumnName="WorkflowTemplateID" />
                <ScalarProperty Name="WorkflowTemplateDocumentID" ColumnName="WorkflowTemplateDocumentID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Vw_WorkflowInstanceDocuments">
            <EntityTypeMapping TypeName="Model.Vw_WorkflowInstanceDocument">
              <MappingFragment StoreEntitySet="Vw_WorkflowInstanceDocuments">
                <ScalarProperty Name="Title" ColumnName="Title" />
                <ScalarProperty Name="IsDocumentTitleEditable" ColumnName="IsDocumentTitleEditable" />
                <ScalarProperty Name="ExpiryDate" ColumnName="ExpiryDate" />
                <ScalarProperty Name="IsExpiryDateRequired" ColumnName="IsExpiryDateRequired" />
                <ScalarProperty Name="DocumentVerificationStatusID" ColumnName="DocumentVerificationStatusID" />
                <ScalarProperty Name="DocumentDescription" ColumnName="DocumentDescription" />
                <ScalarProperty Name="IsCancelled" ColumnName="IsCancelled" />
                <ScalarProperty Name="IsMandatory" ColumnName="IsMandatory" />
                <ScalarProperty Name="DocumentID" ColumnName="DocumentID" />
                <ScalarProperty Name="DocumentTypeID" ColumnName="DocumentTypeID" />
                <ScalarProperty Name="WorkflowInstanceID" ColumnName="WorkflowInstanceID" />
                <ScalarProperty Name="WorkflowInstanceDocumentID" ColumnName="WorkflowInstanceDocumentID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <FunctionImportMapping FunctionImportName="Pr_WorkflowInstanceSubmitToNextStepChecks" FunctionName="Model.Store.Pr_WorkflowInstanceSubmitToNextStepChecks" >
            <ResultMapping>
              <ComplexTypeMapping TypeName="Model.SubmitToNextStepOutcome">
                <ScalarProperty Name="Title" ColumnName="Title" />
                <ScalarProperty Name="IsSuccessfull" ColumnName="IsSuccessfull" />
                <ScalarProperty Name="OutcomeDetails" ColumnName="OutcomeDetails" />
                <ScalarProperty Name="RequiredForSubmitting" ColumnName="RequiredForSubmitting" />
              </ComplexTypeMapping>
            </ResultMapping>
          </FunctionImportMapping>
          <FunctionImportMapping FunctionImportName="Pr_WorkflowInstanceDocumentExpiryDateUpdate" FunctionName="Model.Store.Pr_WorkflowInstanceDocumentExpiryDateUpdate" />
          <FunctionImportMapping FunctionImportName="Pr_WorkflowInstanceDocumentTitleUpdate" FunctionName="Model.Store.Pr_WorkflowInstanceDocumentTitleUpdate" />
          <EntitySetMapping Name="WorkflowInstanceTasks">
            <EntityTypeMapping TypeName="Model.WorkflowInstanceTask">
              <MappingFragment StoreEntitySet="WorkflowInstanceTasks">
                <ScalarProperty Name="EscalatedFromID" ColumnName="EscalatedFromID" />
                <ScalarProperty Name="UpdatedDate" ColumnName="UpdatedDate" />
                <ScalarProperty Name="UpdatedByID" ColumnName="UpdatedByID" />
                <ScalarProperty Name="CreatedDate" ColumnName="CreatedDate" />
                <ScalarProperty Name="CreatedByID" ColumnName="CreatedByID" />
                <ScalarProperty Name="Comments" ColumnName="Comments" />
                <ScalarProperty Name="Description" ColumnName="Description" />
                <ScalarProperty Name="CompletedByID" ColumnName="CompletedByID" />
                <ScalarProperty Name="AssignedToID" ColumnName="AssignedToID" />
                <ScalarProperty Name="DateCompleted" ColumnName="DateCompleted" />
                <ScalarProperty Name="WorkflowTemplateStepID" ColumnName="WorkflowTemplateStepID" />
                <ScalarProperty Name="WorkflowInstanceTaskStatusID" ColumnName="WorkflowInstanceTaskStatusID" />
                <ScalarProperty Name="WorkflowInstanceID" ColumnName="WorkflowInstanceID" />
                <ScalarProperty Name="WorkflowInstanceTaskID" ColumnName="WorkflowInstanceTaskID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Vw_WorkflowInstanceTasks">
            <EntityTypeMapping TypeName="Model.Vw_WorkflowInstanceTask">
              <MappingFragment StoreEntitySet="Vw_WorkflowInstanceTasks">
                <ScalarProperty Name="EscalatedFromID" ColumnName="EscalatedFromID" />
                <ScalarProperty Name="TaskDuration" ColumnName="TaskDuration" />
                <ScalarProperty Name="WorkflowControllerName" ColumnName="WorkflowControllerName" />
                <ScalarProperty Name="WorkflowFriendlyName" ColumnName="WorkflowFriendlyName" />
                <ScalarProperty Name="WorkflowID" ColumnName="WorkflowID" />
                <ScalarProperty Name="WorkflowInstanceCreatedByName" ColumnName="WorkflowInstanceCreatedByName" />
                <ScalarProperty Name="WorkflowInstanceCreatedByID" ColumnName="WorkflowInstanceCreatedByID" />
                <ScalarProperty Name="WorkflowInstanceCreatedDate" ColumnName="WorkflowInstanceCreatedDate" />
                <ScalarProperty Name="WorkflowInstanceReference" ColumnName="WorkflowInstanceReference" />
                <ScalarProperty Name="WorkflowInstanceItemID" ColumnName="WorkflowInstanceItemID" />
                <ScalarProperty Name="WorkflowInstanceEntityID" ColumnName="WorkflowInstanceEntityID" />
                <ScalarProperty Name="CompletedByName" ColumnName="CompletedByName" />
                <ScalarProperty Name="AssignedToName" ColumnName="AssignedToName" />
                <ScalarProperty Name="WorkflowTemplateStepTypeDescription" ColumnName="WorkflowTemplateStepTypeDescription" />
                <ScalarProperty Name="WorkflowTemplateStepTypeID" ColumnName="WorkflowTemplateStepTypeID" />
                <ScalarProperty Name="WorkflowTemplateStepDurationOvertime" ColumnName="WorkflowTemplateStepDurationOvertime" />
                <ScalarProperty Name="WorkflowTemplateStepTitle" ColumnName="WorkflowTemplateStepTitle" />
                <ScalarProperty Name="WorkflowTemplateStepNumber" ColumnName="WorkflowTemplateStepNumber" />
                <ScalarProperty Name="TaskStatusDescription" ColumnName="TaskStatusDescription" />
                <ScalarProperty Name="Comments" ColumnName="Comments" />
                <ScalarProperty Name="Description" ColumnName="Description" />
                <ScalarProperty Name="CompletedByID" ColumnName="CompletedByID" />
                <ScalarProperty Name="AssignedToID" ColumnName="AssignedToID" />
                <ScalarProperty Name="DateCompleted" ColumnName="DateCompleted" />
                <ScalarProperty Name="DateCreated" ColumnName="DateCreated" />
                <ScalarProperty Name="WorkflowTemplateStepID" ColumnName="WorkflowTemplateStepID" />
                <ScalarProperty Name="WorkflowInstanceTaskStatusID" ColumnName="WorkflowInstanceTaskStatusID" />
                <ScalarProperty Name="WorkflowInstanceID" ColumnName="WorkflowInstanceID" />
                <ScalarProperty Name="WorkflowInstanceTaskID" ColumnName="WorkflowInstanceTaskID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <EntitySetMapping Name="Vw_WorkflowTemplates">
            <EntityTypeMapping TypeName="Model.Vw_WorkflowTemplate">
              <MappingFragment StoreEntitySet="Vw_WorkflowTemplates">
                <ScalarProperty Name="TotalRequestsInPogress" ColumnName="TotalRequestsInPogress" />
                <ScalarProperty Name="Version" ColumnName="Version" />
                <ScalarProperty Name="WorkflowTemplateStatusID" ColumnName="WorkflowTemplateStatusID" />
                <ScalarProperty Name="WorkflowTemplateID" ColumnName="WorkflowTemplateID" />
                <ScalarProperty Name="EntityName" ColumnName="EntityName" />
                <ScalarProperty Name="WorkflowControllerName" ColumnName="WorkflowControllerName" />
                <ScalarProperty Name="WorkflowDescription" ColumnName="WorkflowDescription" />
                <ScalarProperty Name="WorkflowFriendlyName" ColumnName="WorkflowFriendlyName" />
                <ScalarProperty Name="WorkflowID" ColumnName="WorkflowID" />
              </MappingFragment>
            </EntityTypeMapping>
          </EntitySetMapping>
          <FunctionImportMapping FunctionImportName="Pr_WorkflowInstanceTaskCanAssignToMe" FunctionName="Model.Store.Pr_WorkflowInstanceTaskCanAssignToMe" />
          <FunctionImportMapping FunctionImportName="Pr_WorkflowInstanceRetryFailedTask" FunctionName="Model.Store.Pr_WorkflowInstanceRetryFailedTask" />
          </EntityContainerMapping>
      </Mapping>
    </edmx:Mappings>
  </edmx:Runtime>
  <!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
  <Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
    <Connection>
      <DesignerInfoPropertySet>
        <DesignerProperty Name="MetadataArtifactProcessing" Value="EmbedInOutputAssembly" />
      </DesignerInfoPropertySet>
    </Connection>
    <Options>
      <DesignerInfoPropertySet>
        <DesignerProperty Name="ValidateOnBuild" Value="true" />
        <DesignerProperty Name="EnablePluralization" Value="True" />
        <DesignerProperty Name="IncludeForeignKeysInModel" Value="True" />
        <DesignerProperty Name="CodeGenerationStrategy" Value="None" />
        <DesignerProperty Name="UseLegacyProvider" Value="False" />
      </DesignerInfoPropertySet>
    </Options>
    <!-- Diagram content (shape and connector positions) -->
    <Diagrams>
      <Diagram Name="WorkflowModel" ZoomLevel="75">
        <EntityTypeShape EntityType="Model.Workflow" Width="1.5" PointX="0.75" PointY="0.75" Height="3.7288216145833326" IsExpanded="true" />
        <EntityTypeShape EntityType="Model.WorkflowTemplateDefault" Width="1.5" PointX="6.5" PointY="11" Height="1.7566536458333317" IsExpanded="true" />
        <EntityTypeShape EntityType="Model.WorkflowTemplate" Width="3.375" PointX="3" PointY="4.625" Height="4.3862109375" IsExpanded="true" />
        <EntityTypeShape EntityType="Model.WorkflowTemplateStatus" Width="1.5" PointX="0.75" PointY="5.375" Height="1.7566536458333317" IsExpanded="true" />
        <EntityTypeShape EntityType="Model.WorkflowTemplateStatusHistory" Width="1.5" PointX="5.25" PointY="2.125" Height="2.0853483072916674" IsExpanded="true" />
        <EntityTypeShape EntityType="Model.WorkflowTemplateStep" Width="1.5" PointX="8.25" PointY="4.375" Height="5.0436002604166656" IsExpanded="true" />
        <EntityTypeShape EntityType="Model.WorkflowTemplateStepType" Width="1.5" PointX="6.375" PointY="9.25" Height="1.5923063151041674" IsExpanded="true" />
        <AssociationConnector Association="Model.FK_WorkflowTemplateDefaults_WorkflowTemplates" ManuallyRouted="false">
          <ConnectorPoint PointX="6.375" PointY="6.0796680613370331" />
          <ConnectorPoint PointX="7.0729186666666672" PointY="6.0796680613370322" />
          <ConnectorPoint PointX="7.2395853333333333" PointY="6.0796680613370331" />
          <ConnectorPoint PointX="7.729166666666667" PointY="6.0796680613370322" />
          <ConnectorPoint PointX="7.958333333333333" PointY="6.0796680613370331" />
          <ConnectorPoint PointX="7.96875" PointY="6.0796680613370331" />
          <ConnectorPoint PointX="7.96875" PointY="11" />
        </AssociationConnector>
        <AssociationConnector Association="Model.FK_WorkflowTemplates_WorkflowTemplateStatus" ManuallyRouted="false">
          <ConnectorPoint PointX="2.25" PointY="6.57040804743374" />
          <ConnectorPoint PointX="2.4479191666666664" PointY="6.5704080474337392" />
          <ConnectorPoint PointX="2.6145858333333334" PointY="6.57040804743374" />
          <ConnectorPoint PointX="3" PointY="6.57040804743374" />
        </AssociationConnector>
        <AssociationConnector Association="Model.FK_WorkflowTemplateStatusHistory_WorkflowTemplates" ManuallyRouted="false">
          <ConnectorPoint PointX="5.8125" PointY="4.625" />
          <ConnectorPoint PointX="5.8125" PointY="4.2103483072916674" />
        </AssociationConnector>
        <AssociationConnector Association="Model.FK_WorkflowTemplateSteps_WorkflowTemplates" ManuallyRouted="false">
          <ConnectorPoint PointX="6.375" PointY="7.582726966626252" />
          <ConnectorPoint PointX="7.0729186666666672" PointY="7.5827269666262511" />
          <ConnectorPoint PointX="7.2395853333333333" PointY="7.582726966626252" />
          <ConnectorPoint PointX="7.791666666666667" PointY="7.5827269666262511" />
          <ConnectorPoint PointX="8.0520833333333339" PointY="7.582726966626252" />
          <ConnectorPoint PointX="8.25" PointY="7.582726966626252" />
        </AssociationConnector>
        <AssociationConnector Association="Model.FK_WorkflowTemplateStatusHistory_WorkflowTemplateStatus" ManuallyRouted="false">
          <ConnectorPoint PointX="2.25" PointY="5.375" />
          <ConnectorPoint PointX="2.4723269349011203" PointY="5.1526730650988783" />
          <ConnectorPoint PointX="2.590178065098879" PointY="5.034821934901121" />
          <ConnectorPoint PointX="2.875" PointY="4.75" />
          <ConnectorPoint PointX="2.875" PointY="3.0016649114583336" />
          <ConnectorPoint PointX="4.010416666666667" PointY="3.0016649114583331" />
          <ConnectorPoint PointX="4.177083333333333" PointY="3.0016649114583336" />
          <ConnectorPoint PointX="5.25" PointY="3.0016649114583336" />
        </AssociationConnector>
        <AssociationConnector Association="Model.FK_WorkflowTemplateSteps_WorkflowTemplateStepTypes" ManuallyRouted="false">
          <ConnectorPoint PointX="7.156252" PointY="9.25" />
          <ConnectorPoint PointX="7.156252" PointY="5.2273345306685162" />
          <ConnectorPoint PointX="7.729166666666667" PointY="5.2273345306685153" />
          <ConnectorPoint PointX="7.958333333333333" PointY="5.2273345306685162" />
          <ConnectorPoint PointX="8.25" PointY="5.2273345306685162" />
        </AssociationConnector>
        <EntityTypeShape EntityType="Model.WorkflowInstance" Width="2" PointX="10.5" PointY="4.375" Height="4.7149055989583317" />
        <EntityTypeShape EntityType="Model.WorkflowInstanceStatus" Width="1.5" PointX="8.25" PointY="1.5" Height="1.5923063151041674" />
        <EntityTypeShape EntityType="Model.WorkflowInstanceStatusHistory" Width="1.5" PointX="12.75" PointY="5.25" Height="2.0853483072916674" />
        <EntityTypeShape EntityType="Model.WorkflowInstanceStepHistory" Width="1.5" PointX="12.75" PointY="8.25" Height="1.9210009765625031" />
        <EntityTypeShape EntityType="Model.WorkflowInstanceTaskStatus" Width="1.5" PointX="16.125" PointY="1.75" Height="1.7566536458333331" />
        <EntityTypeShape EntityType="Model.WorkflowInstanceTaskStatusHistory" Width="1.5" PointX="18" PointY="5.25" Height="2.0853483072916674" />
        <EntityTypeShape EntityType="Model.WorkflowTemplateTriggerType" Width="1.5" PointX="10.375" PointY="0.75" Height="1.4279589843750031" />
        <AssociationConnector Association="Model.FK_WorkflowInstances_WorkflowInstanceStatus" >
          <ConnectorPoint PointX="9.75" PointY="2.9442350260416665" />
          <ConnectorPoint PointX="11.96875" PointY="2.9442350260416665" />
          <ConnectorPoint PointX="11.96875" PointY="4.375" />
        </AssociationConnector>
        <AssociationConnector Association="Model.FK_WorkflowInstances_WorkflowTemplates" >
          <ConnectorPoint PointX="6.375" PointY="8.4163659833131277" />
          <ConnectorPoint PointX="7.0729186666666672" PointY="8.4163659833131277" />
          <ConnectorPoint PointX="7.2395853333333333" PointY="8.4163659833131277" />
          <ConnectorPoint PointX="7.875" PointY="8.4163659833131277" />
          <ConnectorPoint PointX="7.875" PointY="4.125" />
          <ConnectorPoint PointX="9.1878273173052474" PointY="4.1249999999999991" />
          <ConnectorPoint PointX="9.3544939839719152" PointY="4.125" />
          <ConnectorPoint PointX="10.041666666666666" PointY="4.1249999999999991" />
          <ConnectorPoint PointX="10.208333333333334" PointY="4.125" />
          <ConnectorPoint PointX="11.203123" PointY="4.125" />
          <ConnectorPoint PointX="11.203123" PointY="4.375" />
        </AssociationConnector>
        <AssociationConnector Association="Model.FK_WorkflowInstances_WorkflowTemplateSteps" >
          <ConnectorPoint PointX="9.75" PointY="6.81462646484375" />
          <ConnectorPoint PointX="10.5" PointY="6.81462646484375" />
        </AssociationConnector>
        <AssociationConnector Association="Model.FK_WorkflowInstanceStatusHistory_WorkflowInstances" >
          <ConnectorPoint PointX="12" PointY="6.2926741536458337" />
          <ConnectorPoint PointX="12.416666666666666" PointY="6.2926741536458328" />
          <ConnectorPoint PointX="12.583333333333334" PointY="6.2926741536458337" />
          <ConnectorPoint PointX="12.75" PointY="6.2926741536458337" />
        </AssociationConnector>
        <AssociationConnector Association="Model.FK_WorkflowInstanceStepHistory_WorkflowInstances" >
          <ConnectorPoint PointX="12" PointY="8.6699527994791659" />
          <ConnectorPoint PointX="12.416666666666666" PointY="8.6699527994791659" />
          <ConnectorPoint PointX="12.583333333333334" PointY="8.6699527994791659" />
          <ConnectorPoint PointX="12.75" PointY="8.6699527994791659" />
        </AssociationConnector>
        <AssociationConnector Association="Model.PK_WorkflowInstanceStatusHistory_WorkflowInstanceStatus" >
          <ConnectorPoint PointX="9.75" PointY="2.1908655130208325" />
          <ConnectorPoint PointX="10.125" PointY="2.1908655130208325" />
          <ConnectorPoint PointX="10.125" PointY="2.772360026041667" />
          <ConnectorPoint PointX="12.197916666666666" PointY="2.7723600260416665" />
          <ConnectorPoint PointX="12.364583333333334" PointY="2.772360026041667" />
          <ConnectorPoint PointX="12.375" PointY="2.772360026041667" />
          <ConnectorPoint PointX="12.375" PointY="4.5859993489583326" />
          <ConnectorPoint PointX="12.979167166666665" PointY="4.5859993489583317" />
          <ConnectorPoint PointX="13.145833833333333" PointY="4.5859993489583326" />
          <ConnectorPoint PointX="13.5" PointY="4.5859993489583326" />
          <ConnectorPoint PointX="13.5" PointY="5.25" />
        </AssociationConnector>
        <AssociationConnector Association="Model.FK_WorkflowInstanceTaskStatusHistory_WorkflowInstanceTaskStatus" >
          <ConnectorPoint PointX="17.625" PointY="2.6283268229166667" />
          <ConnectorPoint PointX="18.75" PointY="2.6283268229166667" />
          <ConnectorPoint PointX="18.75" PointY="5.25" />
        </AssociationConnector>
        <EntityTypeShape EntityType="Model.WorkflowTemplateTriggerAction" Width="1.5" PointX="10.375" PointY="14.125" Height="1.5923063151041674" />
        <EntityTypeShape EntityType="Model.WorkflowTemplateTrigger" Width="1.5" PointX="12.625" PointY="0.75" Height="3.2357796223958331" />
        <AssociationConnector Association="Model.FK_WorkflowTemplateTriggers_WorkflowTemplates" >
          <ConnectorPoint PointX="6.375" PointY="6.6759402528191032" />
          <ConnectorPoint PointX="7.8125" PointY="6.6759402528191032" />
          <ConnectorPoint PointX="7.8125" PointY="4.09375" />
          <ConnectorPoint PointX="9.2032090793263119" PointY="4.0937499999999991" />
          <ConnectorPoint PointX="9.36987574599298" PointY="4.09375" />
          <ConnectorPoint PointX="11.885416666666666" PointY="4.0937499999999991" />
          <ConnectorPoint PointX="12.052083333333334" PointY="4.09375" />
          <ConnectorPoint PointX="12.3125" PointY="4.09375" />
          <ConnectorPoint PointX="12.3125" PointY="5" />
          <ConnectorPoint PointX="12.354166666666666" PointY="4.9999999999999991" />
          <ConnectorPoint PointX="12.520833333333334" PointY="5" />
          <ConnectorPoint PointX="13.062500499999999" PointY="5" />
          <ConnectorPoint PointX="13.062500499999999" PointY="4.4609993489583326" />
        </AssociationConnector>
        <AssociationConnector Association="Model.FK_WorkflowTemplateTriggers_WorkflowTemplateTriggerActions" >
          <ConnectorPoint PointX="10.714844437499998" PointY="14.125" />
          <ConnectorPoint PointX="10.714844437499998" PointY="10.259013671875001" />
          <ConnectorPoint PointX="10.992838885416665" PointY="10.259013671875001" />
          <ConnectorPoint PointX="11.159505552083333" PointY="10.259013671875001" />
          <ConnectorPoint PointX="12.28125" PointY="10.259013671875001" />
          <ConnectorPoint PointX="12.28125" PointY="2.1592565917968751" />
          <ConnectorPoint PointX="12.625" PointY="2.1592565917968751" />
        </AssociationConnector>
        <AssociationConnector Association="Model.FK_WorkflowTemplateTriggers_WorkflowTemplateTriggerTypes" >
          <ConnectorPoint PointX="11.875" PointY="1.5461531575520835" />
          <ConnectorPoint PointX="12.625" PointY="1.5461531575520835" />
        </AssociationConnector>
        <AssociationConnector Association="Model.FK_WorkflowTemplates_Workflows" >
          <ConnectorPoint PointX="2.25" PointY="1.3125" />
          <ConnectorPoint PointX="4.09375" PointY="1.3125" />
          <ConnectorPoint PointX="4.09375" PointY="4.625" />
        </AssociationConnector>
        <EntityTypeShape EntityType="Model.WorkflowInstanceParticipant" Width="1.5" PointX="8" PointY="14.5" Height="1.5923063151041674" />
        <EntityTypeShape EntityType="Model.WorkflowTemplateParticipantRole" Width="1.5" PointX="8" PointY="16.875" Height="1.427958984374996" />
        <EntityTypeShape EntityType="Model.WorkflowTemplateParticipant" Width="1.5" PointX="5.75" PointY="15.375" Height="2.7427376302083353" />
        <EntityTypeShape EntityType="Model.WorkflowTemplateStepAssignee" Width="1.5" PointX="11.5" PointY="10.875" Height="1.9210009765624996" />
        <AssociationConnector Association="Model.FK_WorkflowInstanceParticipants_WorkflowTemplateParticipants" >
          <ConnectorPoint PointX="7.25" PointY="15.970883656897208" />
          <ConnectorPoint PointX="8" PointY="15.970883656897208" />
        </AssociationConnector>
        <AssociationConnector Association="Model.FK_WorkflowTemplateParticipantRoles_WorkflowTemplateParticipants" >
          <ConnectorPoint PointX="7.25" PointY="17.496368815104169" />
          <ConnectorPoint PointX="8" PointY="17.496368815104169" />
        </AssociationConnector>
        <AssociationConnector Association="Model.FK_WorkflowTemplateParticipants_WorkflowTemplates" >
          <ConnectorPoint PointX="3.6875" PointY="9.6686002604166656" />
          <ConnectorPoint PointX="3.6875" PointY="16.746368815104169" />
          <ConnectorPoint PointX="5.75" PointY="16.746368815104169" />
        </AssociationConnector>
        <AssociationConnector Association="Model.FK_WorkflowTemplateStepAssignees_WorkflowTemplateParticipants" >
          <ConnectorPoint PointX="7.25" PointY="15.37615284615385" />
          <ConnectorPoint PointX="7.625" PointY="15.00115284615385" />
          <ConnectorPoint PointX="7.625" PointY="13.171000976562501" />
          <ConnectorPoint PointX="10.588542416666664" PointY="13.171000976562501" />
          <ConnectorPoint PointX="10.755209083333332" PointY="13.171000976562501" />
          <ConnectorPoint PointX="11.125000000000002" PointY="13.171000976562501" />
          <ConnectorPoint PointX="11.5" PointY="12.796000976562501" />
        </AssociationConnector>
        <AssociationConnector Association="Model.FK_WorkflowTemplateStepAssignees_WorkflowTemplateSteps" >
          <ConnectorPoint PointX="8.28125" PointY="9.4186002604166656" />
          <ConnectorPoint PointX="8.28125" PointY="11.986977480468758" />
          <ConnectorPoint PointX="10.885417166666665" PointY="11.986977480468758" />
          <ConnectorPoint PointX="11.052083833333333" PointY="11.986977480468758" />
          <ConnectorPoint PointX="11.5" PointY="11.986977480468758" />
        </AssociationConnector>
        <AssociationConnector Association="Model.FK_WorkflowInstances_WorkflowInstanceParticipants" >
          <ConnectorPoint PointX="11.054687874999999" PointY="9.2542529296875" />
          <ConnectorPoint PointX="11.054687874999999" PointY="13.875" />
          <ConnectorPoint PointX="10.755209083333332" PointY="13.875" />
          <ConnectorPoint PointX="10.588542416666664" PointY="13.875" />
          <ConnectorPoint PointX="10.125" PointY="13.875" />
          <ConnectorPoint PointX="10.125" PointY="15.460500488281248" />
          <ConnectorPoint PointX="9.5" PointY="15.460500488281248" />
        </AssociationConnector>
        <EntityTypeShape EntityType="Model.WorkflowUser" Width="1.5" PointX="0.625" PointY="11.25" Height="4.7149055989583353" />
        <EntityTypeShape EntityType="Model.Vw_WorkflowInstance" Width="3.625" PointX="16.25" PointY="9.75" Height="4.8792529296875" />
        <EntityTypeShape EntityType="Model.WorkflowEntity" Width="1.5" PointX="14.125" PointY="14.125" Height="1.7566536458333246" />
        <AssociationConnector Association="Model.FK_Workflows_Entities" >
          <ConnectorPoint PointX="14.6542953125" PointY="14.125" />
          <ConnectorPoint PointX="14.6542953125" PointY="4.7109993489583326" />
          <ConnectorPoint PointX="13.583333333333334" PointY="4.7109993489583317" />
          <ConnectorPoint PointX="13.416666666666666" PointY="4.7109993489583326" />
          <ConnectorPoint PointX="13.145833833333333" PointY="4.7109993489583317" />
          <ConnectorPoint PointX="12.979167166666665" PointY="4.7109993489583326" />
          <ConnectorPoint PointX="12.520833333333334" PointY="4.7109993489583317" />
          <ConnectorPoint PointX="12.354166666666666" PointY="4.7109993489583326" />
          <ConnectorPoint PointX="12.25" PointY="4.7109993489583326" />
          <ConnectorPoint PointX="12.25" PointY="3.5379850260416656" />
          <ConnectorPoint PointX="12.208333333333334" PointY="3.5379850260416643" />
          <ConnectorPoint PointX="11.885416666666666" PointY="3.5379850260416656" />
          <ConnectorPoint PointX="7" PointY="3.5379850260416656" />
          <ConnectorPoint PointX="7" PointY="1.875" />
          <ConnectorPoint PointX="4.177083333333333" PointY="1.8749999999999993" />
          <ConnectorPoint PointX="4.010416666666667" PointY="1.875" />
          <ConnectorPoint PointX="2.75" PointY="1.875" />
          <ConnectorPoint PointX="2.75" PointY="3.8657223693598146" />
          <ConnectorPoint PointX="2.6145858333333334" PointY="3.8657223693598142" />
          <ConnectorPoint PointX="2.4479191666666664" PointY="3.8657223693598146" />
          <ConnectorPoint PointX="2.25" PointY="3.8657223693598146" />
        </AssociationConnector>
        <AssociationConnector Association="Model.FK_Users_Entities" >
          <ConnectorPoint PointX="15.058595624999999" PointY="14.125" />
          <ConnectorPoint PointX="15.058595624999999" PointY="13.859375" />
          <ConnectorPoint PointX="14.737628645833334" PointY="13.859375" />
          <ConnectorPoint PointX="14.570961979166667" PointY="13.859375" />
          <ConnectorPoint PointX="10.798177770833332" PointY="13.859375" />
          <ConnectorPoint PointX="10.631511104166664" PointY="13.859375" />
          <ConnectorPoint PointX="7.708333333333333" PointY="13.859375" />
          <ConnectorPoint PointX="7.541666666666667" PointY="13.859375" />
          <ConnectorPoint PointX="6.5" PointY="13.859375" />
          <ConnectorPoint PointX="6.5" PointY="14.588571213942309" />
          <ConnectorPoint PointX="3.7708333333333335" PointY="14.588571213942309" />
          <ConnectorPoint PointX="3.6041666666666665" PointY="14.588571213942309" />
          <ConnectorPoint PointX="2.125" PointY="14.588571213942309" />
        </AssociationConnector>
        <AssociationConnector Association="Model.FK_WorkflowTemplateTriggers_WorkflowTemplateSteps" >
          <ConnectorPoint PointX="9.2865424126596459" PointY="4.375" />
          <ConnectorPoint PointX="9.2865424126596459" PointY="3.7879850260416656" />
          <ConnectorPoint PointX="11.885416666666666" PointY="3.7879850260416652" />
          <ConnectorPoint PointX="12.052083333333334" PointY="3.7879850260416656" />
          <ConnectorPoint PointX="12.125" PointY="3.7879850260416656" />
          <ConnectorPoint PointX="12.125" PointY="3.1551725260416665" />
          <ConnectorPoint PointX="12.197916666666666" PointY="3.1551725260416656" />
          <ConnectorPoint PointX="12.458333333333334" PointY="3.1551725260416665" />
          <ConnectorPoint PointX="12.625" PointY="3.1551725260416665" />
        </AssociationConnector>
        <EntityTypeShape EntityType="Model.Vw_WorkflowInstanceDocument" Width="3.5" PointX="16.375" PointY="17.75" />
        <EntityTypeShape EntityType="Model.WorkflowInstanceTask" Width="2.875" PointX="24" PointY="5.5" />
        <EntityTypeShape EntityType="Model.Vw_WorkflowInstanceTask" Width="1.5" PointX="10.375" PointY="16.75" />
        <AssociationConnector Association="Model.FK_Users_AssignedTo" />
        <AssociationConnector Association="Model.FK_Users_CompletedBy" />
        <AssociationConnector Association="Model.FK_WorkflowInstanceTasks_Users1" />
        <AssociationConnector Association="Model.FK_WorkflowInstanceTasks_WorkflowInstances" />
        <AssociationConnector Association="Model.FK_WorkflowInstanceTasks_WorkflowInstanceTaskStatus" />
        <AssociationConnector Association="Model.FK_WorkflowInstanceTasks_WorkflowTemplateSteps" />
        <EntityTypeShape EntityType="Model.Vw_WorkflowTemplate" Width="1.5" PointX="18.375" PointY="0.75" />
      </Diagram>
      <Diagram DiagramId="785e27c786d944f385c4eda96f69516c" Name="Security" ZoomLevel="86" >
        <EntityTypeShape EntityType="Model.WorkflowBuddy" Width="1.5" PointX="5.4276925052645115" PointY="22.913078259170558" />
      </Diagram>
      <Diagram DiagramId="26d0cd4e78a042fcbad457a46650e831" Name="Worklow Document Model" >
        <EntityTypeShape EntityType="Model.WorkflowInstanceDocument" Width="1.5" PointX="0.75" PointY="0.75" />
        <EntityTypeShape EntityType="Model.WorkflowTemplateDocument" Width="1.5" PointX="2.75" PointY="0.75" />
      </Diagram>
    </Diagrams>
  </Designer>
</edmx:Edmx>