<?xml version="1.0" encoding="UTF-8"?>
<!-- Definition of new Model -->
<model name="pjt:pjtmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
    <!-- Optional meta-data about the model -->
	<description>Project Model</description>
	<author>QUERE</author>
	<version>1.0</version>
    <!-- Imports are required to allow references to definitions in other models -->
	<imports>
        <!-- Import Alfresco Dictionary Definitions -->
		<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
        <!-- Import Alfresco Content Domain Model Definitions -->
		<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
		<import uri="http://www.bcpg.fr/model/becpg/1.0" prefix="bcpg" />
		<import uri="http://www.alfresco.org/model/bpm/1.0" prefix="bpm" />
		<import uri="http://www.alfresco.org/model/datalist/1.0" prefix="dl" />
		<import uri="http://www.bcpg.fr/model/report/1.0" prefix="rep" />
	</imports>

    <!-- Introduction of new namespaces defined by this model -->
	<namespaces>
		<namespace uri="http://www.bcpg.fr/model/project/1.0" prefix="pjt" />
	</namespaces>

	<constraints>

		<constraint name="pjt:allowedWorkflows" type="LIST">
			<parameter name="allowedValues">
				<list>
					<value></value>
					<value>activiti$projectAdhoc</value>
					<value>activiti$projectNewProduct</value>
				</list>
			</parameter>
		</constraint>



		<constraint name="pjt:deliverableStates" type="LIST">
			<parameter name="allowedValues">
				<list>
					<value>Planned</value>
					<value>InProgress</value>
					<value>Completed</value>
					<value>Closed</value>
				</list>
			</parameter>
		</constraint>

		<constraint name="pjt:dlScriptExecOrders" type="LIST">
			<parameter name="allowedValues">
				<list>
					<value>None</value>
					<value>Pre</value>
					<value>Post</value>
				</list>
			</parameter>
		</constraint>

		<constraint name="pjt:taskStates" type="LIST">
			<parameter name="allowedValues">
				<list>
					<value>Planned</value>
					<value>InProgress</value>
					<value>OnHold</value>
					<value>Cancelled</value>
					<value>Refused</value>
					<value>Completed</value>
				</list>
			</parameter>
		</constraint>

		<constraint name="pjt:manualDate" type="LIST">
			<parameter name="allowedValues">
				<list>
					<value></value>
					<value>Start</value>
					<value>End</value>
				</list>
			</parameter>
		</constraint>

		<constraint name="pjt:projectStates" type="LIST">
			<parameter name="allowedValues">
				<list>
					<value>Planned</value>
					<value>InProgress</value>
					<value>OnHold</value>
					<value>Cancelled</value>
					<value>Completed</value>
				</list>
			</parameter>
		</constraint>

		<constraint name="pjt:observersEventTypes" type="LIST">
			<parameter name="allowedValues">
				<list>
					<value>Comment</value>
					<value>TaskStart</value>
					<value>TaskEnd</value>
					<value>TaskRefused</value>
					<value>Properties</value>
					<value>NotifyDisabled</value>
					<value>NotifyOnRefused</value>
				</list>
			</parameter>
		</constraint>


		<constraint name="pjt:planningModes" type="LIST">
			<parameter name="allowedValues">
				<list>
					<value>Planning</value>
					<value>RetroPlanning</value>
				</list>
			</parameter>
		</constraint>

		<constraint name="pjt:allowedPriority" type="LIST">
			<parameter name="allowedValues">
				<list>
					<value>1</value>
					<value>2</value>
					<value>3</value>
				</list>
			</parameter>
		</constraint>

		<constraint name="pjt:percentage" type="MINMAX">
			<parameter name="minValue">
				<value>0</value>
			</parameter>
			<parameter name="maxValue">
				<value>100</value>
			</parameter>
		</constraint>

		<constraint name="pjt:requestStates" type="fr.becpg.repo.dictionary.constraint.DynListConstraint">
			<parameter name="path">
				<list>
					<value>/System/ProjectLists/bcpg:entityLists/RequestStates</value>
				</list>
			</parameter>
			<parameter name="constraintType">
				<value>bcpg:listValue</value>
			</parameter>
			<parameter name="constraintProp">
				<value>bcpg:lvValue</value>
			</parameter>
		</constraint>

		<constraint name="pjt:requestOrigins" type="fr.becpg.repo.dictionary.constraint.DynListConstraint">
			<parameter name="path">
				<list>
					<value>/System/ProjectLists/bcpg:entityLists/RequestOrigins</value>
				</list>
			</parameter>
			<parameter name="constraintType">
				<value>bcpg:listValue</value>
			</parameter>
			<parameter name="constraintProp">
				<value>bcpg:lvValue</value>
			</parameter>
		</constraint>

		<constraint name="pjt:scoreCriterionTypes" type="fr.becpg.repo.dictionary.constraint.DynListConstraint">
			<parameter name="path">
				<list>
					<value>/System/ProjectLists/bcpg:entityLists/ScoreCriterionTypes</value>
				</list>
			</parameter>
			<parameter name="constraintType">
				<value>bcpg:listValue</value>
			</parameter>
			<parameter name="constraintProp">
				<value>bcpg:lvValue</value>
			</parameter>
		</constraint>

		<constraint name="pjt:sponsors" type="fr.becpg.repo.dictionary.constraint.DynListConstraint">
			<parameter name="path">
				<list>
					<value>/System/ProjectLists/bcpg:entityLists/Sponsors</value>
				</list>
			</parameter>
			<parameter name="constraintType">
				<value>bcpg:listValue</value>
			</parameter>
			<parameter name="constraintProp">
				<value>bcpg:lvValue</value>
			</parameter>
		</constraint>

		<constraint name="pjt:timeTypes" type="fr.becpg.repo.dictionary.constraint.DynListConstraint">
			<parameter name="path">
				<list>
					<value>/System/ProjectLists/bcpg:entityLists/TimeTypes</value>
				</list>
			</parameter>
			<parameter name="constraintType">
				<value>bcpg:listValue</value>
			</parameter>
			<parameter name="constraintProp">
				<value>bcpg:lvValue</value>
			</parameter>
		</constraint>

		<constraint name="pjt:daysOfWeek" type="LIST">
			<parameter name="allowedValues">
				<list>
					<value>1</value>
					<value>2</value>
					<value>3</value>
					<value>4</value>
					<value>5</value>
					<value>6</value>
					<value>7</value>
				</list>
			</parameter>
		</constraint>

	</constraints>

	<types>

		<type name="pjt:calendar">
			<parent>bcpg:charact</parent>
			<properties>
				<property name="pjt:calPublicHolydaysDates">
					<type>d:text</type>
					<index enabled="false" />
				</property>
				<property name="pjt:calHolydayDates">
					<type>d:text</type>
					<index enabled="false" />
				</property>
				<property name="pjt:calNonWorkingDays">
					<type>d:text</type>
					<multiple>true</multiple>
					<index enabled="false" />
					<constraints>
						<constraint ref="pjt:daysOfWeek" />
					</constraints>
				</property>
			</properties>
		</type>

		<type name="pjt:project">
			<parent>bcpg:entityV2</parent>
			<properties>
				<property name="pjt:projectHierarchy1">
					<type>d:noderef</type>
					<mandatory>false</mandatory>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>true</facetable>
					</index>
				</property>
				<property name="pjt:projectHierarchy2">
					<type>d:noderef</type>
					<mandatory>false</mandatory>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>true</facetable>
					</index>
				</property>
				<property name="pjt:projectOrigin">
					<type>d:text</type>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>true</facetable>
					</index>
					<constraints>
						<constraint ref="pjt:requestOrigins" />
					</constraints>
				</property>
				<property name="pjt:projectSponsor">
					<type>d:text</type>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>true</facetable>
					</index>
					<constraints>
						<constraint ref="pjt:sponsors" />
					</constraints>
				</property>
				<property name="pjt:projectStartDate">
					<type>d:date</type>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>true</facetable>
					</index>
				</property>
				<property name="pjt:projectCompletionDate">
					<type>d:date</type>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>true</facetable>
					</index>
				</property>
				<property name="pjt:projectDueDate">
					<type>d:date</type>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>true</facetable>
					</index>
				</property>
				<property name="pjt:projectPlanningMode">
					<type>d:text</type>
					<mandatory>true</mandatory>
					<default>Planning</default>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>true</facetable>
					</index>
					<constraints>
						<constraint ref="pjt:planningModes" />
					</constraints>
				</property>
				<property name="pjt:projectPriority">
					<type>d:int</type>
					<mandatory>true</mandatory>
					<default>2</default>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>true</facetable>
					</index>
					<constraints>
						<constraint ref="pjt:allowedPriority" />
					</constraints>


				</property>
				<property name="pjt:projectState">
					<type>d:text</type>
					<mandatory>true</mandatory>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>true</facetable>
					</index>
					<constraints>
						<constraint ref="pjt:projectStates" />
					</constraints>
				</property>
				<property name="pjt:projectLegends">
					<type>d:noderef</type>
					<multiple>true</multiple>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
				<property name="pjt:projectOverdue">
					<type>d:int</type>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>true</facetable>
					</index>
				</property>
				<property name="pjt:projectBudgetedCost">
					<type>d:double</type>
					<mandatory>false</mandatory>
					<index enabled="false" />
				</property>
				<property name="pjt:projectWork">
					<type>d:double</type>
					<mandatory>false</mandatory>
					<index enabled="false" />
				</property>
				<property name="pjt:projectLoggedTime">
					<type>d:double</type>
					<mandatory>false</mandatory>
					<index enabled="false" />
				</property>
				<property name="pjt:projectCurrentComment">
					<type>d:text</type>
					<index enabled="false" />
				</property>
				<property name="pjt:projectOwners">
					<type>d:noderef</type>
					<multiple>true</multiple>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>true</facetable>
					</index>
				</property>
			</properties>
			<associations>
				<association name="pjt:projectEntity">
					<source>
						<mandatory>false</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>bcpg:entityV2</class>
						<mandatory>false</mandatory>
						<many>true</many>
					</target>
				</association>
				<association name="pjt:projectManager">
					<source>
						<mandatory>false</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>cm:person</class>
						<mandatory>false</mandatory>
						<many>false</many>
					</target>
				</association>
				<association name="pjt:projectObservers">
					<source>
						<mandatory>false</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>cm:authority</class>
						<mandatory>false</mandatory>
						<many>true</many>
					</target>
				</association>
				<association name="pjt:projectCurrentTasks">
					<source>
						<mandatory>false</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>pjt:taskList</class>
						<mandatory>false</mandatory>
						<many>true</many>
					</target>
				</association>
				<association name="pjt:projectCalendar">
					<source>
						<mandatory>false</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>pjt:calendar</class>
						<mandatory>false</mandatory>
						<many>false</many>
					</target>
				</association>
				<association name="pjt:projectCurrentComments">
					<source>
						<mandatory>false</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>bcpg:activityList</class>
						<mandatory>false</mandatory>
						<many>true</many>
					</target>
				</association>
			</associations>
			<mandatory-aspects>
				<aspect>bcpg:codeAspect</aspect>
				<aspect>bcpg:entityListsAspect</aspect>
				<aspect>pjt:completionAspect</aspect>
				<aspect>bcpg:entityTplRefAspect</aspect>
			</mandatory-aspects>
		</type>

		<type name="pjt:taskLegend">
			<parent>bcpg:entityListItem</parent>
			<properties>
				<property name="pjt:taskLegendSites">
					<type>d:text</type>
					<index enabled="true">
						<tokenised>both</tokenised>
						<facetable>false</facetable>
					</index>
				</property>

			</properties>
			<mandatory-aspects>
				<aspect>bcpg:colorAspect</aspect>
			</mandatory-aspects>
		</type>

		<type name="pjt:projectListItem">
			<parent>bcpg:entityListItem</parent>
		</type>

		<type name="pjt:taskList">
			<parent>pjt:projectListItem</parent>
			<properties>
				<property name="pjt:tlTaskName">
					<type>d:mltext</type>
					<mandatory>true</mandatory>
					<index enabled="true">
						<tokenised>both</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
				<property name="pjt:tlTaskDescription">
					<type>d:mltext</type>
					<index enabled="true">
						<tokenised>both</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
				<property name="pjt:tlTaskComment">
					<type>d:text</type>
					<mandatory>true</mandatory>
					<index enabled="true">
						<tokenised>both</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
				<property name="pjt:tlIsRefused">
					<type>d:boolean</type>
					<index enabled="false" />
				</property>
				<property name="pjt:tlIsMilestone">
					<type>d:boolean</type>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
				<property name="pjt:tlIsCritical">
					<type>d:boolean</type>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
				<property name="pjt:tlIsGroup">
					<type>d:boolean</type>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
				<property name="pjt:tlIsExcludeFromSearch">
					<type>d:boolean</type>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
				<property name="pjt:tlDuration">
					<type>d:int</type>
					<mandatory>true</mandatory>
					<default>1</default>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
				<property name="pjt:tlRealDuration">
					<type>d:int</type>
					<mandatory>true</mandatory>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
				<property name="pjt:tlCapacity">
					<type>d:int</type>
					<mandatory>false</mandatory>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
				<property name="pjt:tlWork">
					<type>d:double</type>
					<mandatory>false</mandatory>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
				<property name="pjt:tlLoggedTime">
					<type>d:double</type>
					<mandatory>false</mandatory>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
				<property name="pjt:tlWorkflowName">
					<type>d:text</type>
					<default>activiti$projectAdhoc</default>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
					<constraints>
						<constraint ref="pjt:allowedWorkflows" />
					</constraints>
				</property>
				<property name="pjt:tlWorkflowInstance">
					<type>d:text</type>
					<index enabled="false" />
				</property>
				<property name="pjt:tlWorkflowTaskInstance">
					<type>d:text</type>
					<index enabled="false" />
				</property>
				<property name="pjt:tlStart">
					<type>d:date</type>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
				<property name="pjt:tlEnd">
					<type>d:date</type>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
				<property name="pjt:tlDue">
					<type>d:date</type>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
				<property name="pjt:tlTargetStart">
					<type>d:date</type>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
				<property name="pjt:tlTargetEnd">
					<type>d:date</type>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
				<property name="pjt:tlState">
					<type>d:text</type>
					<default>Planned</default>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
					<constraints>
						<constraint ref="pjt:taskStates" />
					</constraints>
				</property>
				<property name="pjt:tlPreviousState">
					<type>d:text</type>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
					<constraints>
						<constraint ref="pjt:taskStates" />
					</constraints>
				</property>
				<property name="pjt:tlManualDate">
					<type>d:text</type>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
					<constraints>
						<constraint ref="pjt:manualDate" />
					</constraints>
				</property>
				<property name="pjt:tlFixedCost">
					<type>d:double</type>
					<mandatory>false</mandatory>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
				<property name="pjt:tlResourcesAssocIndex">
					<type>d:noderef</type>
					<multiple>true</multiple>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>true</facetable>
					</index>
				</property>
			</properties>
			<associations>
				<association name="pjt:tlPrevTasks">
					<source>
						<mandatory>true</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>pjt:taskList</class>
						<mandatory>false</mandatory>
						<many>true</many>
					</target>
				</association>
				<association name="pjt:tlRefusedTaskRef">
					<source>
						<mandatory>true</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>pjt:taskList</class>
						<mandatory>false</mandatory>
						<many>false</many>
					</target>
				</association>
				<association name="pjt:tlRefusedTasksToReopen">
					<source>
						<mandatory>true</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>pjt:taskList</class>
						<mandatory>false</mandatory>
						<many>true</many>
					</target>
				</association>
				<association name="pjt:tlResources">
					<source>
						<mandatory>false</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>cm:authority</class>
						<mandatory>false</mandatory>
						<many>true</many>
					</target>
				</association>
				<association name="pjt:tlTaskLegend">
					<source>
						<mandatory>true</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>pjt:taskLegend</class>
						<mandatory>false</mandatory>
						<many>false</many>
					</target>
				</association>


				<association name="pjt:tlCalendar">
					<source>
						<mandatory>false</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>pjt:calendar</class>
						<mandatory>false</mandatory>
						<many>false</many>
					</target>
				</association>
				<association name="pjt:tlObservers">
					<source>
						<mandatory>false</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>cm:authority</class>
						<mandatory>false</mandatory>
						<many>true</many>
					</target>
				</association>
				<association name="pjt:tlResourceCost">
					<source>
						<mandatory>false</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>pjt:resourceCost</class>
						<mandatory>false</mandatory>
						<many>false</many>
					</target>
				</association>
				<association name="pjt:tlBudgetRef">
					<source>
						<mandatory>true</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>pjt:budgetList</class>
						<mandatory>false</mandatory>
						<many>false</many>
					</target>
				</association>
			</associations>
			<mandatory-aspects>
				<aspect>bcpg:sortableListAspect</aspect>
				<aspect>pjt:completionAspect</aspect>
				<aspect>bcpg:depthLevelAspect</aspect>
			</mandatory-aspects>
		</type>

		<type name="pjt:deliverableList">
			<parent>pjt:projectListItem</parent>
			<properties>
				<property name="pjt:dlDescription">
					<type>d:mltext</type>
					<mandatory>true</mandatory>
					<index enabled="true">
						<tokenised>both</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
				<property name="pjt:dlState">
					<type>d:text</type>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
					<constraints>
						<constraint ref="pjt:deliverableStates" />
					</constraints>
				</property>
				<property name="pjt:dlScriptExecOrder">
					<type>d:text</type>
					<default>None</default>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
					<constraints>
						<constraint ref="pjt:dlScriptExecOrders" />
					</constraints>
				</property>
				<property name="pjt:dlUrl">
					<type>d:text</type>
					<index enabled="true">
						<tokenised>both</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
			</properties>
			<associations>
				<association name="pjt:dlTask">
					<source>
						<mandatory>true</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>pjt:taskList</class>
						<mandatory>false</mandatory>
						<many>true</many>
					</target>
				</association>
				<association name="pjt:dlContent">
					<source>
						<mandatory>false</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>cm:cmobject</class>
						<mandatory>false</mandatory>
						<many>false</many>
					</target>
				</association>
			</associations>
			<mandatory-aspects>
				<aspect>bcpg:sortableListAspect</aspect>
				<aspect>pjt:completionAspect</aspect>
			</mandatory-aspects>
		</type>

		<type name="pjt:scoreList">
			<parent>pjt:projectListItem</parent>
			<properties>
				<property name="pjt:slWeight">
					<type>d:double</type>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
					<constraints>
						<constraint ref="pjt:percentage" />
					</constraints>
				</property>
				<property name="pjt:slScore">
					<type>d:double</type>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
				<property name="pjt:slScreening">
					<type>d:text</type>
					<mandatory>false</mandatory>
					<index enabled="true">
						<tokenised>both</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
				<property name="pjt:slScoreDetail">
					<type>d:text</type>
					<index enabled="false" />
				</property>
				<property name="pjt:slScoreRange">
					<type>d:text</type>
					<index enabled="true">
						<tokenised>both</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
				<property name="pjt:slCriterion">
					<type>d:text</type>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
					<constraints>
						<constraint ref="pjt:scoreCriterionTypes" />
					</constraints>
				</property>
			</properties>
			<associations>
				<association name="pjt:slScoreCriterion">
					<source>
						<mandatory>true</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>pjt:scoreCriterion</class>
						<mandatory>true</mandatory>
						<many>false</many>
					</target>
				</association>
			</associations>
			<mandatory-aspects>
				<aspect>bcpg:sortableListAspect</aspect>
				<aspect>pjt:completionAspect</aspect>
				<aspect>bcpg:depthLevelAspect</aspect>
			</mandatory-aspects>
		</type>


		<type name="pjt:scoreCriterion">
			<parent>bcpg:charact</parent>
			<properties>
				<property name="pjt:scoreCriterionType">
					<type>d:text</type>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
					<constraints>
						<constraint ref="pjt:scoreCriterionTypes" />
					</constraints>
				</property>
				<property name="pjt:scoreCriterionWeight">
					<type>d:double</type>
					<index enabled="false" />
				</property>
				<property name="pjt:scoreCriterionFormula">
					<type>d:text</type>
					<index enabled="false" />
				</property>
				<property name="pjt:scoreCriterionDetailFormula">
					<type>d:text</type>
					<index enabled="false" />
				</property>
				<property name="pjt:scoreCriterionRangeFormula">
					<type>d:text</type>
					<index enabled="false" />
				</property>
				<property name="pjt:scoreCriterionRange">
					<type>d:text</type>
					<index enabled="false" />
				</property>
				<property name="pjt:scoreCriterionFormulated">
                    <type>d:boolean</type>
                    <index enabled="false" />
                </property>
			</properties>
		</type>

        <!-- Data List - Request List -->
		<type name="pjt:requestList">
			<parent>dl:dataListItem</parent>
			<mandatory-aspects>
				<aspect>pjt:requestListAspect</aspect>
				<aspect>cm:titled</aspect>
				<aspect>cm:attachable</aspect>
				<aspect>cm:likesRatingSchemeRollups</aspect>
			</mandatory-aspects>
		</type>


		<type name="pjt:entityRequestList">
			<parent>bcpg:entityListItem</parent>
			<mandatory-aspects>
				<aspect>pjt:requestListAspect</aspect>
				<aspect>cm:titled</aspect>
				<aspect>cm:attachable</aspect>
				<aspect>cm:likesRatingSchemeRollups</aspect>
			</mandatory-aspects>
		</type>



		<type name="pjt:logTimeList">
			<title>Log time</title>
			<parent>pjt:projectListItem</parent>
			<properties>
				<property name="pjt:ltlDate">
					<title>Date</title>
					<type>d:date</type>
					<mandatory>true</mandatory>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
				<property name="pjt:ltlTime">
					<title>Time (h)</title>
					<type>d:double</type>
					<mandatory>true</mandatory>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
				<property name="pjt:ltlComment">
					<title>Comment</title>
					<type>d:text</type>
					<mandatory>false</mandatory>
					<index enabled="false" />
				</property>
				<property name="pjt:ltlType">
					<title>Activity type</title>
					<type>d:text</type>
					<mandatory>true</mandatory>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
					<constraints>
						<constraint ref="pjt:timeTypes" />
					</constraints>
				</property>
			</properties>
			<associations>
				<association name="pjt:ltlTask">
					<title>Task</title>
					<source>
						<mandatory>false</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>pjt:taskList</class>
						<mandatory enforced="false">true</mandatory>
						<many>false</many>
					</target>
				</association>
			</associations>
			<overrides />
			<mandatory-aspects />
		</type>

		<type name="pjt:resourceCost">
			<parent>bcpg:charact</parent>
			<properties>
				<property name="pjt:resourceCostValue">
					<type>d:double</type>
					<mandatory>false</mandatory>
					<index enabled="false" />
				</property>
				<property name="pjt:resourceCostBillRate">
					<type>d:double</type>
					<mandatory>false</mandatory>
					<index enabled="false" />
				</property>
				<property name="pjt:resourceCostHoursPerDay">
					<type>d:double</type>
					<mandatory>false</mandatory>
					<index enabled="false" />
				</property>
			</properties>
		</type>



        <!-- Budget List -->

		<type name="pjt:budgetList">
			<parent>pjt:projectListItem</parent>
			<properties>
				<property name="pjt:blItem">
					<type>d:text</type>
					<mandatory>true</mandatory>
					<index enabled="true">
						<tokenised>both</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
				<property name="pjt:blBudgetedExpense">
					<type>d:double</type>
					<mandatory>false</mandatory>
					<index enabled="false" />
				</property>
				<property name="pjt:blBudgetedInvoice">
					<type>d:double</type>
					<mandatory>false</mandatory>
					<index enabled="false" />
				</property>

				<property name="pjt:blProfit">
					<type>d:double</type>
					<mandatory>false</mandatory>
					<index enabled="false" />
				</property>
			</properties>
			<associations />
			<mandatory-aspects>
				<aspect>bcpg:depthLevelAspect</aspect>
				<aspect>pjt:budgetAspect</aspect>
			</mandatory-aspects>
		</type>


        <!-- Expenses List -->
		<type name="pjt:expenseList">
			<parent>pjt:projectListItem</parent>
			<properties>

				<property name="pjt:elExpenseName">
					<type>d:text</type>
					<mandatory>false</mandatory>
					<index enabled="false">
					</index>
				</property>
				<property name="pjt:elDate">
					<type>d:date</type>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
			</properties>
			<associations>
				<association name="pjt:elTaskRef">
					<source>
						<mandatory>true</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>pjt:taskList</class>
						<mandatory>false</mandatory>
						<many>false</many>
					</target>
				</association>

				<association name="pjt:elBudgetRef">
					<source>
						<mandatory>false</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>pjt:budgetList</class>
						<mandatory>false</mandatory>
						<many>false</many>
					</target>
				</association>

				<association name="pjt:elDocRef">
					<source>
						<mandatory>false</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>cm:content</class>
						<mandatory>false</mandatory>
						<many>true</many>
					</target>
				</association>
			</associations>
			<mandatory-aspects>
				<aspect>pjt:budgetAspect</aspect>
			</mandatory-aspects>
		</type>

        <!-- Invoice List -->
		<type name="pjt:invoiceList">
			<parent>pjt:projectListItem</parent>
			<properties>

				<property name="pjt:ilInvoiceName">
					<type>d:text</type>
					<mandatory>false</mandatory>
					<index enabled="false" />
				</property>
				<property name="pjt:ilDate">
					<type>d:date</type>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
			</properties>
			<associations>
				<association name="pjt:ilTaskRef">
					<source>
						<mandatory>true</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>pjt:taskList</class>
						<mandatory>false</mandatory>
						<many>false</many>
					</target>
				</association>
				<association name="pjt:ilBudgetRef">
					<source>
						<mandatory>true</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>pjt:budgetList</class>
						<mandatory>false</mandatory>
						<many>false</many>
					</target>
				</association>
				<association name="pjt:ilDocRef">
					<source>
						<mandatory>true</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>cm:content</class>
						<mandatory>false</mandatory>
						<many>true</many>
					</target>
				</association>
			</associations>
			<mandatory-aspects>
				<aspect>pjt:budgetAspect</aspect>
			</mandatory-aspects>
		</type>



	</types>

	<aspects>
    


		<aspect name="pjt:subProjectAspect">
			<associations>
				<association name="pjt:subProjectRef">
					<source>
						<mandatory>true</mandatory>
						<many>false</many>
					</source>
					<target>
						<class>pjt:project</class>
						<mandatory>false</mandatory>
						<many>false</many>
					</target>
				</association>
				<association name="pjt:parentProjectRef">
					<source>
						<mandatory>true</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>pjt:project</class>
						<mandatory>false</mandatory>
						<many>false</many>
					</target>
				</association>
			</associations>
		</aspect>

		<aspect name="pjt:budgetAspect">
			<properties>
				<property name="pjt:invoice">
					<type>d:double</type>
					<mandatory>false</mandatory>
					<index enabled="false" />
				</property>
				<property name="pjt:expense">
					<type>d:double</type>
					<mandatory>false</mandatory>
					<index enabled="false">
					</index>
				</property>
			</properties>
		</aspect>



		<aspect name="pjt:completionAspect">
			<properties>
				<property name="pjt:completionPercent">
					<type>d:int</type>
					<mandatory>false</mandatory>
					<default>0</default>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>true</facetable>
					</index>
					<constraints>
						<constraint ref="pjt:percentage" />
					</constraints>
				</property>
			</properties>
		</aspect>
		<aspect name="pjt:workflowAspect">
			<properties>
				<property name="pjt:worflowTransition">
					<type>d:text</type>
					<default>validate</default>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>true</facetable>
					</index>
					<constraints>
						<constraint name="pjt:worflowTransitions" type="LIST">
							<parameter name="allowedValues">
								<list>
									<value>refused</value>
									<value>validate</value>
								</list>
							</parameter>
						</constraint>
					</constraints>
				</property>
			</properties>
			<associations>
				<association name="pjt:workflowTask">
					<source>
						<mandatory>true</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>pjt:taskList</class>
						<mandatory>true</mandatory>
						<many>false</many>
					</target>
				</association>
			</associations>
		</aspect>

		<aspect name="pjt:delegationAspect">
			<properties>
				<property name="pjt:delegationActivated">
					<type>d:boolean</type>
					<mandatory>false</mandatory>
					<index enabled="false" />
				</property>
				<property name="pjt:delegationStartDate">
					<type>d:date</type>
					<mandatory>false</mandatory>
					<index enabled="false" />
				</property>
				<property name="pjt:delegationEndDate">
					<type>d:date</type>
					<mandatory>false</mandatory>
					<index enabled="false" />
				</property>
				<property name="pjt:reassignCurrentTasks">
					<type>d:boolean</type>
					<mandatory>false</mandatory>
					<index enabled="false" />
				</property>
			</properties>
			<associations>
				<association name="pjt:reassignTo">
					<source>
						<mandatory>true</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>cm:person</class>
						<mandatory>false</mandatory>
						<many>false</many>
					</target>
				</association>
			</associations>
		</aspect>

		<aspect name="pjt:notificationParamAspect">
			<properties>
				<property name="pjt:notificationFrequencyValue">
					<type>d:int</type>
					<mandatory>false</mandatory>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>true</facetable>
					</index>
				</property>
				<property name="pjt:notificationInitialValue">
					<type>d:int</type>
					<mandatory>false</mandatory>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>true</facetable>
					</index>
				</property>
			</properties>
			<associations>
				<association name="pjt:notificationAuthorities">
					<source>
						<mandatory>false</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>cm:authority</class>
						<mandatory>false</mandatory>
						<many>true</many>
					</target>
				</association>
			</associations>
		</aspect>

		<aspect name="pjt:notificationDateAspect">
			<properties>
				<property name="pjt:lastNotificationDate">
					<type>d:datetime</type>
					<mandatory>true</mandatory>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>true</facetable>
					</index>
				</property>
			</properties>
		</aspect>

		<aspect name="pjt:notificationRefAspect">
			<properties>
				<property name="pjt:notificationRefNode">
					<type>d:noderef</type>
					<mandatory>true</mandatory>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
			</properties>
		</aspect>

		<aspect name="pjt:observersEventsAspect">
			<properties>
				<property name="pjt:observersEvents">
					<type>d:text</type>
					<mandatory>false</mandatory>
					<multiple>true</multiple>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>true</facetable>
					</index>
					<constraints>
						<constraint ref="pjt:observersEventTypes" />
					</constraints>
				</property>
			</properties>
		</aspect>


		<aspect name="pjt:requestListAspect">
			<properties>
				<property name="pjt:rlState">
					<type>d:text</type>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>true</facetable>
					</index>
					<constraints>
						<constraint ref="pjt:requestStates" />
					</constraints>
				</property>
				<property name="pjt:rlOrigin">
					<type>d:text</type>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>true</facetable>
					</index>
					<constraints>
						<constraint ref="pjt:requestOrigins" />
					</constraints>
				</property>
				<property name="pjt:rlPriority">
					<type>d:text</type>
					<default>Normal</default>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>true</facetable>
					</index>
					<constraints>
						<constraint ref="dl:priority_value" />
					</constraints>
				</property>
				<property name="pjt:rlDueDate">
					<type>d:date</type>
					<mandatory>false</mandatory>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>true</facetable>
					</index>
				</property>
				<property name="pjt:rlComments">
					<type>d:text</type>
					<mandatory>false</mandatory>
					<index enabled="true">
						<tokenised>both</tokenised>
						<facetable>false</facetable>
					</index>
				</property>
			</properties>
			<associations>
				<association name="pjt:rlAssignedTo">
					<source>
						<mandatory>false</mandatory>
						<many>true</many>
					</source>
					<target>
						<class>cm:person</class>
						<mandatory>false</mandatory>
						<many>true</many>
					</target>
				</association>
			</associations>
		</aspect>

		<aspect name="pjt:projectScoreAspect">
			<properties>
				<property name="pjt:projectScore">
					<type>d:int</type>
					<index enabled="true">
						<tokenised>false</tokenised>
						<facetable>true</facetable>
					</index>
					<constraints>
						<constraint ref="pjt:percentage" />
					</constraints>
				</property>
			</properties>
		</aspect>
	</aspects>
</model>
